功能变化: 优化权限加载问题

pull/102/head
李强 2023-07-17 14:09:15 +08:00
parent c8214fc25f
commit de7448ec5f
1 changed files with 2 additions and 2 deletions

View File

@ -56,11 +56,11 @@ router.beforeEach(async (to, from, next) => {
})
await store.dispatch('d2admin/user/set', res.data, { root: true })
await store.dispatch('d2admin/account/load')
await store.dispatch('d2admin/permission/load', routes)
store.dispatch('d2admin/dept/load')
store.dispatch('d2admin/settings/init')
}
if (!store.state.d2admin.menu || store.state.d2admin.menu.aside.length === 0) {
await store.dispatch('d2admin/permission/load', routes)
await store.dispatch('d2admin/dept/load')
// 动态添加路由
getMenu().then(ret => {
// 校验路由是否有效