刘翔宇-旅管家 3 years ago
parent bb25d6c020
commit 9eb0c00ed2

@ -30,9 +30,10 @@ router.beforeEach(async (to, from, next) => {
if (hasToken) {
if (to.path === '/login') {
// if is logged in, redirect to the home page
next({
path: '/'
})
await store.dispatch('user/resetToken');
next(to.fullPath)
NProgress.done()
} else {
// determine whether the user has obtained his permission roles through getInfo

Loading…
Cancel
Save