fetch(add): 账户管理
This commit is contained in:
@@ -14,12 +14,7 @@ import { asyncRoutes } from '../routes/asyncRoutes'
|
||||
import { loadingService } from '@/utils/ui'
|
||||
import { useCommon } from '@/composables/useCommon'
|
||||
import { useWorktabStore } from '@/store/modules/worktab'
|
||||
import {
|
||||
isInWhiteList,
|
||||
hasRoutePermission,
|
||||
isTokenValid,
|
||||
buildLoginRedirect
|
||||
} from './permission'
|
||||
import { isInWhiteList, hasRoutePermission, isTokenValid, buildLoginRedirect } from './permission'
|
||||
|
||||
// 是否已注册动态路由
|
||||
const isRouteRegistered = ref(false)
|
||||
|
||||
@@ -730,33 +730,24 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
keepAlive: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'customer-role',
|
||||
name: 'CustomerRole',
|
||||
component: RoutesAlias.CustomerRole,
|
||||
meta: {
|
||||
title: 'menus.accountManagement.customerRole',
|
||||
keepAlive: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'agent',
|
||||
name: 'AgentManagement',
|
||||
component: RoutesAlias.AgentManagement,
|
||||
meta: {
|
||||
title: 'menus.accountManagement.agent',
|
||||
keepAlive: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'enterprise-customer',
|
||||
name: 'EnterpriseCustomer',
|
||||
component: RoutesAlias.EnterpriseCustomer,
|
||||
meta: {
|
||||
title: 'menus.accountManagement.enterpriseCustomer',
|
||||
keepAlive: true
|
||||
}
|
||||
},
|
||||
// {
|
||||
// path: 'customer-role',
|
||||
// name: 'CustomerRole',
|
||||
// component: RoutesAlias.CustomerRole,
|
||||
// meta: {
|
||||
// title: 'menus.accountManagement.customerRole',
|
||||
// keepAlive: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: 'agent',
|
||||
// name: 'AgentManagement',
|
||||
// component: RoutesAlias.AgentManagement,
|
||||
// meta: {
|
||||
// title: 'menus.accountManagement.agent',
|
||||
// keepAlive: true
|
||||
// }
|
||||
// },
|
||||
{
|
||||
path: 'customer-account',
|
||||
name: 'CustomerAccount',
|
||||
@@ -777,51 +768,51 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
icon: ''
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'sim-card',
|
||||
name: 'SimCardManagement',
|
||||
component: RoutesAlias.SimCardManagement,
|
||||
meta: {
|
||||
title: 'menus.product.simCard',
|
||||
keepAlive: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'sim-card-assign',
|
||||
name: 'SimCardAssign',
|
||||
component: RoutesAlias.SimCardAssign,
|
||||
meta: {
|
||||
title: 'menus.product.simCardAssign',
|
||||
keepAlive: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'package-series',
|
||||
name: 'PackageSeries',
|
||||
component: RoutesAlias.PackageSeries,
|
||||
meta: {
|
||||
title: 'menus.product.packageSeries',
|
||||
keepAlive: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'package-list',
|
||||
name: 'PackageList',
|
||||
component: RoutesAlias.PackageList,
|
||||
meta: {
|
||||
title: 'menus.product.packageList',
|
||||
keepAlive: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'package-assign',
|
||||
name: 'PackageAssign',
|
||||
component: RoutesAlias.PackageAssign,
|
||||
meta: {
|
||||
title: 'menus.product.packageAssign',
|
||||
keepAlive: true
|
||||
}
|
||||
},
|
||||
// {
|
||||
// path: 'sim-card',
|
||||
// name: 'SimCardManagement',
|
||||
// component: RoutesAlias.SimCardManagement,
|
||||
// meta: {
|
||||
// title: 'menus.product.simCard',
|
||||
// keepAlive: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: 'sim-card-assign',
|
||||
// name: 'SimCardAssign',
|
||||
// component: RoutesAlias.SimCardAssign,
|
||||
// meta: {
|
||||
// title: 'menus.product.simCardAssign',
|
||||
// keepAlive: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: 'package-series',
|
||||
// name: 'PackageSeries',
|
||||
// component: RoutesAlias.PackageSeries,
|
||||
// meta: {
|
||||
// title: 'menus.product.packageSeries',
|
||||
// keepAlive: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: 'package-list',
|
||||
// name: 'PackageList',
|
||||
// component: RoutesAlias.PackageList,
|
||||
// meta: {
|
||||
// title: 'menus.product.packageList',
|
||||
// keepAlive: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: 'package-assign',
|
||||
// name: 'PackageAssign',
|
||||
// component: RoutesAlias.PackageAssign,
|
||||
// meta: {
|
||||
// title: 'menus.product.packageAssign',
|
||||
// keepAlive: true
|
||||
// }
|
||||
// },
|
||||
{
|
||||
path: 'shop',
|
||||
name: 'Shop',
|
||||
@@ -898,127 +889,169 @@ export const asyncRoutes: AppRouteRecord[] = [
|
||||
icon: ''
|
||||
},
|
||||
children: [
|
||||
// {
|
||||
// path: 'customer-account',
|
||||
// name: 'CustomerAccountList',
|
||||
// component: RoutesAlias.CustomerAccountList,
|
||||
// meta: {
|
||||
// title: 'menus.account.customerAccount',
|
||||
// keepAlive: true
|
||||
// }
|
||||
// },
|
||||
{
|
||||
path: 'customer-account',
|
||||
name: 'CustomerAccountList',
|
||||
component: RoutesAlias.CustomerAccountList,
|
||||
path: 'enterprise-customer',
|
||||
name: 'EnterpriseCustomer',
|
||||
component: RoutesAlias.EnterpriseCustomer,
|
||||
meta: {
|
||||
title: 'menus.account.customerAccount',
|
||||
title: 'menus.accountManagement.enterpriseCustomer',
|
||||
keepAlive: true
|
||||
}
|
||||
},
|
||||
// {
|
||||
// path: 'my-account',
|
||||
// name: 'MyAccount',
|
||||
// component: RoutesAlias.MyAccount,
|
||||
// meta: {
|
||||
// title: 'menus.account.myAccount',
|
||||
// keepAlive: true
|
||||
// }
|
||||
// }
|
||||
{
|
||||
path: 'withdrawal',
|
||||
name: 'WithdrawalManagement',
|
||||
component: RoutesAlias.WithdrawalManagement,
|
||||
path: 'commission',
|
||||
name: 'CommissionManagement',
|
||||
component: '',
|
||||
meta: {
|
||||
title: 'menus.account.withdrawal',
|
||||
keepAlive: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'withdrawal-settings',
|
||||
name: 'WithdrawalSettings',
|
||||
component: RoutesAlias.WithdrawalSettings,
|
||||
meta: {
|
||||
title: 'menus.account.withdrawalSettings',
|
||||
keepAlive: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'my-account',
|
||||
name: 'MyAccount',
|
||||
component: RoutesAlias.MyAccount,
|
||||
meta: {
|
||||
title: 'menus.account.myAccount',
|
||||
keepAlive: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/settings',
|
||||
name: 'Settings',
|
||||
component: RoutesAlias.Home,
|
||||
meta: {
|
||||
title: 'menus.settings.title',
|
||||
icon: ''
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'payment-merchant',
|
||||
name: 'PaymentMerchant',
|
||||
component: RoutesAlias.PaymentMerchant,
|
||||
meta: {
|
||||
title: 'menus.settings.paymentMerchant',
|
||||
keepAlive: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'developer-api',
|
||||
name: 'DeveloperApi',
|
||||
component: RoutesAlias.DeveloperApi,
|
||||
meta: {
|
||||
title: 'menus.settings.developerApi',
|
||||
keepAlive: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'commission-template',
|
||||
name: 'CommissionTemplate',
|
||||
component: RoutesAlias.CommissionTemplate,
|
||||
meta: {
|
||||
title: 'menus.settings.commissionTemplate',
|
||||
keepAlive: true
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/batch',
|
||||
name: 'Batch',
|
||||
component: RoutesAlias.Home,
|
||||
meta: {
|
||||
title: 'menus.batch.title',
|
||||
icon: ''
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'sim-import',
|
||||
name: 'SimImport',
|
||||
component: RoutesAlias.SimImport,
|
||||
meta: {
|
||||
title: 'menus.batch.simImport',
|
||||
keepAlive: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'device-import',
|
||||
name: 'DeviceImport',
|
||||
component: RoutesAlias.DeviceImport,
|
||||
meta: {
|
||||
title: 'menus.batch.deviceImport',
|
||||
keepAlive: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'offline-batch-recharge',
|
||||
name: 'OfflineBatchRecharge',
|
||||
component: RoutesAlias.OfflineBatchRecharge,
|
||||
meta: {
|
||||
title: 'menus.batch.offlineBatchRecharge',
|
||||
keepAlive: true
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'card-change-notice',
|
||||
name: 'CardChangeNotice',
|
||||
component: RoutesAlias.CardChangeNotice,
|
||||
meta: {
|
||||
title: 'menus.batch.cardChangeNotice',
|
||||
keepAlive: true
|
||||
}
|
||||
title: 'menus.commission.menu.management',
|
||||
icon: ''
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'withdrawal-approval',
|
||||
name: 'WithdrawalApproval',
|
||||
component: RoutesAlias.WithdrawalApproval,
|
||||
meta: {
|
||||
title: 'menus.commission.menu.withdrawal',
|
||||
keepAlive: true,
|
||||
roles: ['R_SUPER', 'R_ADMIN']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'withdrawal-settings',
|
||||
name: 'CommissionWithdrawalSettings',
|
||||
component: RoutesAlias.CommissionWithdrawalSettings,
|
||||
meta: {
|
||||
title: 'menus.commission.menu.withdrawalSettings',
|
||||
keepAlive: true,
|
||||
roles: ['R_SUPER', 'R_ADMIN']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'my-commission',
|
||||
name: 'MyCommission',
|
||||
component: RoutesAlias.MyCommission,
|
||||
meta: {
|
||||
title: 'menus.commission.menu.myCommission',
|
||||
keepAlive: true,
|
||||
roles: ['R_AGENT']
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'agent-commission',
|
||||
name: 'AgentCommission',
|
||||
component: RoutesAlias.AgentCommission,
|
||||
meta: {
|
||||
title: 'menus.commission.menu.agentCommission',
|
||||
keepAlive: true,
|
||||
roles: ['R_SUPER', 'R_ADMIN']
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
// {
|
||||
// path: '/settings',
|
||||
// name: 'Settings',
|
||||
// component: RoutesAlias.Home,
|
||||
// meta: {
|
||||
// title: 'menus.settings.title',
|
||||
// icon: ''
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: 'payment-merchant',
|
||||
// name: 'PaymentMerchant',
|
||||
// component: RoutesAlias.PaymentMerchant,
|
||||
// meta: {
|
||||
// title: 'menus.settings.paymentMerchant',
|
||||
// keepAlive: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: 'developer-api',
|
||||
// name: 'DeveloperApi',
|
||||
// component: RoutesAlias.DeveloperApi,
|
||||
// meta: {
|
||||
// title: 'menus.settings.developerApi',
|
||||
// keepAlive: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: 'commission-template',
|
||||
// name: 'CommissionTemplate',
|
||||
// component: RoutesAlias.CommissionTemplate,
|
||||
// meta: {
|
||||
// title: 'menus.settings.commissionTemplate',
|
||||
// keepAlive: true
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
// {
|
||||
// path: '/batch',
|
||||
// name: 'Batch',
|
||||
// component: RoutesAlias.Home,
|
||||
// meta: {
|
||||
// title: 'menus.batch.title',
|
||||
// icon: ''
|
||||
// },
|
||||
// children: [
|
||||
// {
|
||||
// path: 'sim-import',
|
||||
// name: 'SimImport',
|
||||
// component: RoutesAlias.SimImport,
|
||||
// meta: {
|
||||
// title: 'menus.batch.simImport',
|
||||
// keepAlive: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: 'device-import',
|
||||
// name: 'DeviceImport',
|
||||
// component: RoutesAlias.DeviceImport,
|
||||
// meta: {
|
||||
// title: 'menus.batch.deviceImport',
|
||||
// keepAlive: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: 'offline-batch-recharge',
|
||||
// name: 'OfflineBatchRecharge',
|
||||
// component: RoutesAlias.OfflineBatchRecharge,
|
||||
// meta: {
|
||||
// title: 'menus.batch.offlineBatchRecharge',
|
||||
// keepAlive: true
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// path: 'card-change-notice',
|
||||
// name: 'CardChangeNotice',
|
||||
// component: RoutesAlias.CardChangeNotice,
|
||||
// meta: {
|
||||
// title: 'menus.batch.cardChangeNotice',
|
||||
// keepAlive: true
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
// }
|
||||
]
|
||||
|
||||
@@ -97,10 +97,14 @@ export enum RoutesAlias {
|
||||
|
||||
// 账户管理
|
||||
CustomerAccountList = '/finance/customer-account', // 客户账号
|
||||
WithdrawalManagement = '/finance/withdrawal', // 佣金提现
|
||||
WithdrawalSettings = '/finance/withdrawal-settings', // 佣金提现设置
|
||||
MyAccount = '/finance/my-account', // 我的账户
|
||||
|
||||
// 佣金管理
|
||||
WithdrawalApproval = '/finance/commission/withdrawal-approval', // 提现审批
|
||||
CommissionWithdrawalSettings = '/finance/commission/withdrawal-settings', // 提现配置
|
||||
MyCommission = '/finance/commission/my-commission', // 我的佣金
|
||||
AgentCommission = '/finance/commission/agent-commission', // 代理商佣金管理
|
||||
|
||||
// 设置管理
|
||||
PaymentMerchant = '/settings/payment-merchant', // 支付商户
|
||||
DeveloperApi = '/settings/developer-api', // 开发者API
|
||||
|
||||
Reference in New Issue
Block a user