feat(router): 路径i18n处理
This commit is contained in:
parent
df188acb45
commit
60979b89ce
|
@ -34,7 +34,7 @@ function replaceContent(content) {
|
||||||
);
|
);
|
||||||
|
|
||||||
// 替换 JavaScript 中的 this.$t('key')
|
// 替换 JavaScript 中的 this.$t('key')
|
||||||
content = content.replace(/this\.\$t\(['"]([^'"]+)['"]\)/g, (match, key) => {
|
content = content.replace(/i18n\.t\(['"]([^'"]+)['"]\)/g, (match, key) => {
|
||||||
const value = getNestedValue(zhCN, key);
|
const value = getNestedValue(zhCN, key);
|
||||||
return value ? `'${value}'` : match;
|
return value ? `'${value}'` : match;
|
||||||
});
|
});
|
||||||
|
@ -53,6 +53,7 @@ async function main() {
|
||||||
"pages/**/*.vue",
|
"pages/**/*.vue",
|
||||||
"pages/**/*.js",
|
"pages/**/*.js",
|
||||||
"pages/**/*.ts",
|
"pages/**/*.ts",
|
||||||
|
"router/**/*.js",
|
||||||
"components/**/*.vue",
|
"components/**/*.vue",
|
||||||
"components/**/*.js",
|
"components/**/*.js",
|
||||||
"components/**/*.ts",
|
"components/**/*.ts",
|
||||||
|
|
|
@ -10,36 +10,36 @@ export const constantRoutes = [
|
||||||
// 首页
|
// 首页
|
||||||
{
|
{
|
||||||
path: '/pages/index/index',
|
path: '/pages/index/index',
|
||||||
meta: { title: i18n.t('w_0114') },
|
meta: { title: '首页' },
|
||||||
name: 'index'
|
name: 'index'
|
||||||
},
|
},
|
||||||
// 信息管理
|
// 信息管理
|
||||||
{
|
{
|
||||||
path: '/information',
|
path: '/information',
|
||||||
meta: { title: i18n.t('MN_F_T_7') },
|
meta: { title: '信息管理' },
|
||||||
name: 'Information',
|
name: 'Information',
|
||||||
children: [
|
children: [
|
||||||
// 会员信息
|
// 会员信息
|
||||||
{
|
{
|
||||||
path: '/pages/information/member',
|
path: '/pages/information/member',
|
||||||
name: 'Member',
|
name: 'Member',
|
||||||
meta: { title: i18n.t('MN_F_T_8') },
|
meta: { title: '会员信息' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/pages/information/bisiness/index',
|
path: '/pages/information/bisiness/index',
|
||||||
name: 'BasicBusiness',
|
name: 'BasicBusiness',
|
||||||
meta: { title: i18n.t('MN_F_T_11') },
|
meta: { title: '办理业务' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/pages/information/bisiness/reviewBusiness',
|
path: '/pages/information/bisiness/reviewBusiness',
|
||||||
name: 'ReviewBusiness',
|
name: 'ReviewBusiness',
|
||||||
meta: { title: i18n.t('MN_F_T_13') },
|
meta: { title: '审核业务' },
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/pages/information/order',
|
path: '/pages/information/order',
|
||||||
name: 'OrderBusiness',
|
name: 'OrderBusiness',
|
||||||
meta: { title: i18n.t('MN_F_T_12') },
|
meta: { title: '订单业务' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/pages/information/dailyApplication/index',
|
path: '/pages/information/dailyApplication/index',
|
||||||
|
@ -49,194 +49,194 @@ export const constantRoutes = [
|
||||||
{
|
{
|
||||||
path: '/pages/information/realInfo',
|
path: '/pages/information/realInfo',
|
||||||
name: 'RealInfo',
|
name: 'RealInfo',
|
||||||
meta: { title: i18n.t('MN_F_T_10') },
|
meta: { title: '真实信息' },
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: '/pages/information/removeOrderList',
|
path: '/pages/information/removeOrderList',
|
||||||
name: 'removeOrderList',
|
name: 'removeOrderList',
|
||||||
meta: { title: i18n.t('MN_F_T_32') },
|
meta: { title: '撤单列表' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/pages/information/operationRecord',
|
path: '/pages/information/operationRecord',
|
||||||
name: 'operationRecord',
|
name: 'operationRecord',
|
||||||
meta: { title: i18n.t('MN_F_T_41') },
|
meta: { title: '操作记录' },
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
// 架构管理
|
// 架构管理
|
||||||
{
|
{
|
||||||
path: '/architecture',
|
path: '/architecture',
|
||||||
meta: { title: i18n.t('N_I_5') },
|
meta: { title: '架构管理' },
|
||||||
name: 'Framework',
|
name: 'Framework',
|
||||||
children: [
|
children: [
|
||||||
|
|
||||||
{
|
{
|
||||||
path: '/pages/architecture/architecture',
|
path: '/pages/architecture/architecture',
|
||||||
name: 'Recommend',
|
name: 'Recommend',
|
||||||
meta: { title: i18n.t('w_0031') },
|
meta: { title: '推荐架构' },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/pages/architecture/resettlle',
|
path: '/pages/architecture/resettlle',
|
||||||
name: 'Arcgurecture',
|
name: 'Arcgurecture',
|
||||||
meta: { title: i18n.t('ENU_MENU_381') },
|
meta: { title: '安置架构' },
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
// 结算中心
|
// 结算中心
|
||||||
{
|
{
|
||||||
path: '/settlementCenter',
|
path: '/settlementCenter',
|
||||||
meta: { title: i18n.t('MN_F_T_45') },
|
meta: { title: '结算中心' },
|
||||||
name: 'SettlementCenter',
|
name: 'SettlementCenter',
|
||||||
children: [
|
children: [
|
||||||
// 业绩汇总
|
// 业绩汇总
|
||||||
{
|
{
|
||||||
path: '/pages/settlementCenter/performanceTotal',
|
path: '/pages/settlementCenter/performanceTotal',
|
||||||
name: 'performanceTotal',
|
name: 'performanceTotal',
|
||||||
meta: { title: i18n.t('MN_F_T_47') },
|
meta: { title: '业绩汇总' },
|
||||||
},
|
},
|
||||||
// 拨比列表
|
// 拨比列表
|
||||||
{
|
{
|
||||||
path: '/pages/settlementCenter/performanceList',
|
path: '/pages/settlementCenter/performanceList',
|
||||||
name: 'performanceList',
|
name: 'performanceList',
|
||||||
meta: { title: i18n.t('MN_F_T_50') },
|
meta: { title: '拨比列表' },
|
||||||
},
|
},
|
||||||
// 奖金来源
|
// 奖金来源
|
||||||
{
|
{
|
||||||
path: '/pages/settlementCenter/sourceBonus',
|
path: '/pages/settlementCenter/sourceBonus',
|
||||||
name: 'sourceBonus',
|
name: 'sourceBonus',
|
||||||
meta: { title: i18n.t('MN_F_T_51') },
|
meta: { title: '奖金来源' },
|
||||||
},
|
},
|
||||||
// 奖金汇总
|
// 奖金汇总
|
||||||
{
|
{
|
||||||
path: '/pages/settlementCenter/totalBonus',
|
path: '/pages/settlementCenter/totalBonus',
|
||||||
name: 'totalBonus',
|
name: 'totalBonus',
|
||||||
meta: { title: i18n.t('MN_F_T_52') },
|
meta: { title: '奖金汇总' },
|
||||||
},
|
},
|
||||||
// 奖金明细
|
// 奖金明细
|
||||||
{
|
{
|
||||||
path: '/pages/settlementCenter/bonusDetail',
|
path: '/pages/settlementCenter/bonusDetail',
|
||||||
name: 'BonusDetail',
|
name: 'BonusDetail',
|
||||||
meta: { title: i18n.t('MN_F_T_53') },
|
meta: { title: '奖金明细' },
|
||||||
},
|
},
|
||||||
// 安置数据
|
// 安置数据
|
||||||
{
|
{
|
||||||
path: '/pages/settlementCenter/placementData',
|
path: '/pages/settlementCenter/placementData',
|
||||||
name: 'placementData',
|
name: 'placementData',
|
||||||
meta: { title: i18n.t('MN_F_T_54') },
|
meta: { title: '安置数据' },
|
||||||
},
|
},
|
||||||
// 推荐数据
|
// 推荐数据
|
||||||
{
|
{
|
||||||
path: '/pages/settlementCenter/recommendData',
|
path: '/pages/settlementCenter/recommendData',
|
||||||
name: 'recommendData',
|
name: 'recommendData',
|
||||||
meta: { title: i18n.t('MN_F_T_56') },
|
meta: { title: '推荐数据' },
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
// 财务管理
|
// 财务管理
|
||||||
{
|
{
|
||||||
path: '/financial',
|
path: '/financial',
|
||||||
meta: { title: i18n.t('MN_F_T_86') },
|
meta: { title: '财务管理' },
|
||||||
name: 'Financial',
|
name: 'Financial',
|
||||||
children: [
|
children: [
|
||||||
// 充值
|
// 充值
|
||||||
{
|
{
|
||||||
path: '/pages/financial/index',
|
path: '/pages/financial/index',
|
||||||
name: 'Chongzhi',
|
name: 'Chongzhi',
|
||||||
meta: { title: i18n.t('MN_F_T_87') },
|
meta: { title: '充值' },
|
||||||
},
|
},
|
||||||
// 充值明细
|
// 充值明细
|
||||||
{
|
{
|
||||||
path: '/pages/financial/rechargeDetail',
|
path: '/pages/financial/rechargeDetail',
|
||||||
name: 'RechargeDetail',
|
name: 'RechargeDetail',
|
||||||
meta: { title: i18n.t('MN_F_T_89') },
|
meta: { title: '充值明细' },
|
||||||
},
|
},
|
||||||
// 提现明细
|
// 提现明细
|
||||||
{
|
{
|
||||||
path: '/pages/financial/cashDetails',
|
path: '/pages/financial/cashDetails',
|
||||||
name: 'CashDetails',
|
name: 'CashDetails',
|
||||||
meta: { title: i18n.t('MN_F_T_90') },
|
meta: { title: '提现明细' },
|
||||||
},
|
},
|
||||||
// 消费明细
|
// 消费明细
|
||||||
{
|
{
|
||||||
path: '/pages/financial/consumptionDetails',
|
path: '/pages/financial/consumptionDetails',
|
||||||
name: 'ConsumptionDetails',
|
name: 'ConsumptionDetails',
|
||||||
meta: { title: i18n.t('MN_F_T_92') },
|
meta: { title: '消费明细' },
|
||||||
},
|
},
|
||||||
// 转账明细
|
// 转账明细
|
||||||
{
|
{
|
||||||
path: '/pages/financial/transferDetails',
|
path: '/pages/financial/transferDetails',
|
||||||
name: 'TransferDetails',
|
name: 'TransferDetails',
|
||||||
meta: { title: i18n.t('MN_F_T_94') },
|
meta: { title: '转账明细' },
|
||||||
},
|
},
|
||||||
// 冻结明细
|
// 冻结明细
|
||||||
{
|
{
|
||||||
path: '/pages/financial/freezeDetail',
|
path: '/pages/financial/freezeDetail',
|
||||||
name: 'FreezeDetail',
|
name: 'FreezeDetail',
|
||||||
meta: { title: i18n.t('MN_F_T_93') },
|
meta: { title: '冻结明细' },
|
||||||
},
|
},
|
||||||
// 钱包明细
|
// 钱包明细
|
||||||
{
|
{
|
||||||
path: '/pages/financial/walletDetails',
|
path: '/pages/financial/walletDetails',
|
||||||
name: 'WalletDetails',
|
name: 'WalletDetails',
|
||||||
meta: { title: i18n.t('MN_F_T_96') }
|
meta: { title: '钱包明细' }
|
||||||
},
|
},
|
||||||
// 钱包明细详情
|
// 钱包明细详情
|
||||||
{
|
{
|
||||||
path: '/pages/financial/walletDetailsPro',
|
path: '/pages/financial/walletDetailsPro',
|
||||||
name: 'WalletDetailss',
|
name: 'WalletDetailss',
|
||||||
meta: { title: i18n.t('MN_F_T_95') },
|
meta: { title: '钱包明细详情' },
|
||||||
},
|
},
|
||||||
//余额汇总
|
//余额汇总
|
||||||
{
|
{
|
||||||
path: '/pages/financial/balanceSummary',
|
path: '/pages/financial/balanceSummary',
|
||||||
name: 'BalanceSummary',
|
name: 'BalanceSummary',
|
||||||
meta: { title: i18n.t('w_0483') },
|
meta: { title: '余额汇总' },
|
||||||
},
|
},
|
||||||
// 在线支付
|
// 在线支付
|
||||||
{
|
{
|
||||||
path: '/pages/financial/onlinePayDetails',
|
path: '/pages/financial/onlinePayDetails',
|
||||||
name: 'OnlinePayDetails',
|
name: 'OnlinePayDetails',
|
||||||
meta: { title: i18n.t('MN_F_T_97') }
|
meta: { title: '在线支付明细' }
|
||||||
},
|
},
|
||||||
// 在线退款
|
// 在线退款
|
||||||
{
|
{
|
||||||
path: '/pages/financial/onlineRefundDetails',
|
path: '/pages/financial/onlineRefundDetails',
|
||||||
name: 'OnlineRefundDetails',
|
name: 'OnlineRefundDetails',
|
||||||
meta: { title: i18n.t('MY_ORD_84') }
|
meta: { title: '在线退款明细' }
|
||||||
},
|
},
|
||||||
// // 充值在线签呈
|
// // 充值在线签呈
|
||||||
// {
|
// {
|
||||||
// path: '/pages/financial/czzxqc',
|
// path: '/pages/financial/czzxqc',
|
||||||
// name: 'Czzxqc',
|
// name: 'Czzxqc',
|
||||||
// meta: { title: i18n.t('MN_F_T_87') },
|
// meta: { title: '充值' },
|
||||||
// },
|
// },
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
// 物流管理
|
// 物流管理
|
||||||
{
|
{
|
||||||
path: '/logistics',
|
path: '/logistics',
|
||||||
meta: { title: i18n.t('MN_F_T_73') },
|
meta: { title: '物流管理' },
|
||||||
name: 'Logistics',
|
name: 'Logistics',
|
||||||
children: [
|
children: [
|
||||||
// 商品订单
|
// 商品订单
|
||||||
{
|
{
|
||||||
path: '/pages/logistics/commodity/index',
|
path: '/pages/logistics/commodity/index',
|
||||||
name: 'ProductOrders',
|
name: 'ProductOrders',
|
||||||
meta: { title: i18n.t('MN_F_T_69') },
|
meta: { title: '商品订单' },
|
||||||
},
|
},
|
||||||
//订单开票
|
//订单开票
|
||||||
{
|
{
|
||||||
path: '/pages/logistics/commodity/spInvoicing',
|
path: '/pages/logistics/commodity/spInvoicing',
|
||||||
name: 'SpInvoicing',
|
name: 'SpInvoicing',
|
||||||
meta: { title: i18n.t('CK_KS_121') },
|
meta: { title: '订单开票' },
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
// 统计分析
|
// 统计分析
|
||||||
{
|
{
|
||||||
path: '/statistics',
|
path: '/statistics',
|
||||||
meta: { title: i18n.t('w_0420') },
|
meta: { title: '统计分析' },
|
||||||
name: 'Statistics',
|
name: 'Statistics',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue