| 12345678910111213141516171819202122232425262728293031323334353637 |
- import { params, token } from "../env";
- import { post, login } from "./enter-shared";
- import './enter-case'
- import { ElMessage } from "element-plus";
- let isLoging = false;
- window.platform.login = (isBack = true) => {
- if (isLoging) {
- throw "登录中";
- }
- isLoging = true;
- if (import.meta.env.DEV) {
- post("/fusion/fdLogin", {
- code: "0d76b739ded59dd5",
- deptId: 1,
- password: "IQVPKappIyMjIyMjIyMmE=2dfWAaLBMjJcP1bu3l",
- phoneNum: "88888888888",
- }).then((res) => {
- params.value.token = res.token;
- console.error(res.token);
- // console.log(res.token, {...params.value})
- setTimeout(() => location.reload(), 1000);
- isLoging = false;
- });
- return;
- }
- return login(isBack)
- };
- setTimeout(() => {
- if (!params.value.caseId || !token) {
- ElMessage.error("当前项目号不存在!");
- } else {
- window.platform.getSceneList("");
- }
- }, 500);
|