fix[permission]: set NProgress.done #79

This commit is contained in:
Pan 2018-04-18 13:44:55 +08:00
parent 6fa3f1041c
commit f4514a66cf
1 changed files with 1 additions and 0 deletions

View File

@ -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 => { // 拉取用户信息