src/permission.js
@@ -26,7 +26,7 @@ } else if (isWhiteList(to.path)) { next() } else { if (store.getters.roles.length === 0) { if (store.getters.roles.length === 0) { isRelogin.show = true // 判断当前用户是否已拉取完user_info信息 store.dispatch('GetInfo').then(() => { @@ -42,8 +42,12 @@ next({ path: '/' }) }) }) } else { next() } else { if (store.getters.isLock && to.path !=='/lock') { next('/lock') } else { next() } } } } else {