|
|
|
@ -2,7 +2,7 @@ |
|
|
|
export function filterMenu(menuList) { |
|
|
|
return menuList |
|
|
|
// 过滤不是4级的 123 为菜单
|
|
|
|
.filter(menu => menu.menuType !== 4) |
|
|
|
.filter(menu => menu.menuType ===1 || menu.menuType === 2 || menu.menuType === 3) |
|
|
|
.map(menu => ({ |
|
|
|
...menu, |
|
|
|
children: menu.children ? filterMenu(menu.children) : [] |
|
|
|
@ -26,7 +26,7 @@ export function findFirstThirdLevelMenu(menuList) { |
|
|
|
|
|
|
|
for (const menu of menuList) { |
|
|
|
// 先检查当前菜单是否为三级菜单
|
|
|
|
if (menu.menuType === 3) { |
|
|
|
if (menu.menuType === 1) { |
|
|
|
return menu; |
|
|
|
} |
|
|
|
// 若不是,递归查找其子菜单(无论当前菜单是几级,都深入子菜单找三级)
|
|
|
|
@ -43,14 +43,15 @@ export const getRoutePath = (menu) => { |
|
|
|
// 路由映射表:key为接口menuName,value为对应路由路径
|
|
|
|
const routeMap = { |
|
|
|
|
|
|
|
'工作台查看': '/workbench', |
|
|
|
'工作台': '/workbench', |
|
|
|
|
|
|
|
'金币管理': '/goldManage', |
|
|
|
'现金管理': '/moneyManage', |
|
|
|
|
|
|
|
'金币审核': '/audit', |
|
|
|
'金豆审核': '/beanAudit', |
|
|
|
|
|
|
|
'现金汇率': '/rate', |
|
|
|
'汇率管理': '/rate', |
|
|
|
|
|
|
|
|
|
|
|
'金币充值': '/coinRecharge', |
|
|
|
@ -60,12 +61,12 @@ export const getRoutePath = (menu) => { |
|
|
|
'金豆消耗': '/beanConsume', |
|
|
|
|
|
|
|
|
|
|
|
'金币退款': '/coinRefund', |
|
|
|
'退款管理': '/coinRefund', |
|
|
|
// '金豆退款': '/beanRefund',
|
|
|
|
|
|
|
|
'历史数据查询': '/history', |
|
|
|
'金币查询(新)': '/history/newHistory', |
|
|
|
'金币查询(旧)': '/history/oldHistory', |
|
|
|
'新版金币查询': '/history/newHistory', |
|
|
|
'旧版金币查询': '/history/oldHistory', |
|
|
|
|
|
|
|
|
|
|
|
'权限管理': '/permissions', |
|
|
|
@ -76,19 +77,21 @@ export const getRoutePath = (menu) => { |
|
|
|
'金币客户账户明细': '/usergold', |
|
|
|
'金豆客户账户明细': '/userbean', |
|
|
|
|
|
|
|
'用户管理': '/permissions/userPermission', |
|
|
|
'角色管理': '/permissions/rolePermission', |
|
|
|
// '用户管理': '/permissions/userPermission',
|
|
|
|
// '角色管理': '/permissions/rolePermission',
|
|
|
|
|
|
|
|
'收款明细': '/moneyManage/receiveDetail', |
|
|
|
'收款-地区客服':'/moneyManage/receiveDetail/receiveService', |
|
|
|
'收款-地区财务/负责人':'/moneyManage/receiveDetail/receiveArea', |
|
|
|
'收款-总部财务/管理员':'/moneyManage/receiveDetail/receiveHead', |
|
|
|
'收款-地区财务':'/moneyManage/receiveDetail/receiveArea', |
|
|
|
'收款-地区负责人':'/moneyManage/receiveDetail/receiveArea', |
|
|
|
'收款-总部财务':'/moneyManage/receiveDetail/receiveHead', |
|
|
|
|
|
|
|
|
|
|
|
'退款明细': '/moneyManage/refundDetail', |
|
|
|
'退款-地区客服':'/moneyManage/refundDetail/refundService', |
|
|
|
'退款-地区财务':'/moneyManage/refundDetail/refundFinance', |
|
|
|
'退款-地区负责人':'/moneyManage/refundDetail/refundCharge', |
|
|
|
'退款-总部财务/管理员':'/moneyManage/refundDetail/refundHeader', |
|
|
|
'退款-总部财务':'/moneyManage/refundDetail/refundHeader', |
|
|
|
|
|
|
|
'执行明细': '/moneyManage/executor', |
|
|
|
}; |
|
|
|
|