|
|
@ -10,7 +10,6 @@ import { asyncRoutes } from '@/router' |
|
|
|
NProgress.configure({ |
|
|
|
showSpinner: false |
|
|
|
}) // NProgress Configuration
|
|
|
|
|
|
|
|
router.beforeEach(async (to, from, next) => { |
|
|
|
// start progress bar
|
|
|
|
NProgress.start() |
|
|
@ -19,7 +18,9 @@ router.beforeEach(async (to, from, next) => { |
|
|
|
|
|
|
|
// 获取表头转义
|
|
|
|
if(!store.getters.columZHList || store.getters.columZHList.length <= 0){ |
|
|
|
await store.dispatch('definition/getColumZHList') |
|
|
|
await store.dispatch('definition/getColumZHList',()=>{ |
|
|
|
NProgress.done() |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
// 获取菜单数据
|
|
|
@ -74,6 +75,7 @@ router.beforeEach(async (to, from, next) => { |
|
|
|
console.log("-------用户信息获取成功-------") |
|
|
|
localStorage.setItem('alreadyTryLogin',true) |
|
|
|
next(to) |
|
|
|
NProgress.done() |
|
|
|
// next({
|
|
|
|
// ...to,
|
|
|
|
// query:{
|
|
|
@ -114,6 +116,7 @@ router.beforeEach(async (to, from, next) => { |
|
|
|
}, |
|
|
|
replace: true |
|
|
|
}) |
|
|
|
NProgress.done() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|