This commit is contained in:
zlwu committed 2026-07-12 12:04:43 +08:00
1 parent 7b1d4c8729
commit ffc89d9b57
75 files changed
+12263 -7950

No files matched your search

+22 -2
View File
@@ -280,9 +280,29 @@ async function handleDynamicRoutes(
// 2. 获取菜单数据
const menuList = await menuProcessor.getMenuList()
// 3. 验证菜单数据
// 3. 无菜单权限(如未绑定角色):允许空菜单并完成初始化,跳转 403
if (!menuProcessor.validateMenuList(menuList)) {
throw new Error('获取菜单列表失败,请重新登录')
routeRegistry?.register([])
const menuStore = useMenuStore()
menuStore.setMenuList([])
menuStore.addRemoveRouteFns(routeRegistry?.getRemoveRouteFns() || [])
IframeRouteManager.getInstance().save()
useWorktabStore().validateWorktabs(router)
routeInitInProgress = false
closeLoading()
if (isStaticRoute(to.path)) {
next({
path: to.path,
query: to.query,
hash: to.hash,
replace: true
})
return
}
next({ path: '/403', replace: true })
return
}
// 4. 注册动态路由