fix[permission]: set NProgress.done #79
This commit is contained in:
parent
6fa3f1041c
commit
f4514a66cf
|
@ -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 => { // 拉取用户信息
|
||||
|
|
Loading…
Reference in New Issue