|
@@ -36,7 +36,7 @@ router.beforeEach(async (to, from, next) => {
|
|
|
} catch (error) {
|
|
|
// 移除 token 并跳转登录页
|
|
|
await userStore.resetToken();
|
|
|
- next(`/login?redirect=${to.path}`);
|
|
|
+ next("/login?redirect=/");
|
|
|
NProgress.done();
|
|
|
}
|
|
|
} else {
|
|
@@ -50,7 +50,7 @@ router.beforeEach(async (to, from, next) => {
|
|
|
if (whiteList.indexOf(to.path) !== -1) {
|
|
|
next();
|
|
|
} else {
|
|
|
- next(`/login?redirect=${to.path}`);
|
|
|
+ next("/login?redirect=/");
|
|
|
NProgress.done();
|
|
|
}
|
|
|
}
|