feat: add and optimize multilingual text resources
- add new language packs for multiple pages and components including category, cart, order, member center, distribution, etc. - add Chinese and English translations for new features and UI text - fix navigation service error message to use multilingual text - update component templates to use dynamic language translation instead of hardcoded text - adjust code indentation and formatting for consistency
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
<view class="order-item" v-for="(item, index) in refundList" :key="index">
|
||||
<view class="order-header">
|
||||
<text class="status-num font-size-base">{{ item.order_no }}</text>
|
||||
<view class="status-name" v-if="item.refund_status == 3">退款成功</view>
|
||||
<view class="status-name color-base-text" v-if="item.refund_status == 1">退款中</view>
|
||||
<view class="status-name color-base-text" v-if="item.refund_status == -1">退款失败</view>
|
||||
<view class="status-name" v-if="item.refund_status == 3">{{ $lang('status.success') }}</view>
|
||||
<view class="status-name color-base-text" v-if="item.refund_status == 1">{{ $lang('status.processing') }}</view>
|
||||
<view class="status-name color-base-text" v-if="item.refund_status == -1">{{ $lang('status.failed') }}</view>
|
||||
</view>
|
||||
<view class="goods-wrap">
|
||||
<image :src="$util.img(item.sku_image, { size: 'mid' })" @error="imageError(index)" mode="aspectFill" :lazy-load="true" show-menu-by-longpress></image>
|
||||
@@ -26,11 +26,11 @@
|
||||
</view>
|
||||
<view class="goods-btn">
|
||||
<view class="btn-text">
|
||||
<text>共{{ item.num }}件商品</text>
|
||||
<text>退款:¥{{ item.refund_status == 3 ? item.refund_real_money : item.refund_apply_money }}</text>
|
||||
<text>{{ $lang('totalItems', { num: item.num }) }}</text>
|
||||
<text>{{ $lang('refundAmount', { currency: $lang('common.currencySymbol'), amount: item.refund_status == 3 ? item.refund_real_money : item.refund_apply_money }) }}</text>
|
||||
</view>
|
||||
<view class="order-action">
|
||||
<view class="order-box-btn" @click="refundDetail(item.order_goods_id)">查看详情</view>
|
||||
<view class="order-box-btn" @click="refundDetail(item.order_goods_id)">{{ $lang('checkDetail') }}</view>
|
||||
<block v-if="item.refund_action.length">
|
||||
<view
|
||||
class="order-box-btn"
|
||||
@@ -112,7 +112,7 @@ export default {
|
||||
this.cancleRefund(data.order_goods_id, res => {
|
||||
if (res.code >= 0) {
|
||||
this.$util.showToast({
|
||||
title: '撤销成功'
|
||||
title: this.$lang('toast.cancelSuccess')
|
||||
});
|
||||
this.$refs.mescroll.refresh();
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</view>
|
||||
<view class="eval-star" v-if="!isEvaluate">
|
||||
<view class="star-box">
|
||||
<view class="star-title color-base-bg-before">描述相符</view>
|
||||
<view class="star-title color-base-bg-before">{{ $lang('order.evaluate.rating.descriptionMatch') }}</view>
|
||||
<view class="rate-box"><sx-rate :value="goodsEvalList[index].scores" :index="index"
|
||||
@change="setStar" /></view>
|
||||
<view class="grade-li">
|
||||
@@ -26,11 +26,11 @@
|
||||
: ''
|
||||
"></view>
|
||||
<view class="font-size-tag color-base-text"
|
||||
v-if="goodsEvalList[index].explain_type == '1'">好评</view>
|
||||
v-if="goodsEvalList[index].explain_type == '1'">{{ $lang('order.evaluate.rating.goodRating') }}</view>
|
||||
<view class="font-size-tag color-base-text"
|
||||
v-if="goodsEvalList[index].explain_type == '2'">中评</view>
|
||||
v-if="goodsEvalList[index].explain_type == '2'">{{ $lang('order.evaluate.rating.mediumRating') }}</view>
|
||||
<view class="font-size-tag color-base-text"
|
||||
v-if="goodsEvalList[index].explain_type == '3'">差评</view>
|
||||
v-if="goodsEvalList[index].explain_type == '3'">{{ $lang('order.evaluate.rating.badRating') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -39,12 +39,12 @@
|
||||
<view class="eval-text">
|
||||
<view class="text-box">
|
||||
<block v-if="!isEvaluate">
|
||||
<textarea placeholder="请在此处输入您的评价" v-model="goodsEvalList[index].content"
|
||||
<textarea :placeholder="$lang('order.evaluate.input.evaluationPlaceholder')" v-model="goodsEvalList[index].content"
|
||||
maxlength="200" />
|
||||
<text class="maxSize">{{ goodsEvalList[index].content.length }}/200</text>
|
||||
</block>
|
||||
<block v-else>
|
||||
<textarea placeholder="请在此处输入您的追评" v-model="goodsEvalList[index].again_content"
|
||||
<textarea :placeholder="$lang('order.evaluate.input.followUpPlaceholder')" v-model="goodsEvalList[index].again_content"
|
||||
maxlength="200" />
|
||||
<text class="maxSize">{{ goodsEvalList[index].again_content.length }}/200</text>
|
||||
</block>
|
||||
@@ -69,9 +69,9 @@
|
||||
<view class="all-election" @click="isAll()" v-if="!isEvaluate">
|
||||
<view class="iconfont color-base-text"
|
||||
:class="isAnonymous ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'"></view>
|
||||
<text>匿名</text>
|
||||
<text>{{ $lang('order.evaluate.action.anonymous') }}</text>
|
||||
</view>
|
||||
<view class="action-btn"><button type="primary" @click="save()">提交</button></view>
|
||||
<view class="action-btn"><button type="primary" @click="save()">{{ $lang('order.evaluate.action.submit') }}</button></view>
|
||||
</view>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ export default {
|
||||
}
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: "未获取到订单数据"
|
||||
title: this.$lang('order.evaluate.toast.orderDataNotFound')
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_order/list', {}, "redirectTo");
|
||||
@@ -157,7 +157,7 @@ export default {
|
||||
save() {
|
||||
if (this.evaluateConfig.evaluate_status == 0) {
|
||||
this.$util.showToast({
|
||||
title: "商家未开启商品评价功能"
|
||||
title: this.$lang('order.evaluate.toast.evaluateNotEnabled')
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -165,14 +165,14 @@ export default {
|
||||
if (this.isEvaluate) {
|
||||
if (!this.goodsEvalList[i].again_content.trim().length) {
|
||||
this.$util.showToast({
|
||||
title: "商品的评价不能为空哦"
|
||||
title: this.$lang('order.evaluate.toast.evaluationCannotBeEmpty')
|
||||
});
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!this.goodsEvalList[i].content.trim().length) {
|
||||
this.$util.showToast({
|
||||
title: "商品的评价不能为空哦"
|
||||
title: this.$lang('order.evaluate.toast.evaluationCannotBeEmpty')
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -197,7 +197,7 @@ export default {
|
||||
success: res => {
|
||||
if (res.code == 0) {
|
||||
this.$util.showToast({
|
||||
title: "评价成功"
|
||||
title: this.$lang('order.evaluate.toast.evaluationSuccess')
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_order/list', {}, "redirectTo");
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
<view class="refund-option">
|
||||
<view class="option-item" @click="selectRefundType(1)">
|
||||
<view>
|
||||
<text>退款无需退货</text>
|
||||
<text class="font-size-goods-tag color-tip">没收到货,或与卖家协商同意无需退货只退款</text>
|
||||
<text>{{ $lang('refundTypeSelect.refundOnly') }}</text>
|
||||
<text class="font-size-goods-tag color-tip">{{ $lang('refundTypeSelect.refundOnlyDesc') }}</text>
|
||||
</view>
|
||||
<text class="iconfont icon-right"></text>
|
||||
</view>
|
||||
<view class="option-item" @click="selectRefundType(2)" v-if="refund_data.order_status == 3">
|
||||
<view>
|
||||
<text>退货退款</text>
|
||||
<text class="font-size-goods-tag color-tip">已收到货,需退还收到的货物</text>
|
||||
<text>{{ $lang('refundTypeSelect.returnRefund') }}</text>
|
||||
<text class="font-size-goods-tag color-tip">{{ $lang('refundTypeSelect.returnRefundDesc') }}</text>
|
||||
</view>
|
||||
<text class="iconfont icon-right"></text>
|
||||
</view>
|
||||
@@ -75,7 +75,7 @@
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '未获取到该订单项退款信息'
|
||||
title: this.$lang('toast.noRefundInfo')
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_order/list');
|
||||
|
||||
Reference in New Issue
Block a user