This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user