@ -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