loading页面修复
This commit is contained in:
parent
ae3a1a63bb
commit
a38c1e9da0
@ -24,7 +24,8 @@ export const PAGES = {
|
||||
EXCHANGE: '/exchange-gold-coins',
|
||||
PERSONAL_SALARY: '/platform-policy',
|
||||
HOST_SETTING: '/host-setting',
|
||||
NOT_APP: '/not_app'
|
||||
NOT_APP: '/not_app',
|
||||
LOADING: '/loading',
|
||||
}
|
||||
|
||||
// 🎯 核心改变:基于身份的权限配置
|
||||
@ -89,7 +90,13 @@ export const ROLE_PERMISSIONS = {
|
||||
// 公共页面(所有身份都可以访问)
|
||||
PUBLIC_PAGES: [
|
||||
PAGES.NOT_APP, // 错误页面
|
||||
],
|
||||
|
||||
// 加载页面
|
||||
LOADING_PAGE: [
|
||||
PAGES.LOADING
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
// 身份优先级(数字越大优先级越高)
|
||||
@ -219,6 +226,11 @@ class RoleBasedPermissionManager {
|
||||
allowedPages.add(page)
|
||||
})
|
||||
|
||||
// 添加loading页面
|
||||
ROLE_PERMISSIONS.LOADING_PAGE.forEach(page => {
|
||||
allowedPages.add(page)
|
||||
})
|
||||
|
||||
// 根据用户拥有的每个身份,添加对应的页面权限
|
||||
roles.forEach(role => {
|
||||
const rolePages = ROLE_PERMISSIONS[role] || []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user