🐛fix(*): 优化登陆失效后跳转到登陆界面到问题
This commit is contained in:
parent
6a9d588223
commit
6eaddcbd58
@ -41,9 +41,10 @@ router.beforeEach(async(to, from, next) => {
|
||||
// 删除token,然后转到登录页面重新登录
|
||||
await store.dispatch('user/resetToken')
|
||||
if (to.path === '/404') {
|
||||
to.path = '/'
|
||||
next(`/login`)
|
||||
} else {
|
||||
next(`/login?redirect=${to.path}`)
|
||||
}
|
||||
next(`/login?redirect=${to.path}`)
|
||||
NProgress.done()
|
||||
}
|
||||
}
|
||||
@ -102,6 +103,7 @@ function findPath(menuList, to, parentPath){
|
||||
}
|
||||
}
|
||||
if(parentPath){
|
||||
console.log("parentPath", parentPath)
|
||||
menu.path = parentPath + '/' + menu.path
|
||||
}
|
||||
if(menu.path === to) return true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user