dedsudiyu 1 anno fa
parent
commit
f35d9933f7
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      src/utils/request.js

+ 3 - 1
src/utils/request.js

@@ -55,6 +55,9 @@ service.interceptors.request.use(config => {
   }
   }
   // 弹层相关
   // 弹层相关
   loadingCount ++;
   loadingCount ++;
+  if(config.url == '/auth/logout'){
+    window.location.href = 'http://192.168.1.43/labSystem/auth/login';
+  }
   return config
   return config
 }, error => {
 }, error => {
   // 弹层相关
   // 弹层相关
@@ -83,7 +86,6 @@ service.interceptors.response.use(res => {
     //   return
     //   return
     // }
     // }
     if(res.config.url == '/auth/logout'&&res.request.responseURL){
     if(res.config.url == '/auth/logout'&&res.request.responseURL){
-      debugger
       window.location.href = res.request.responseURL;
       window.location.href = res.request.responseURL;
       return
       return
     }
     }