刘洋 9 ماه پیش
والد
کامیت
f66114e1c7
4فایلهای تغییر یافته به همراه6 افزوده شده و 4 حذف شده
  1. 1 1
      src/main/preload/index.ts
  2. 0 1
      src/render/components.d.ts
  3. 4 1
      src/render/utils/request.ts
  4. 1 1
      src/render/views/Login/LoginWays.vue

+ 1 - 1
src/main/preload/index.ts

@@ -50,7 +50,7 @@ contextBridge.exposeInMainWorld("electronApi", {
     let scanExeFold: string = isDev
       ? process.cwd()
       : process.env.PORTABLE_EXECUTABLE_DIR || "";
-    const exePath = path.join(scanExeFold as string, "test.exe");
+    const exePath = path.join(scanExeFold as string, "client.exe");
     console.log("exePath", exePath);
     ipcRenderer.send("startExe", exePath + " " + arr.join(" "));
   },

+ 0 - 1
src/render/components.d.ts

@@ -28,7 +28,6 @@ declare module 'vue' {
     ARow: typeof import('@qmth/ui')['Row']
     ASelect: typeof import('@qmth/ui')['Select']
     ASpace: typeof import('@qmth/ui')['Space']
-    ASpaceCompact: typeof import('@qmth/ui')['SpaceCompact']
     ASpin: typeof import('@qmth/ui')['Spin']
     ATable: typeof import('@qmth/ui')['Table']
     ATableSummaryCell: typeof import('@qmth/ui')['TableSummaryCell']

+ 4 - 1
src/render/utils/request.ts

@@ -105,8 +105,8 @@ function createService() {
               : text
           );
       };
+      const userStore = useUserStore();
       if (error.response) {
-        const userStore = useUserStore();
         switch (error.response.status) {
           case 404:
             err(`服务器资源不存在`);
@@ -127,6 +127,9 @@ function createService() {
         }
       } else {
         err("请求超时,服务器无响应!");
+        local.remove("baseUrl");
+        userStore.setUserInfo(null);
+        router.replace({ name: "Login" });
       }
       return Promise.reject(
         error.response && error.response.data ? error.response.data : null

+ 1 - 1
src/render/views/Login/LoginWays.vue

@@ -84,7 +84,7 @@ const nextStep = async () => {
         spinning: false,
         tip: "",
       };
-    }, 1000);
+    }, 10000);
     //同时监测进程,如果发现扫描端启动了,立刻关掉全屏loading,且关掉本项目
     try {
       let result = await window.electronApi?.watchScanProcess();