dedsudiyu 1 vuosi sitten
vanhempi
commit
f35d9933f7
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      src/utils/request.js

+ 3 - 1
src/utils/request.js

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