diff --git a/src/views/consume/bean/beanConsume.vue b/src/views/consume/bean/beanConsume.vue index ea2c360..df8141d 100644 --- a/src/views/consume/bean/beanConsume.vue +++ b/src/views/consume/bean/beanConsume.vue @@ -3,8 +3,8 @@ @@ -72,26 +72,26 @@ const navigateTo = (name) => { const initPermissions = () => { if (!menuTree.value || !menuTree.value.length) return; - hasAdd.value = hasMenuPermission(menuTree.value, permissionMapping.addBeanConsume); - hasLive.value = hasMenuPermission(menuTree.value, permissionMapping.beanZBDetail); - hasFan.value = hasMenuPermission(menuTree.value, permissionMapping.beanTFDetail); - hasArticleVideo.value = hasMenuPermission(menuTree.value, permissionMapping.beanSPWZDetail); + hasAdd.value = hasMenuPermission(menuTree.value, permissionMapping.add_gold_bean_consumption); + hasLive.value = hasMenuPermission(menuTree.value, permissionMapping.gold_bean_live_details); + hasFan.value = hasMenuPermission(menuTree.value, permissionMapping.gold_bean_fan_details); + hasArticleVideo.value = hasMenuPermission(menuTree.value, permissionMapping.gold_bean_video_details); }; // 默认跳转逻辑 const getDefaultAuditRoute = () => { initPermissions(); - if (hasAdd.value) return 'addBeanConsume'; + if (hasAdd.value) return 'add_gold_bean_consumption'; if (hasLive.value) return 'liveStream'; if (hasFan.value) return 'dieHardFan'; if (hasArticleVideo.value) return 'articleVideo'; - return 'addBeanConsume'; + return 'add_gold_bean_consumption'; }; // 监听路由变化更新标签状态 watch(() => route.name, (newName) => { initPermissions() - if (newName=== 'addBeanConsume' || newName === 'liveStream' || newName === 'dieHardFan' || newName === 'articleVideo') { + if (newName=== 'add_gold_bean_consumption' || newName === 'liveStream' || newName === 'dieHardFan' || newName === 'articleVideo') { activeTab.value = newName; } else if (newName === 'beanConsume') { // 每次访问 /beanConsume 都进行默认跳转 @@ -108,7 +108,7 @@ onMounted(() => { navigateTo(defaultRoute); } else { // 非父路由初始化当前标签状态 - if (route.name=== 'addBeanConsume' || route.name === 'liveStream' || route.name === 'dieHardFan' || route.name === 'articleVideo') { + if (route.name=== 'add_gold_bean_consumption' || route.name === 'liveStream' || route.name === 'dieHardFan' || route.name === 'articleVideo') { activeTab.value = route.name; } } diff --git a/src/views/recharge/bean/beanRecharge.vue b/src/views/recharge/bean/beanRecharge.vue index 3c5de9b..ccab568 100644 --- a/src/views/recharge/bean/beanRecharge.vue +++ b/src/views/recharge/bean/beanRecharge.vue @@ -3,24 +3,24 @@ 新增充值 系统充值 线上充值 @@ -58,24 +58,24 @@ const navigateTo = (name) => { const initPermissions = () => { if (!menuTree.value || !menuTree.value.length) return; - hasAdd.value = hasMenuPermission(menuTree.value, permissionMapping.addBeanRecharge); - hasSystem.value = hasMenuPermission(menuTree.value, permissionMapping.beanSystemRecharge); - hasOnline.value = hasMenuPermission(menuTree.value, permissionMapping.beanOnlineRecharge); + hasAdd.value = hasMenuPermission(menuTree.value, permissionMapping.add_gold_bean_recharge); + hasSystem.value = hasMenuPermission(menuTree.value, permissionMapping.system_gold_bean_recharge); + hasOnline.value = hasMenuPermission(menuTree.value, permissionMapping.online_gold_bean_recharge); }; // 默认跳转逻辑 const getDefaultAuditRoute = () => { initPermissions(); - if (hasAdd.value) return 'addBeanRecharge'; - if (hasSystem.value) return 'beanSystemRecharge'; - if (hasOnline.value) return 'beanOnlineRecharge'; - return 'addBeanRecharge'; + if (hasAdd.value) return 'add_gold_bean_recharge'; + if (hasSystem.value) return 'system_gold_bean_recharge'; + if (hasOnline.value) return 'online_gold_bean_recharge'; + return 'add_gold_bean_recharge'; }; // 监听路由变化更新标签状态 watch(() => route.name, (newName) => { initPermissions() - if (newName === 'addBeanRecharge' || newName === 'beanSystemRecharge' || newName === 'beanOnlineRecharge') { + if (newName === 'add_gold_bean_recharge' || newName === 'system_gold_bean_recharge' || newName === 'online_gold_bean_recharge') { activeTab.value = newName; } else if (newName === 'beanRecharge') { // 每次访问 /beanConsume 都进行默认跳转 @@ -92,7 +92,7 @@ onMounted(() => { navigateTo(defaultRoute); } else { // 非父路由初始化当前标签状态 - if (route.name === 'addBeanRecharge' || route.name === 'beanSystemRecharge' || route.name === 'beanOnlineRecharge') { + if (route.name === 'add_gold_bean_recharge' || route.name === 'system_gold_bean_recharge' || route.name === 'online_gold_bean_recharge') { activeTab.value = route.name; } }