refactor: ♻️ 获取用户信息和登出清除会话优化
Former-commit-id: 4486879b3beb4d26b7a41cffd4e0b4b022e1943d
This commit is contained in:
@@ -46,8 +46,10 @@ service.interceptors.response.use(
|
||||
confirmButtonText: "确定",
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
localStorage.clear();
|
||||
window.location.href = "/";
|
||||
const userStore = useUserStoreHook();
|
||||
userStore.resetToken().then(() => {
|
||||
location.reload();
|
||||
});
|
||||
});
|
||||
} else {
|
||||
ElMessage.error(msg || "系统出错");
|
||||
|
||||
Reference in New Issue
Block a user