bug fix
This commit is contained in:
@ -42,12 +42,21 @@ router.beforeEach((to, from, next) => {
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
useUserStore()
|
||||
.logOut()
|
||||
.then(() => {
|
||||
ElMessage.error(err);
|
||||
next({ path: "/" });
|
||||
});
|
||||
if (err === "您已被挤下线") {
|
||||
useUserStore()
|
||||
.abnormalLogOut()
|
||||
.then(() => {
|
||||
ElMessage.error(err);
|
||||
next({ path: "/" });
|
||||
});
|
||||
} else {
|
||||
useUserStore()
|
||||
.logOut()
|
||||
.then(() => {
|
||||
ElMessage.error(err);
|
||||
next({ path: "/" });
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
next();
|
||||
|
Reference in New Issue
Block a user