diff --git a/src/permission.js b/src/permission.js index 4b9e5b1..8731d0d 100644 --- a/src/permission.js +++ b/src/permission.js @@ -11,6 +11,7 @@ router.beforeEach((to, from, next) => { if (getToken()) { if (to.path === '/login') { next({ path: '/' }) + NProgress.done() // if current page is dashboard will not trigger afterEach hook, so manually handle it } else { if (store.getters.roles.length === 0) { store.dispatch('GetInfo').then(res => { // 拉取用户信息