fix: redirect path in permission
parent
0caa975ee2
commit
3cfe8bed60
|
@ -49,7 +49,7 @@ router.beforeEach(async(to, from, next) => {
|
|||
// remove token and go to login page to re-login
|
||||
await store.dispatch('user/resetToken')
|
||||
Message.error(error || 'Has Error')
|
||||
next(`/login?redirect=${to.path}`)
|
||||
next(`/login?redirect=${to.fullPath}`)
|
||||
NProgress.done()
|
||||
}
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ router.beforeEach(async(to, from, next) => {
|
|||
next()
|
||||
} else {
|
||||
// other pages that do not have permission to access are redirected to the login page.
|
||||
next(`/login?redirect=${to.path}`)
|
||||
next(`/login?redirect=${to.fullPath}`)
|
||||
NProgress.done()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue