refactor: 统一项目内国际化key的命名空间格式
本次提交对全项目的国际化调用进行了规范化重构:
1. 为中文/英文语言包新增了avatar和gender的别名映射,兼容旧有headImg/sex写法
2. 修正了lang.js中的注释路径错误
3. 将所有页面和组件内的$lang调用从短路径改为带业务模块前缀的完整命名空间路径,例如将$lang('title')改为$lang('article.list.title')
4. 优化了i18n-lazy.js的注释说明,补充了正确的key命名格式示例
5. 统一了分销、订单、会员等模块的国际化key层级,确保所有语言调用路径一致
This commit is contained in:
@@ -18,8 +18,8 @@
|
||||
:src="$util.img('public/uniapp/fenxiao/index/commissionFission-level.png')"
|
||||
alt="" class="level-icon">{{ info.level_name }}</p>
|
||||
</view>
|
||||
<view class="recommend">{{ $lang('superiorAgent') }}:{{ info.parent_name ? info.parent_name : $lang('headquarters') }}</view>
|
||||
<view class="recommend">{{ $lang('invitedSuccess', { count: teamNum.num }) }}<text class="iconfont icon-right"
|
||||
<view class="recommend">{{ $lang('fenxiao.index.superiorAgent') }}:{{ info.parent_name ? info.parent_name : $lang('fenxiao.index.headquarters') }}</view>
|
||||
<view class="recommend">{{ $lang('fenxiao.index.invitedSuccess', { count: teamNum.num }) }}<text class="iconfont icon-right"
|
||||
style="font-size: 24rpx;"></text></view>
|
||||
</view>
|
||||
<!-- <view class="promote-rules font-size-tag" @click="$util.redirectTo('/pages_promotion/fenxiao/promote')">
|
||||
@@ -40,10 +40,10 @@
|
||||
<view class="fenxiao-index-allmoney">
|
||||
<view class="allmoney-top-money">
|
||||
<view class="allmoney-top">
|
||||
<view class="font-size-sub">{{ $lang('withdrawable', { withdraw: fenxiaoWords.withdraw }) }}</view>
|
||||
<view class="font-size-sub">{{ $lang('fenxiao.index.withdrawable', { withdraw: fenxiaoWords.withdraw }) }}</view>
|
||||
<view class="withdrawal-record"
|
||||
@click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_list')">
|
||||
{{ $lang('withdrawDetail') }}
|
||||
{{ $lang('fenxiao.index.withdrawDetail') }}
|
||||
<text class="iconfont icon-right"></text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -61,18 +61,18 @@
|
||||
</view> -->
|
||||
<view class="allmoney-all-wrap"
|
||||
@click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_list')">
|
||||
<view class="title">{{ $lang('withdrawing') }}<text class="iconfont icon-right"
|
||||
<view class="title">{{ $lang('fenxiao.index.withdrawing') }}<text class="iconfont icon-right"
|
||||
style="font-size: 24rpx;"></text></view>
|
||||
<view class="money price-font">{{ info.account_withdraw_apply | moneyFormat }}</view>
|
||||
</view>
|
||||
<view class="allmoney-all-wrap"
|
||||
@click="$util.redirectTo('/pages_promotion/fenxiao/order', { type: 1 })">
|
||||
<view class="title">{{ $lang('pendingDeposit') }}<text class="iconfont icon-right"
|
||||
<view class="title">{{ $lang('fenxiao.index.pendingDeposit') }}<text class="iconfont icon-right"
|
||||
style="font-size: 24rpx;"></text></view>
|
||||
<view class="money price-font">{{ info.in_progress_money | moneyFormat }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="withdraw-btn" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_apply')">{{ $lang('withdraw') }}
|
||||
<view class="withdraw-btn" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_apply')">{{ $lang('fenxiao.index.withdraw') }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -90,8 +90,8 @@
|
||||
</image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title">{{ $lang('myFans') }}</view>
|
||||
<view class="desc">{{ $lang('invitedUsers') }}</view>
|
||||
<view class="title">{{ $lang('fenxiao.index.myFans') }}</view>
|
||||
<view class="desc">{{ $lang('fenxiao.index.invitedUsers') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_list')">
|
||||
@@ -100,8 +100,8 @@
|
||||
</image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title">{{ fenxiaoWords.withdraw + $lang('detail') }}</view>
|
||||
<view class="desc">{{ $lang('totalAccumulated', { account: fenxiaoWords.account, symbol: $lang('common.currencySymbol'), amount: info.total_commission | moneyFormat }) }}
|
||||
<view class="title">{{ fenxiaoWords.withdraw + $lang('fenxiao.index.detail') }}</view>
|
||||
<view class="desc">{{ $lang('fenxiao.index.totalAccumulated', { account: fenxiaoWords.account, symbol: $lang('common.currencySymbol'), amount: info.total_commission | moneyFormat }) }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -111,8 +111,8 @@
|
||||
</image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title">{{ fenxiaoWords.concept + $lang('order') }}</view>
|
||||
<view class="desc">{{ fenxiaoWords.concept + $lang('orderDetail') }}</view>
|
||||
<view class="title">{{ fenxiaoWords.concept + $lang('fenxiao.index.order') }}</view>
|
||||
<view class="desc">{{ fenxiaoWords.concept + $lang('fenxiao.index.orderDetail') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -121,8 +121,8 @@
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/friend.png')" mode="widthFix" show-menu-by-longpress></image>
|
||||
</view>
|
||||
<view class="info">
|
||||
<view class="title">{{ $lang('myInviteCode') }}</view>
|
||||
<view class="desc">{{ $lang('inviteFriendsEarnRewards') }}</view>
|
||||
<view class="title">{{ $lang('fenxiao.index.myInviteCode') }}</view>
|
||||
<view class="desc">{{ $lang('fenxiao.index.inviteFriendsEarnRewards') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/promote')">
|
||||
@@ -211,8 +211,8 @@
|
||||
<ns-copyright></ns-copyright>
|
||||
<view class="empty" v-if="!info.fenxiao_id > 0 && showEmpty">
|
||||
<image :src="$util.img('public/uniapp/fenxiao/index/no-fenxiao.png')" mode="widthFix" show-menu-by-longpress></image>
|
||||
<text>{{ $lang('notFenxiaoYet', { name: fenxiaoWords.fenxiao_name }) }}</text>
|
||||
<view @click="$util.redirectTo('/pages_promotion/fenxiao/apply')" class="color-base-bg">{{ $lang('joinNow') }}</view>
|
||||
<text>{{ $lang('fenxiao.index.notFenxiaoYet', { name: fenxiaoWords.fenxiao_name }) }}</text>
|
||||
<view @click="$util.redirectTo('/pages_promotion/fenxiao/apply')" class="color-base-bg">{{ $lang('fenxiao.index.joinNow') }}</view>
|
||||
</view>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
<ns-login ref="login"></ns-login>
|
||||
@@ -220,7 +220,7 @@
|
||||
<uni-popup ref="taskPopup" type="bottom">
|
||||
<view class="task-popup popup-layer" v-if="levelInfo">
|
||||
<view class="head-wrap">
|
||||
<text>{{ $lang('quickUpgradeTips') }}</text>
|
||||
<text>{{ $lang('fenxiao.index.quickUpgradeTips') }}</text>
|
||||
<text class="iconfont icon-close" @click="$refs.taskPopup.close()"></text>
|
||||
</view>
|
||||
<view class="body-wrap">
|
||||
@@ -228,7 +228,7 @@
|
||||
<text class="subordinate-consumption">
|
||||
{{ item.title }}
|
||||
<text class="iconfont icon-wenhao" @click="openTips(item)"></text>
|
||||
<text class="incomplete">{{ item.progress == 100 ? $lang('completed') : $lang('incomplete') }}</text>
|
||||
<text class="incomplete">{{ item.progress == 100 ? $lang('completed') : $lang('fenxiao.index.incomplete') }}</text>
|
||||
</text>
|
||||
<view class="circle">
|
||||
<progress :percent="item.progress" activeColor="#E7B667" stroke-width="4" />
|
||||
@@ -236,7 +236,7 @@
|
||||
<text class="zero">{{ item.value }}</text>
|
||||
<text>/{{ item.condition }}</text>
|
||||
<text class="to-complete-box" @click="$util.redirectTo('/pages_promotion/fenxiao/promote')">
|
||||
<text class="to-complete">{{ item.progress == 100 ? $lang('completed') : $lang('goComplete') }}</text>
|
||||
<text class="to-complete">{{ item.progress == 100 ? $lang('completed') : $lang('fenxiao.index.goComplete') }}</text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -246,12 +246,12 @@
|
||||
<uni-popup type="bottom" ref="tips">
|
||||
<view class="popup">
|
||||
<view class="popup-header">
|
||||
<text class="tit">{{ $lang('tip') }}</text>
|
||||
<text class="tit">{{ $lang('fenxiao.index.tip') }}</text>
|
||||
<text class="iconfont icon-close" @click="$refs.tips.close()"></text>
|
||||
</view>
|
||||
<view class="popup-body">
|
||||
<view>{{ tips }}</view>
|
||||
<view v-if="levelInfo">{{ levelInfo.upgrade_type == 1 ? $lang('anyConditionUpgrade') : $lang('allConditionsUpgrade') }}</view>
|
||||
<view v-if="levelInfo">{{ levelInfo.upgrade_type == 1 ? $lang('fenxiao.index.anyConditionUpgrade') : $lang('fenxiao.index.allConditionsUpgrade') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
@@ -295,7 +295,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.fenxiaoWords && this.fenxiaoWords.concept) this.$langConfig.title(this.fenxiaoWords.concept + this.$lang('center'));
|
||||
if (this.fenxiaoWords && this.fenxiaoWords.concept) this.$langConfig.title(this.fenxiaoWords.concept + this.$lang('fenxiao.index.center'));
|
||||
|
||||
this.checkFenxiaoIsStart();
|
||||
this.getTemplateId();
|
||||
@@ -305,7 +305,7 @@ export default {
|
||||
setTimeout(() => {
|
||||
if (!this.addonIsExist.fenxiao) {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('merchantNotOpenFenxiao'),
|
||||
title: this.$lang('fenxiao.index.merchantNotOpenFenxiao'),
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
@@ -346,7 +346,7 @@ export default {
|
||||
this.getFenxiaoDetail();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('merchantNotOpenFenxiao'),
|
||||
title: this.$lang('fenxiao.index.merchantNotOpenFenxiao'),
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
@@ -366,7 +366,7 @@ export default {
|
||||
if (res.data) {
|
||||
if (res.data.status == -1) {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('fenxiaoFrozen')
|
||||
title: this.$lang('fenxiao.index.fenxiaoFrozen')
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
|
||||
@@ -474,9 +474,9 @@ export default {
|
||||
|
||||
if (level.one_fenxiao_order_num > 0) {
|
||||
let task = {
|
||||
title: this.$lang('subordinateConsumption'),
|
||||
desc: this.$lang('subordinateOrderCount', { count: level.one_fenxiao_order_num }),
|
||||
tips: this.$lang('subordinateOrderCountTip'),
|
||||
title: this.$lang('fenxiao.index.subordinateConsumption'),
|
||||
desc: this.$lang('fenxiao.index.subordinateOrderCount', { count: level.one_fenxiao_order_num }),
|
||||
tips: this.$lang('fenxiao.index.subordinateOrderCountTip'),
|
||||
condition: level.one_fenxiao_order_num,
|
||||
value: this.info.one_fenxiao_order_num,
|
||||
progress: parseFloat(this.info.one_fenxiao_order_num) > parseFloat(level.one_fenxiao_order_num) ?
|
||||
@@ -488,9 +488,9 @@ export default {
|
||||
}
|
||||
if (level.one_fenxiao_total_order > 0) {
|
||||
let task = {
|
||||
title: this.$lang('subordinateConsumption'),
|
||||
desc: this.$lang('subordinateOrderAmount', { amount: this.moneyFormat(level.one_fenxiao_total_order) }),
|
||||
tips: this.$lang('subordinateOrderAmountTip'),
|
||||
title: this.$lang('fenxiao.index.subordinateConsumption'),
|
||||
desc: this.$lang('fenxiao.index.subordinateOrderAmount', { amount: this.moneyFormat(level.one_fenxiao_total_order) }),
|
||||
tips: this.$lang('fenxiao.index.subordinateOrderAmountTip'),
|
||||
condition: this.moneyFormat(level.one_fenxiao_total_order),
|
||||
value: this.info.one_fenxiao_total_order,
|
||||
progress: parseFloat(this.info.one_fenxiao_total_order) > parseFloat(level.one_fenxiao_total_order) ?
|
||||
@@ -502,9 +502,9 @@ export default {
|
||||
}
|
||||
if (level.one_fenxiao_order_money > 0) {
|
||||
let task = {
|
||||
title: this.$lang('subordinateConsumption'),
|
||||
desc: this.$lang('subordinateCommissionAmount', { account: this.fenxiaoWords.account, amount: this.moneyFormat(level.one_fenxiao_order_money) }),
|
||||
tips: this.$lang('subordinateCommissionAmountTip', { account: this.fenxiaoWords.account }),
|
||||
title: this.$lang('fenxiao.index.subordinateConsumption'),
|
||||
desc: this.$lang('fenxiao.index.subordinateCommissionAmount', { account: this.fenxiaoWords.account, amount: this.moneyFormat(level.one_fenxiao_order_money) }),
|
||||
tips: this.$lang('fenxiao.index.subordinateCommissionAmountTip', { account: this.fenxiaoWords.account }),
|
||||
condition: this.moneyFormat(level.one_fenxiao_order_money),
|
||||
value: this.info.one_fenxiao_order_money,
|
||||
progress: parseFloat(this.info.one_fenxiao_order_money) > parseFloat(level.one_fenxiao_order_money) ?
|
||||
@@ -516,9 +516,9 @@ export default {
|
||||
}
|
||||
if (level.order_num > 0) {
|
||||
let task = {
|
||||
title: this.$lang('selfConsumption'),
|
||||
desc: this.$lang('selfOrderCount', { count: level.order_num }),
|
||||
tips: this.$lang('selfOrderCountTip'),
|
||||
title: this.$lang('fenxiao.index.selfConsumption'),
|
||||
desc: this.$lang('fenxiao.index.selfOrderCount', { count: level.order_num }),
|
||||
tips: this.$lang('fenxiao.index.selfOrderCountTip'),
|
||||
condition: level.order_num,
|
||||
value: this.info.order_num,
|
||||
progress: parseFloat(this.info.order_num) > parseFloat(level.order_num) ? 100 : ((parseFloat(this.info.order_num) / parseFloat(level.order_num)) * 100).toFixed(2)
|
||||
@@ -528,9 +528,9 @@ export default {
|
||||
}
|
||||
if (level.order_money > 0) {
|
||||
let task = {
|
||||
title: this.$lang('selfConsumption'),
|
||||
desc: this.$lang('selfOrderAmount', { amount: this.moneyFormat(level.order_money) }),
|
||||
tips: this.$lang('selfOrderAmountTip'),
|
||||
title: this.$lang('fenxiao.index.selfConsumption'),
|
||||
desc: this.$lang('fenxiao.index.selfOrderAmount', { amount: this.moneyFormat(level.order_money) }),
|
||||
tips: this.$lang('fenxiao.index.selfOrderAmountTip'),
|
||||
condition: this.moneyFormat(level.order_money),
|
||||
value: this.info.order_money,
|
||||
progress: parseFloat(this.info.order_money) > parseFloat(level.order_money) ?
|
||||
@@ -542,9 +542,9 @@ export default {
|
||||
}
|
||||
if (level.one_child_num > 0) {
|
||||
let task = {
|
||||
title: this.$lang('inviteFriends'),
|
||||
desc: this.$lang('inviteFriendCount', { count: level.one_child_num }),
|
||||
tips: this.$lang('inviteFriendCountTip'),
|
||||
title: this.$lang('fenxiao.index.inviteFriends'),
|
||||
desc: this.$lang('fenxiao.index.inviteFriendCount', { count: level.one_child_num }),
|
||||
tips: this.$lang('fenxiao.index.inviteFriendCountTip'),
|
||||
condition: level.one_child_num,
|
||||
value: this.info.one_child_num,
|
||||
progress: parseFloat(this.info.one_child_num) > parseFloat(level.one_child_num) ?
|
||||
@@ -556,9 +556,9 @@ export default {
|
||||
}
|
||||
if (level.one_child_fenxiao_num > 0) {
|
||||
let task = {
|
||||
title: this.$lang('inviteFriends'),
|
||||
desc: this.$lang('inviteFenxiaoCount', { count: level.one_child_fenxiao_num }),
|
||||
tips: this.$lang('inviteFenxiaoCountTip'),
|
||||
title: this.$lang('fenxiao.index.inviteFriends'),
|
||||
desc: this.$lang('fenxiao.index.inviteFenxiaoCount', { count: level.one_child_fenxiao_num }),
|
||||
tips: this.$lang('fenxiao.index.inviteFenxiaoCountTip'),
|
||||
condition: level.one_child_fenxiao_num,
|
||||
value: this.info.one_child_fenxiao_num,
|
||||
progress: parseFloat(this.info.one_child_fenxiao_num) > parseFloat(level.one_child_fenxiao_num) ?
|
||||
|
||||
Reference in New Issue
Block a user