From 6f9037d0a97f2cad271e933fb6c1aacf4cf6cd5d Mon Sep 17 00:00:00 2001 From: ZhangYong Date: Sun, 5 Apr 2026 11:45:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 4 ++-- src/utils/menuUtils.js | 14 +++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index d995309..9859671 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -542,8 +542,8 @@ router.beforeEach(async (to, from, next) => { const requiresPermission = to.meta && to.meta.permissionId; if (requiresPermission) { const hasPermission = Array.isArray(requiresPermission) - ? requiresPermission.some(id => userPermissionIds.includes(id)) - : userPermissionIds.includes(requiresPermission); + ? requiresPermission.some(id => userPermissionIds.some(uid => String(uid) === String(id))) + : userPermissionIds.some(uid => String(uid) === String(requiresPermission)); if (!hasPermission) { next('/noPermission'); diff --git a/src/utils/menuUtils.js b/src/utils/menuUtils.js index 919febc..612c42d 100644 --- a/src/utils/menuUtils.js +++ b/src/utils/menuUtils.js @@ -86,7 +86,19 @@ export const getRoutePath = (menu) => { "149": "/moneyManage/financialAccount/performanceAttribution", // 业绩归属账(财务核算子菜单) "125": "/channelManage/reward", // 打赏管理(频道管理子菜单) "126": "/channelManage/fans", // 铁粉管理(频道管理子菜单) - "127": "/channelManage/cart" // 小黄车管理(频道管理子菜单) + "127": "/channelManage/cart", // 小黄车管理(频道管理子菜单) + "150": "/walletManage", // 钱包管理 + "151": "/walletManage/walletBalance", // 钱包余额 + "152": "/walletManage/walletDetail", // 钱包明细 + "153": "/walletManage/walletDetail/hkWallet", // 香港钱包 + "154": "/walletManage/walletDetail/sgWalletHC", // 新加坡HC钱包 + "155": "/walletManage/walletDetail/sgWalletCM", // 新加坡CM钱包 + "156": "/walletManage/walletDetail/myWallet", // 马来西亚钱包 + "157": "/walletManage/walletDetail/caWallet", // 加拿大钱包 + "158": "/walletManage/walletDetail/thWalletHS", // 泰国HS钱包 + "159": "/walletManage/walletDetail/thWalletHA", // 泰国HA钱包 + "160": "/walletManage/walletDetail/vnWallet", // 越南钱包 + "161": "/walletManage/walletDetail/bjWallet" // 北京钱包 }; // 从映射表中匹配路由,无匹配时返回无权限页面路径