|
@@ -65,9 +65,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) => {
|
|
@@ -79,7 +79,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('服务器调用失败,请联系管理人员!');
|