diff --git a/src/components/locales/lang/en.js b/src/components/locales/lang/en.js index 5821b36..27345e4 100644 --- a/src/components/locales/lang/en.js +++ b/src/components/locales/lang/en.js @@ -911,6 +911,8 @@ export default { clientCount: { clientCountBalance: "Coin Balance", clientCountDetail: "Coin Details", + // 客户钱包 --------------------------------- + clientCountWallet: "Wallet", recharge: "Recharge", consume: "Consume", refund: "Refund", diff --git a/src/components/locales/lang/zh-CN.js b/src/components/locales/lang/zh-CN.js index ef52e04..0c0e312 100644 --- a/src/components/locales/lang/zh-CN.js +++ b/src/components/locales/lang/zh-CN.js @@ -918,6 +918,8 @@ export default { clientCountBalance: "金币余额", // 客户统计明细 --------------------------------- clientCountDetail: "金币明细", + // 客户钱包 --------------------------------- + clientCountWallet: "钱包", recharge: "充值", consume: "消耗", refund: "退款", diff --git a/src/router/index.js b/src/router/index.js index d739a6f..d995309 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -243,6 +243,13 @@ const routes = [ component: () => import("../views/usergold/gold/clientCountBalance.vue"), meta: {permissionId: 53} }, + // 客户钱包 + { + path: 'wallet', + name: "clientCountWallet", + component: () => import("../views/usergold/gold/clientCountWallet.vue"), + meta: {permissionId: 150} + } ] }, { diff --git a/src/utils/menuTreePermission.js b/src/utils/menuTreePermission.js index f72027c..82cbc60 100644 --- a/src/utils/menuTreePermission.js +++ b/src/utils/menuTreePermission.js @@ -61,6 +61,7 @@ export const permissionMapping = { gold_coin_customer_bill: 52, // 金币明细 gold_coin_customer_balance: 53, // 金币余额 gold_bean_customer_details: 54, // 金豆客户账户明细 + wallet: 150, // 钱包 historical_data_query: 55, // 历史数据查询 new_version_gold_query: 56, // 新版金币查询 diff --git a/src/views/usergold/gold/clientCount.vue b/src/views/usergold/gold/clientCount.vue index 0803950..a88b652 100644 --- a/src/views/usergold/gold/clientCount.vue +++ b/src/views/usergold/gold/clientCount.vue @@ -1,30 +1,41 @@ @@ -45,6 +56,7 @@ const {menuTree} = storeToRefs(adminStore); const activeTab = ref(''); const hasDetail = ref(false); const hasBalance = ref(false); +const hasWallet = ref(false); // 导航方法 const navigateTo = (name) => { activeTab.value = name; @@ -55,9 +67,9 @@ const navigateTo = (name) => { // 初始化权限状态 const initPermissions = () => { if (!menuTree.value || !menuTree.value.length) return; - hasDetail.value = hasMenuPermission(menuTree.value, permissionMapping.gold_coin_customer_bill); hasBalance.value = hasMenuPermission(menuTree.value, permissionMapping.gold_coin_customer_balance); + hasWallet.value = hasMenuPermission(menuTree.value, permissionMapping.wallet); }; // 默认跳转逻辑 @@ -65,13 +77,14 @@ const getDefaultAuditRoute = () => { initPermissions(); if (hasDetail.value) return 'clientCountDetail'; if (hasBalance.value) return 'clientCountBalance'; + if (hasWallet.value) return 'clientCountWallet'; return 'clientCountDetail'; }; // 监听路由变化更新标签状态 watch(() => route.name, (newName) => { initPermissions() - if (newName === 'clientCountDetail' || newName === 'clientCountBalance') { + if (newName === 'clientCountDetail' || newName === 'clientCountBalance' || newName === 'clientCountWallet') { activeTab.value = newName; } else if (newName === 'usergold') { // 每次访问 /coinConsume 都进行默认跳转 @@ -88,16 +101,18 @@ onMounted(() => { navigateTo(defaultRoute); } else { // 非父路由初始化当前标签状态 - if (route.name === 'clientCountDetail' || route.name === 'clientCountBalance') { + if (route.name === 'clientCountDetail' || route.name === 'clientCountBalance' || route.name === 'clientCountWallet') { activeTab.value = route.name; } } }); \ No newline at end of file