fetch(modify):修改bug
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 6m6s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 6m6s
This commit is contained in:
@@ -239,6 +239,15 @@ async function processBackendMenu(router: Router): Promise<void> {
|
||||
|
||||
try {
|
||||
const userStore = useUserStore()
|
||||
|
||||
// 如果是超级管理员(user_type === 1),直接使用所有 asyncRoutes
|
||||
if (userStore.isSuperAdmin) {
|
||||
const menuList = asyncRoutes.map((route) => menuDataToRouter(route))
|
||||
await registerAndStoreMenu(router, menuList, closeLoading)
|
||||
return
|
||||
}
|
||||
|
||||
// 普通用户:使用后端返回的菜单
|
||||
const backendMenus = userStore.menus || []
|
||||
const routeMap = buildRouteMap(asyncRoutes)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user