修改公共配置字典

This commit is contained in:
wuweihua
2026-09-08 10:51:20 +08:00
parent 647be14d66
commit 38796d8683
25 changed files with 389 additions and 80 deletions
+4
View File
@@ -9,6 +9,7 @@ import useUserStore from '@/store/modules/user'
import useLockStore from '@/store/modules/lock'
import useSettingsStore from '@/store/modules/settings'
import usePermissionStore from '@/store/modules/permission'
import useDictStore from '@/store/modules/dict'
NProgress.configure({ showSpinner: false })
@@ -43,6 +44,8 @@ router.beforeEach(async (to, from) => {
try {
// 拉取user_info信息
await useUserStore().getInfo()
// 全量字典单独接口,按 dictType code 本地匹配
await useDictStore().loadAllDicts()
isRelogin.show = false
// 根据roles权限生成可访问的路由
const accessRoutes = await usePermissionStore().generateRoutes()
@@ -57,6 +60,7 @@ router.beforeEach(async (to, from) => {
return { ...to, replace: true }
} catch (err) {
await useUserStore().logOut()
useDictStore().cleanDict()
ElMessage.error(err)
return { path: '/' }
}