优化系统:解决登录状态超时(获取清理浏览器缓存)之后重新登录,出现页面按钮丢失的bug

This commit is contained in:
季圣华
2022-01-09 18:47:38 +08:00
parent a00a505b4a
commit ae77bf873a
3 changed files with 4 additions and 4 deletions

View File

@@ -42,7 +42,7 @@ router.beforeEach((to, from, next) => {
description: '请求用户信息失败,请重试!'
})*/
store.dispatch('Logout').then(() => {
next({ path: '/user/login', query: { redirect: to.fullPath } })
next({ path: '/user/login' })
})
})
} else {
@@ -57,7 +57,7 @@ router.beforeEach((to, from, next) => {
// 在免登录白名单,直接进入
next()
} else {
next({ path: '/user/login', query: { redirect: to.fullPath } })
next({ path: '/user/login' })
NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it
}
}