浏览代码

feat: update package

gemercheung 6 月之前
父节点
当前提交
5630f49421
共有 1 个文件被更改,包括 21 次插入13 次删除
  1. 21 13
      src/api/instance.ts

+ 21 - 13
src/api/instance.ts

@@ -27,19 +27,27 @@ export const {
 } = instance;
 } = instance;
 
 
 const gotoLogin = () => {
 const gotoLogin = () => {
-  if (import.meta.env.DEV) {
-    GAxios.post("/service/manage/login", {
-      password: "MRinIEn3ExMjM0NTY=Q5Lm39urQWzN7k4oCG",
-      userName: "super-admin",
-      username: "super-admin",
-    }).then((res) => {
-      setToken(res.data.data.token)
-      setTimeout(() => location.reload())
-    });
-  } else {
-    const loginHref = `/admin/#/statistics/scene`
-    location.href = loginHref + '?redirect=' + escape(location.href)
-  }
+  GAxios.post("/service/manage/login", {
+    password: "MRinIEn3ExMjM0NTY=Q5Lm39urQWzN7k4oCG",
+    userName: "super-admin",
+    username: "super-admin",
+  }).then((res) => {
+    setToken(res.data.data.token)
+    setTimeout(() => location.reload())
+  });
+  // if (import.meta.env.DEV) {
+  //   GAxios.post("/service/manage/login", {
+  //     password: "MRinIEn3ExMjM0NTY=Q5Lm39urQWzN7k4oCG",
+  //     userName: "super-admin",
+  //     username: "super-admin",
+  //   }).then((res) => {
+  //     setToken(res.data.data.token)
+  //     setTimeout(() => location.reload())
+  //   });
+  // } else {
+  //   const loginHref = `/admin/#/statistics/scene`
+  //   location.href = loginHref + '?redirect=' + escape(location.href)
+  // }
 };
 };
 
 
 addReqErrorHandler((err) => {
 addReqErrorHandler((err) => {