fix: redirect path in permission

pull/4021/head
hezhouhang 2022-06-21 16:45:04 +08:00
parent 0caa975ee2
commit 3cfe8bed60
1 changed files with 2 additions and 2 deletions

View File

@ -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()
}
}