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:
@@ -4,11 +4,11 @@
|
||||
<view class="order-detail-box">
|
||||
<view class="header">
|
||||
<view class="title">
|
||||
<text>{{ $lang('totalItems', { count: orderData.num }) }}</text>
|
||||
<text>{{ $lang('fenxiao.order_detail.totalItems', { count: orderData.num }) }}</text>
|
||||
</view>
|
||||
<text class="color-base-text font-size-tag" v-if="orderData.is_refund == 1">{{ $lang('statusRefunded') }}</text>
|
||||
<text class="color-base-text font-size-tag" v-else-if="orderData.is_settlement == 1">{{ $lang('statusSettled') }}</text>
|
||||
<text class="color-base-text font-size-tag" v-else>{{ $lang('statusPendingSettlement') }}</text>
|
||||
<text class="color-base-text font-size-tag" v-if="orderData.is_refund == 1">{{ $lang('fenxiao.order_detail.statusRefunded') }}</text>
|
||||
<text class="color-base-text font-size-tag" v-else-if="orderData.is_settlement == 1">{{ $lang('fenxiao.order_detail.statusSettled') }}</text>
|
||||
<text class="color-base-text font-size-tag" v-else>{{ $lang('fenxiao.order_detail.statusPendingSettlement') }}</text>
|
||||
</view>
|
||||
<view class="detail-body">
|
||||
<view class="detail-body-box">
|
||||
@@ -37,27 +37,27 @@
|
||||
<view class="detail-footer">
|
||||
<text></text>
|
||||
<text>
|
||||
<text>{{ $lang('totalLabel') }}</text>
|
||||
<text>{{ $lang('fenxiao.order_detail.totalLabel') }}</text>
|
||||
<text class="price-color total">{{ $lang('common.currencySymbol') }}{{ orderData.real_goods_money }}</text>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-detail-box commission">
|
||||
<view class="header">
|
||||
<view class="title color-base-bg-before"><text>{{ $lang('commissionDetail') }}</text></view>
|
||||
<view class="title color-base-bg-before"><text>{{ $lang('fenxiao.order_detail.commissionDetail') }}</text></view>
|
||||
<text class="color-base-text"> </text>
|
||||
</view>
|
||||
<view class="detail-content">
|
||||
<view class="order-info-item">
|
||||
<text class="tit">{{ $lang('orderNo') }}</text>
|
||||
<text class="tit">{{ $lang('fenxiao.order_detail.orderNo') }}</text>
|
||||
<text>{{ orderData.order_no }}</text>
|
||||
</view>
|
||||
<view class="order-info-item">
|
||||
<text class="tit">{{ $lang('commissionLevel') }}</text>
|
||||
<text>{{ $lang('levelText', { level: orderData.commission_level }) }}</text>
|
||||
<text class="tit">{{ $lang('fenxiao.order_detail.commissionLevel') }}</text>
|
||||
<text>{{ $lang('fenxiao.order_detail.levelText', { level: orderData.commission_level }) }}</text>
|
||||
</view>
|
||||
<view class="order-info-item">
|
||||
<text class="tit">{{ $lang('commissionAmount') }}</text>
|
||||
<text class="tit">{{ $lang('fenxiao.order_detail.commissionAmount') }}</text>
|
||||
<text class="price-color font-size-toolbar">
|
||||
<text class="font-size-goods-tag">{{ $lang('common.currencySymbol') }}</text>
|
||||
{{ parseFloat(orderData.commission).toFixed(2).split(".")[0] }}
|
||||
@@ -100,7 +100,7 @@ export default {
|
||||
setTimeout( () => {
|
||||
if (!this.addonIsExist.fenxiao) {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('merchantNotOpenFenxiao'),
|
||||
title: this.$lang('fenxiao.order_detail.merchantNotOpenFenxiao'),
|
||||
mask: true,
|
||||
duration: 2000
|
||||
});
|
||||
@@ -131,7 +131,7 @@ export default {
|
||||
this.orderData = res.data;
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('orderInfoNotFound')
|
||||
title: this.$lang('fenxiao.order_detail.orderInfoNotFound')
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_promotion/fenxiao/order', {}, 'redirectTo');
|
||||
|
||||
Reference in New Issue
Block a user