fetch(modify):修改bug
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 6m6s

This commit is contained in:
sexygoat
2026-01-31 18:12:58 +08:00
parent ecb79dae43
commit 882feaf3ff
8 changed files with 452 additions and 305 deletions

View File

@@ -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)