diff --git a/src/router/index.js b/src/router/index.js
index e3f4092..91d7f9c 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -94,12 +94,6 @@ const router = createRouter({
component: () => import('../views/Wallet/Detail/InformationDetails.vue'),
meta: { requiresAuth: true },
},
- {
- path: '/invite-members',
- name: 'invite-members',
- component: () => import('../views/AgencyCenter/InviteMembersProcess.vue'),
- meta: { requiresAuth: true },
- },
{
path: '/team-bill',
name: 'team-bill',
@@ -203,24 +197,12 @@ const router = createRouter({
component: () => import('../views/Ranking/Overall/Ranking.vue'),
meta: { requiresAuth: true },
},
- {
- path: '/invite-agency',
- name: 'invite-agency',
- component: () => import('../views/Invitation/inviteAgency.vue'),
- meta: { requiresAuth: true },
- },
{
path: '/recharge-agency-recruit',
name: 'recharge-agency-recruit',
component: () => import('../views/RechargeAgency/Recruit.vue'),
meta: { requiresAuth: true },
},
- {
- path: '/invitation-to-register',
- name: 'invitation-to-register',
- component: () => import('../views/Invitation/InviteToRegister.vue'),
- meta: { requiresAuth: true },
- },
{
path: '/lottery',
name: 'lottery',
@@ -264,9 +246,9 @@ const router = createRouter({
meta: { requiresAuth: true },
},
{
- path: '/invite-bd',
- name: 'invite-bd',
- component: () => import('../views/Invitation/inviteBD.vue'),
+ path: '/invitation-to-register',
+ name: 'invitation-to-register',
+ component: () => import('../views/Invitation/InviteToRegister.vue'),
meta: { requiresAuth: true },
},
{
@@ -275,6 +257,30 @@ const router = createRouter({
component: () => import('../views/Invitation/inviteBDLeader.vue'),
meta: { requiresAuth: true },
},
+ {
+ path: '/invite-bd',
+ name: 'invite-bd',
+ component: () => import('../views/Invitation/inviteBD.vue'),
+ meta: { requiresAuth: true },
+ },
+ {
+ path: '/invite-recharge-agency',
+ name: 'invite-recharge-agency',
+ component: () => import('../views/Invitation/inviteRechargeAgency.vue'),
+ meta: { requiresAuth: true },
+ },
+ {
+ path: '/invite-agency',
+ name: 'invite-agency',
+ component: () => import('../views/Invitation/inviteAgency.vue'),
+ meta: { requiresAuth: true },
+ },
+ {
+ path: '/invite-members',
+ name: 'invite-members',
+ component: () => import('../views/AgencyCenter/InviteMembersProcess.vue'),
+ meta: { requiresAuth: true },
+ },
{
path: '/policy',
name: 'policy',
diff --git a/src/utils/permissionManager.js b/src/utils/permissionManager.js
index a7ccc0e..81e729d 100644
--- a/src/utils/permissionManager.js
+++ b/src/utils/permissionManager.js
@@ -38,6 +38,7 @@ export const PAGES = {
// 邀请页面
const INVITATION_PAGES = {
INVITE_USER: '/invitation-to-register', //邀请新用户(邀请码)
+ INVITE_RECHARGE_AGENCY: '/invite-recharge-agency', //邀请代理
INVITE_AGENCY: '/invite-agency', //邀请代理
INVITE_BD: '/invite-bd', //邀请成为BD
INVITE_BDLEADER: '/invite-bd-leader', //邀请成为BDLeader
@@ -61,27 +62,35 @@ const ACTIVITIES = [
// 🎯 核心改变:基于身份的权限配置
// 每个身份拥有的页面权限列表
export const ROLE_PERMISSIONS = {
- // Freight Agent (充值代理Rechange Agency/货运代理Freight Agent/金币销售员Coin Seller)
- [USER_ROLES.FREIGHT_AGENT]: [
- PAGES.COIN_SELLER, // 主页面
- '/seller-records',
- '/coin-seller-search',
+ // 公共页面(所有身份都可以访问)
+ PUBLIC_PAGES: [
+ PAGES.APPLY, //申请主播页面
+ PAGES.NOT_APP, // 错误页面
+ PAGES.PAY_RESULT, // 支付成功页面
+ PAGES.MAP, // 地图选择页面
+ ...ACTIVITIES, //活动页面
+ '/recharge',
'/recharge-freight-agent',
+ '/recharge-agency-recruit', //充值代理介绍页面
+ '/search-payee', //搜索收款人
+ '/cash-out', // 提现页面
+ '/cash-out-details', //提现详情页面
+ '/KYC', //提现资料提交
+ '/bank-card', //选择银行卡
],
- // Agent (代理商)
- [USER_ROLES.AGENT]: [
- PAGES.AGENCY_CENTER, // 主页面
- PAGES.TRANSFER, // 转账功能
- PAGES.EXCHANGE, // 兑换功能
- PAGES.MESSAGE, // 消息功能
- PAGES.PERSONAL_SALARY, // 个人薪资查看
- PAGES.AGENCY_SETTING, // 主播设置
- '/team-member',
- '/information-details',
- '/history-salary',
- '/invite-members',
- '/team-bill',
+ // Admin(管理员)
+ [USER_ROLES.ADMIN]: [
+ PAGES.ADMIN_CENTER, //管理员中心
+ INVITATION_PAGES.INVITE_BDLEADER, //邀请成为BDLeader
+ INVITATION_PAGES.INVITE_BD, //邀请成为BD
+ INVITATION_PAGES.INVITE_RECHARGE_AGENCY, //邀请金币代理
+ INVITATION_PAGES.INVITE_AGENCY, //邀请代理
+ '/item-distribution', //赠送商品页面
+ '/my-BDLeader-teams', //我的BDLeader团队页面
+ '/my-BD-teams', //我的BD团队页面
+ '/my-agency-teams', //我的代理团队页面
+ '/my-recharge-agency', //我的金币代理团队页面
],
// BD (商务拓展)
@@ -102,12 +111,35 @@ export const ROLE_PERMISSIONS = {
get [USER_ROLES.BDLEADER]() {
return [
PAGES.BD_LEADER_CENTER, // 主页面
+ INVITATION_PAGES.INVITE_BDLEADER, //邀请成为BDLeader
INVITATION_PAGES.INVITE_BD, //邀请成为BD
...this[USER_ROLES.BD],
]
},
+ // Freight Agent (充值代理Rechange Agency/货运代理Freight Agent/金币代理Coin Seller)
+ [USER_ROLES.FREIGHT_AGENT]: [
+ PAGES.COIN_SELLER, // 主页面
+ '/seller-records',
+ '/coin-seller-search',
+ '/recharge-freight-agent',
+ ],
- // Anchor (主播)
+ // Agency (代理商)
+ [USER_ROLES.AGENT]: [
+ PAGES.AGENCY_CENTER, // 主页面
+ PAGES.TRANSFER, // 转账功能
+ PAGES.EXCHANGE, // 兑换功能
+ PAGES.MESSAGE, // 消息功能
+ PAGES.PERSONAL_SALARY, // 个人薪资查看
+ PAGES.AGENCY_SETTING, // 主播设置
+ '/team-member',
+ '/information-details',
+ '/history-salary',
+ '/invite-members',
+ '/team-bill',
+ ],
+
+ // Host (主播)
[USER_ROLES.ANCHOR]: [
PAGES.HOST_CENTER, // 主页面
PAGES.TRANSFER, // 转账功能
@@ -121,41 +153,11 @@ export const ROLE_PERMISSIONS = {
'/team-bill',
],
- // Admin(管理员)
- [USER_ROLES.ADMIN]: [
- PAGES.ADMIN_CENTER, //管理员中心
- INVITATION_PAGES.INVITE_BDLEADER, //邀请成为BDLeader
- INVITATION_PAGES.INVITE_BD, //邀请成为BD
- INVITATION_PAGES.INVITE_AGENCY, //邀请代理
- '/item-distribution', //赠送商品页面
- '/my-BDLeader-teams', //我的BDLeader团队页面
- '/my-BD-teams', //我的BD团队页面
- '/my-agency-teams', //我的代理团队页面
- '/my-recharge-agency', //我的金币代理团队页面
- ],
-
// Guest (访客/申请者)
[USER_ROLES.GUEST]: [
PAGES.APPLY, // 申请页面
],
- // 公共页面(所有身份都可以访问)
- PUBLIC_PAGES: [
- PAGES.APPLY, //申请主播页面
- PAGES.NOT_APP, // 错误页面
- PAGES.PAY_RESULT, // 支付成功页面
- PAGES.MAP, // 地图选择页面
- ...ACTIVITIES, //活动页面
- '/recharge',
- '/recharge-freight-agent',
- '/recharge-agency-recruit', //充值代理介绍页面
- '/search-payee', //搜索收款人
- '/cash-out', // 提现页面
- '/cash-out-details', //提现详情页面
- '/KYC', //提现资料提交
- '/bank-card', //选择银行卡
- ],
-
// 加载页面
LOADING_PAGE: [PAGES.LOADING],
}
diff --git a/src/views/AdminCenter/index.vue b/src/views/AdminCenter/index.vue
index 9ec09b5..ded27a7 100644
--- a/src/views/AdminCenter/index.vue
+++ b/src/views/AdminCenter/index.vue
@@ -185,6 +185,7 @@
alt=""
style="display: block; width: 1.6em"
class="flipImg"
+ @click="gotoPage('/invite-bd-leader')"
/>
+