6
0
yusheng 4 сар өмнө
parent
commit
c079998e43

+ 4 - 4
src/utils/request.js

@@ -60,9 +60,9 @@ service.interceptors.response.use(
     // 登录过期处理
     // 登录过期处理
     if (error?.response?.status === 401) {
     if (error?.response?.status === 401) {
       const currentPath = router.currentRoute.path;
       const currentPath = router.currentRoute.path;
-      if (currentPath === LAYOUT_PATH) {
-        logout(true);
-      } else {
+      // if (currentPath === LAYOUT_PATH) {
+      //   logout(true);
+      // } else {
         MessageBox.alert('登录状态已过期, 请退出重新登录!', '系统提示', {
         MessageBox.alert('登录状态已过期, 请退出重新登录!', '系统提示', {
           confirmButtonText: '重新登录',
           confirmButtonText: '重新登录',
           callback: (action) => {
           callback: (action) => {
@@ -74,7 +74,7 @@ service.interceptors.response.use(
             MessageBox.close();
             MessageBox.close();
           }
           }
         });
         });
-      }
+      // }
       return Promise.reject(new Error(error.response.data?.message));
       return Promise.reject(new Error(error.response.data?.message));
     } else if (!error?.response?.status) {
     } else if (!error?.response?.status) {
       Message.error('服务调用失败,请联系管理员!');
       Message.error('服务调用失败,请联系管理员!');