Hwt 2 vuotta sitten
vanhempi
commit
2cfcabfad7
1 muutettua tiedostoa jossa 9 lisäystä ja 3 poistoa
  1. 9 3
      operationSupport/src/utils/http.js

+ 9 - 3
operationSupport/src/utils/http.js

@@ -69,7 +69,9 @@ http.interceptors.response.use(
                             window.relogin = false;
                             localStorage.removeItem('CZC_token');
                         })
-                        .catch(() => {});
+                        .catch(() => {
+                            window.open(config.loginUrl, '_self');
+                        });
                 } else if (data == 1) {
                     ELEMENT.MessageBox('该账号已在其他地址登录,如需访问请重新登录', '提示', 'warning', {
                         confirmButtonText: '确定',
@@ -82,7 +84,9 @@ http.interceptors.response.use(
                             sessionStorage.removeItem('tabs');
                             localStorage.removeItem('menupath');
                         })
-                        .catch(() => {});
+                        .catch(() => {
+                            window.open(config.loginUrl, '_self');
+                        });
                 } else {
                     Vue.prototype
                         .$msgBox('你的账号已被停用,如有问题请联系管理员', '', 'warning', {
@@ -96,7 +100,9 @@ http.interceptors.response.use(
                             window.relogin = false;
                             localStorage.removeItem('CZC_token');
                         })
-                        .catch(() => {});
+                        .catch(() => {
+                            window.open(config.loginUrl, '_self');
+                        });
                 }
             });
             return;