diff --git a/src/permission.js b/src/permission.js index 750aeab6..61ce293f 100644 --- a/src/permission.js +++ b/src/permission.js @@ -24,7 +24,6 @@ router.beforeEach(async(to, from, next) => { if (to.path === '/login') { // if is logged in, redirect to the home page next({ path: '/' }) - NProgress.done() } else { // determine whether the user has obtained his permission roles through getInfo const hasRoles = store.getters.roles && store.getters.roles.length > 0 @@ -50,7 +49,6 @@ router.beforeEach(async(to, from, next) => { await store.dispatch('user/resetToken') Message.error(error || 'Has Error') next(`/login?redirect=${to.path}`) - NProgress.done() } } } @@ -63,7 +61,6 @@ router.beforeEach(async(to, from, next) => { } else { // other pages that do not have permission to access are redirected to the login page. next(`/login?redirect=${to.path}`) - NProgress.done() } } })