优化系统:解决登录状态超时(获取清理浏览器缓存)之后重新登录,出现页面按钮丢失的bug
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user