fix: 优化审计
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 3m42s

This commit is contained in:
luo
2026-08-11 16:47:58 +08:00
parent 9599a4d52b
commit 33485b137f
49 changed files with 1263 additions and 212 deletions

View File

@@ -14,6 +14,7 @@ import { loadingService } from '@/utils/ui'
import { useCommon } from '@/composables/useCommon'
import { useWorktabStore } from '@/store/modules/worktab'
import { isInWhiteList, hasRoutePermission, isTokenValid, buildLoginRedirect } from './permission'
import { isPlatformAuditAccount } from '@/utils/business/auditAccess'
// 是否已注册动态路由
const isRouteRegistered = ref(false)
@@ -95,6 +96,14 @@ async function handleRouteGuard(
return
}
if (
to.path.startsWith('/audit') &&
!isPlatformAuditAccount(userStore.info.user_type, userStore.isSuperAdmin)
) {
next(RoutesAlias.Exception403 || '/exception/403')
return
}
// 处理动态路由注册
if (!isRouteRegistered.value && userStore.isLogin) {
await handleDynamicRoutes(to, router, next)