🔨 添加连接操作.

This commit is contained in:
lijiahangmax
2024-12-26 22:19:30 +08:00
parent 8f1e976c2f
commit 4d08a18548
10 changed files with 56 additions and 26 deletions

View File

@@ -69,8 +69,10 @@ axios.interceptors.response.use(
if (!responseUrl || !responseUrl.includes('/logout')) {
await useUserStore().logout();
}
// 重新加载自动跳转登录页面
window.location.reload();
// 非登录页面就重新加载, 会自动跳转登录页面
if (!window.location.pathname.includes('/login')) {
window.location.reload();
}
});
} else {
// 其他异常 判断是否弹出错误信息