fix: 修复已知BUG

This commit is contained in:
kailong321200875
2023-03-03 16:19:33 +08:00
parent 772e2439fa
commit 782b8e2f94
6 changed files with 68 additions and 19 deletions

View File

@@ -30,11 +30,6 @@ router.beforeEach(async (to, from, next) => {
if (to.path === '/login') {
next({ path: '/' })
} else {
if (permissionStore.getIsAddRouters) {
next()
return
}
if (!dictStore.getIsSetDict) {
// 获取所有字典
const res = await getDictApi()
@@ -43,6 +38,10 @@ router.beforeEach(async (to, from, next) => {
dictStore.setIsSetDict(true)
}
}
if (permissionStore.getIsAddRouters) {
next()
return
}
// 开发者可根据实际情况进行修改
const roleRouters = wsCache.get('roleRouters') || []