This commit is contained in:
史典卓
2024-10-25 17:49:32 +08:00
parent 66ccedfd95
commit 233263750c
4 changed files with 24 additions and 23 deletions

View File

@@ -61,10 +61,10 @@ axios.interceptors.response.use(
if (statusWhiteList.includes(status)) return Promise.reject(res);
//如果是401则跳转到登录页面
if (status === 401) {
store.dispatch('FedLogOut').then(() => {
window.location.href = process.env.VUE_APP_LOGIN_NEXT
});
// store.dispatch('FedLogOut').then(() => router.push({path: '/login'}));
// store.dispatch('FedLogOut').then(() => {
// window.location.href = process.env.VUE_APP_LOGIN_NEXT
// });
store.dispatch('FedLogOut').then(() => router.push({path: '/login'}));
}
// 如果请求为500统一处理
const err = new Error(message)