提交
This commit is contained in:
1 parent
7b1d4c8729
commit
ffc89d9b57
75 files changed
+12263
-7950
No files matched your search
@@ -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. 注册动态路由
|
||||
|
||||
Reference in new issue
Block a user