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