1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-04-05 11:18:42 +08:00

Merge 3cfe8bed60cf93c76ce6317379eefe8c07bd9245 into 6858a9ad67483025f6a9432a926beb9327037be3

This commit is contained in:
行舟 2024-11-28 00:30:15 +00:00 committed by GitHub
commit 9b2fd87f54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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