chore: save work before switching to dev

This commit is contained in:
2026-04-24 09:36:56 +08:00
parent 9e45acf60b
commit 415ba67d01
14 changed files with 587 additions and 583 deletions

View File

@@ -95,7 +95,8 @@ router.beforeEach(async (to, from, next) => {
} else {
if (!token) {
next(`/login?redirect=${to.path}&params=${JSON.stringify(to.query ? to.query : to.params)}`);
Session.clear();
// 进入受保护页面但本地已没有 token 时,只清理登录态缓存即可。
Session.clearAuth();
NProgress.done();
} else if (token && to.path === '/login') {
next('/home');