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:
@@ -11,8 +11,8 @@
|
||||
:src="$util.img('public/uniapp/order/order-icon-close.png')" />
|
||||
<view class="status-name">
|
||||
<view class="status-name">
|
||||
{{ orderData.order_status == 0 ? $lang('status.pendingPayment') : orderData.order_status == 1 ? $lang('status.completed') :
|
||||
orderData.order_status == -1 ? $lang('status.closed') : '' }}
|
||||
{{ orderData.order_status == 0 ? $lang('order.detail_point.status.pendingPayment') : orderData.order_status == 1 ? $lang('order.detail_point.status.completed') :
|
||||
orderData.order_status == -1 ? $lang('order.detail_point.status.closed') : '' }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -32,7 +32,7 @@
|
||||
<view>
|
||||
<text class="goods-price color-base-text">
|
||||
<text>
|
||||
<text>{{ orderData.point }}{{ $lang('goods.points') }}</text>
|
||||
<text>{{ orderData.point }}{{ $lang('order.detail_point.goods.points') }}</text>
|
||||
<text v-if="orderData.price > 0" class="price-color">
|
||||
+
|
||||
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
|
||||
@@ -58,26 +58,26 @@
|
||||
<!-- 订单概况 -->
|
||||
<view class="order-summary">
|
||||
<view class="order-cell">
|
||||
<text class="tit">{{ $lang('orderInfo.orderNo') }}</text>
|
||||
<text class="tit">{{ $lang('order.detail_point.orderInfo.orderNo') }}</text>
|
||||
<view class="box">
|
||||
<text class="color-title">{{ orderData.order_no }}</text>
|
||||
<view class="copy" @click="$util.copy(orderData.order_no)">{{ $lang('orderInfo.copy') }}</view>
|
||||
<view class="copy" @click="$util.copy(orderData.order_no)">{{ $lang('order.detail_point.orderInfo.copy') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-cell">
|
||||
<text class="tit">{{ $lang('orderInfo.outTradeNo') }}</text>
|
||||
<text class="tit">{{ $lang('order.detail_point.orderInfo.outTradeNo') }}</text>
|
||||
<view class="box">
|
||||
<text class="color-title">{{ orderData.out_trade_no }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-cell">
|
||||
<text class="tit">{{ $lang('orderInfo.createTime') }}</text>
|
||||
<text class="tit">{{ $lang('order.detail_point.orderInfo.createTime') }}</text>
|
||||
<view class="box">
|
||||
<text class="color-title">{{ $util.timeStampTurnTime(orderData.create_time) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-cell" v-if="orderData.close_time > 0">
|
||||
<text class="tit">{{ $lang('orderInfo.closeTime') }}</text>
|
||||
<text class="tit">{{ $lang('order.detail_point.orderInfo.closeTime') }}</text>
|
||||
<view class="box">
|
||||
<text class="color-title">{{ $util.timeStampTurnTime(orderData.close_time) }}</text>
|
||||
</view>
|
||||
@@ -96,7 +96,7 @@
|
||||
<!-- 订单金额 -->
|
||||
<view class="order-money">
|
||||
<view class="order-cell" v-if="orderData.point > 0">
|
||||
<text class="tit">{{ $lang('amount.pointsUsed') }}</text>
|
||||
<text class="tit">{{ $lang('order.detail_point.amount.pointsUsed') }}</text>
|
||||
<view class="box align-right">
|
||||
<text class="color-base-text price-font">
|
||||
<text>{{ orderData.point }}</text>
|
||||
@@ -104,7 +104,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="order-cell" v-if="orderData.delivery_price > 0">
|
||||
<text class="tit">{{ $lang('amount.deliveryFee') }}</text>
|
||||
<text class="tit">{{ $lang('order.detail_point.amount.deliveryFee') }}</text>
|
||||
<view class="box align-right">
|
||||
<text class="color-base-text price-font">
|
||||
<text class="unit font-size-tag">{{ $lang('common.currencySymbol') }}</text>
|
||||
@@ -114,7 +114,7 @@
|
||||
</view>
|
||||
<view class="order-cell" v-if="orderData.order_money > 0">
|
||||
<view class="box align-right">
|
||||
<text>{{ $lang('amount.totalPayable') }}</text>
|
||||
<text>{{ $lang('order.detail_point.amount.totalPayable') }}</text>
|
||||
<text class="color-base-text price-font">
|
||||
<text class="font-size-goods-tag">{{ $lang('common.currencySymbol') }}</text>
|
||||
<text class="font-size-base">{{ orderData.order_money }}</text>
|
||||
@@ -123,9 +123,9 @@
|
||||
</view>
|
||||
|
||||
<view class="order-action" v-if="orderData.order_status == 0 && orderData.type == 1">
|
||||
<view class="order-box-btn" @click="orderClose()">{{ $lang('button.close') }}</view>
|
||||
<view class="order-box-btn" @click="orderClose()">{{ $lang('order.detail_point.button.close') }}</view>
|
||||
<view class="order-box-btn color-base-bg color-base-border color-text-white"
|
||||
@click="openChoosePayment()">{{ $lang('button.pay') }}</view>
|
||||
@click="openChoosePayment()">{{ $lang('order.detail_point.button.pay') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -200,7 +200,7 @@ export default {
|
||||
JSON.parse(this.orderData.delivery_store_info);
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('toast.orderInfoNotFound')
|
||||
title: this.$lang('order.detail_point.toast.orderInfoNotFound')
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_order/list');
|
||||
@@ -221,8 +221,8 @@ export default {
|
||||
},
|
||||
orderClose() {
|
||||
uni.showModal({
|
||||
title: this.$lang('modal.tip'),
|
||||
content: this.$lang('modal.confirmClose'),
|
||||
title: this.$lang('order.detail_point.modal.tip'),
|
||||
content: this.$lang('order.detail_point.modal.confirmClose'),
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.$api.sendRequest({
|
||||
@@ -233,7 +233,7 @@ export default {
|
||||
success: res => {
|
||||
if (res.code >= 0) {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('toast.closeSuccess')
|
||||
title: this.$lang('order.detail_point.toast.closeSuccess')
|
||||
});
|
||||
this.getOrderData();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user