refactor: 替换页面中硬编码文本为多语言配置
将项目中多处页面的硬编码字符串替换为国际化语言包调用,统一文本管理,方便后续多语言扩展和维护
This commit is contained in:
@@ -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('evaluate.matchDescription') }}</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('evaluate.good') }}</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('evaluate.medium') }}</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('evaluate.bad') }}</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('evaluate.inputPlaceholder')" 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('evaluate.additionalInputPlaceholder')" 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('evaluate.anonymous') }}</text>
|
||||
</view>
|
||||
<view class="action-btn"><button type="primary" @click="save()">提交</button></view>
|
||||
<view class="action-btn"><button type="primary" @click="save()">{{ $lang('evaluate.submit') }}</button></view>
|
||||
</view>
|
||||
<loading-cover ref="loadingCover"></loading-cover>
|
||||
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
<view class="refund-option" v-show="!refund_type">
|
||||
<view class="option-item" @click="selectRefundType(1)">
|
||||
<view>
|
||||
<text>退款无需退货</text>
|
||||
<text class="font-size-goods-tag color-tip">没收到货,或与卖家协商同意无需退货只退款</text>
|
||||
<text>{{ $lang('refund.refundOnly') }}</text>
|
||||
<text class="font-size-goods-tag color-tip">{{ $lang('refund.refundOnlyDesc') }}</text>
|
||||
</view>
|
||||
<text class="iconfont icon-right"></text>
|
||||
</view>
|
||||
<view class="option-item" @click="selectRefundType(2)" v-if="refund_data.refund_type.length == 2">
|
||||
<view>
|
||||
<text>退货退款</text>
|
||||
<text class="font-size-goods-tag color-tip">已收到货,需退还收到的货物</text>
|
||||
<text>{{ $lang('refund.returnRefund') }}</text>
|
||||
<text class="font-size-goods-tag color-tip">{{ $lang('refund.returnRefundDesc') }}</text>
|
||||
</view>
|
||||
<text class="iconfont icon-right"></text>
|
||||
</view>
|
||||
@@ -31,27 +31,27 @@
|
||||
<view v-show="refund_type">
|
||||
<view class="refund-form">
|
||||
<view class="item-wrap" @click="openPopup('refundReasonPopup')">
|
||||
<view class="label">退款原因:</view>
|
||||
<view class="label">{{ $lang('refund.refundReason') }}:</view>
|
||||
<view class="cont reason">
|
||||
<text class="color-tip" v-if="!refund_reason.length">请选择</text>
|
||||
<text class="color-tip" v-if="!refund_reason.length">{{ $lang('form.selectPlaceholder') }}</text>
|
||||
<text class="color-tip" v-else>{{ refund_reason }}</text>
|
||||
</view>
|
||||
<text class="iconfont icon-right"></text>
|
||||
</view>
|
||||
<view class="item-wrap">
|
||||
<view class="label">退款金额:</view>
|
||||
<view class="label">{{ $lang('refund.refundAmount') }}:</view>
|
||||
<view class="cont color-base-text">{{ $lang('common.currencySymbol') }}{{ refund_data.refund_money }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="refund-form">
|
||||
<view class="item-wrap"><view class="label active">退款说明</view></view>
|
||||
<view class="item-wrap"><view class="label active">{{ $lang('refund.refundRemark') }}</view></view>
|
||||
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<textarea
|
||||
v-if="!showText"
|
||||
class="newText"
|
||||
placeholder="请输入退款说明(选填)"
|
||||
:placeholder="$lang('refund.remarkPlaceholder')"
|
||||
placeholder-class="color-tip font-size-tag"
|
||||
:auto-height="true"
|
||||
v-model="refund_remark"
|
||||
@@ -60,7 +60,7 @@
|
||||
<!-- #ifdef H5 -->
|
||||
<textarea
|
||||
class="newText"
|
||||
placeholder="请输入退款说明(选填)"
|
||||
:placeholder="$lang('refund.remarkPlaceholder')"
|
||||
@blur="textBlur()"
|
||||
placeholder-class="color-tip font-size-tag"
|
||||
:auto-height="true"
|
||||
@@ -78,7 +78,7 @@
|
||||
<uni-popup ref="refundReasonPopup" type="bottom" @change="change()">
|
||||
<view class="refund-reason-popup popup">
|
||||
<view class="popup-header">
|
||||
<view><text class="tit">退款原因</text></view>
|
||||
<view><text class="tit">{{ $lang('refund.refundReason') }}</text></view>
|
||||
<view class="align-right" @click="closePopup('refundReasonPopup')"><text class="iconfont icon-close"></text></view>
|
||||
</view>
|
||||
<view class="popup-body">
|
||||
@@ -92,7 +92,7 @@
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="popup-footer" :class="{ 'bottom-safe-area': isIphoneX }">
|
||||
<view class="confirm-btn color-base-bg" @click="closePopup('refundReasonPopup')">确定</view>
|
||||
<view class="confirm-btn color-base-bg" @click="closePopup('refundReasonPopup')">{{ $lang('common.confirm') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
@@ -172,7 +172,7 @@ export default {
|
||||
this.refund_data = res.data;
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
} else {
|
||||
this.$util.showToast({ title: '未获取到该订单项退款信息' });
|
||||
this.$util.showToast({ title: this.$lang('refund.notObtained') });
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_order/list');
|
||||
}, 1000);
|
||||
@@ -239,7 +239,7 @@ export default {
|
||||
},
|
||||
verify() {
|
||||
if (this.refund_reason == '') {
|
||||
this.$util.showToast({ title: '请选择退款原因' });
|
||||
this.$util.showToast({ title: this.$lang('refund.selectRefundReason') });
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -5,37 +5,37 @@
|
||||
<view class="status-wrap">
|
||||
<view class="status-name">{{ detail.refund_status_name }}</view>
|
||||
<view class="refund-explain" v-if="detail.refund_status == 1">
|
||||
<view class="font-size-goods-tag color-tip">如果商家拒绝,你可重新发起申请</view>
|
||||
<view class="font-size-goods-tag color-tip">如果商家同意,将通过申请并退款给你</view>
|
||||
<view class="font-size-goods-tag color-tip">{{ $lang('refund.refundProcess') }}</view>
|
||||
<view class="font-size-goods-tag color-tip">{{ $lang('refund.refundProcess2') }}</view>
|
||||
<!-- <view class="font-size-goods-tag color-tip">如果商家逾期未处理,平台将自动通过申请并退款给你</view> -->
|
||||
</view>
|
||||
<view class="refund-explain" v-if="detail.refund_status == 5">
|
||||
<view class="font-size-goods-tag color-tip">如果商家确认收货将会退款给你</view>
|
||||
<view class="font-size-goods-tag color-tip">如果商家拒绝收货,该次退款将会关闭,你可以重新发起退款</view>
|
||||
<view class="font-size-goods-tag color-tip">{{ $lang('refund.refundProcess3') }}</view>
|
||||
<view class="font-size-goods-tag color-tip">{{ $lang('refund.refundProcess4') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="history-wrap" @click="switchAction('consultrecord')">
|
||||
<view>协商记录</view>
|
||||
<view>{{ $lang('refund.negotiationRecord') }}</view>
|
||||
<text class="iconfont icon-right"></text>
|
||||
</view>
|
||||
|
||||
<view class="refund-address-wrap" v-if="detail.refund_status == 4">
|
||||
<view class="header">退货地址</view>
|
||||
<view class="header">{{ $lang('refund.returnAddress') }}</view>
|
||||
<view>
|
||||
<text>收货人:{{ detail.shop_contacts }}</text>
|
||||
<text>{{ $lang('refund.consignee') }}:{{ detail.shop_contacts }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text>联系方式:{{ detail.shop_mobile }}</text>
|
||||
<text>{{ $lang('refund.contactMethod') }}:{{ detail.shop_mobile }}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="address">退货地址:{{ detail.shop_address }}</text>
|
||||
<view class="copy" @click="$util.copy(detail.shop_address)">复制</view>
|
||||
<text class="address">{{ $lang('refund.returnAddressDetail') }}:{{ detail.shop_address }}</text>
|
||||
<view class="copy" @click="$util.copy(detail.shop_address)">{{ $lang('refund.copy') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="refund-info">
|
||||
<view class="header">退款信息</view>
|
||||
<view class="header">{{ $lang('refund.refundInfo') }}</view>
|
||||
<view class="body">
|
||||
<!-- 商品信息 -->
|
||||
<view class="goods-wrap">
|
||||
@@ -48,16 +48,16 @@
|
||||
</view>
|
||||
<!-- 退款信息 -->
|
||||
<view class="info">
|
||||
<view class="cell">退款方式:{{ detail.refund_type == 1 ? '仅退款' : '退款退货' }}</view>
|
||||
<view class="cell" v-if="detail.refund_status == 3">退款途径:{{ detail.refund_money_type == 1 ? '原路退款' : detail.refund_money_type == 2 ? '线下退款' : '退款到余额' }}</view>
|
||||
<view class="cell">退款原因:{{ detail.refund_reason }}</view>
|
||||
<view class="cell" v-if="detail.refund_status == 3 && detail.refund_real_money>0">退款金额:{{ $lang('common.currencySymbol') }}{{ detail.refund_real_money }}</view>
|
||||
<view class="cell" v-else-if="detail.refund_apply_money>0">退款金额:{{ $lang('common.currencySymbol') }}{{ detail.refund_apply_money }}</view>
|
||||
<view class="cell">退款编号:{{ detail.refund_no }}</view>
|
||||
<view class="cell">申请时间:{{ $util.timeStampTurnTime(detail.refund_action_time) }}</view>
|
||||
<view class="cell" v-if="detail.refund_time">退款时间:{{ $util.timeStampTurnTime(detail.refund_time) }}</view>
|
||||
<view class="cell" v-if="detail.refund_remark != ''">退款说明:{{ detail.refund_remark }}</view>
|
||||
<view class="cell" v-if="detail.use_point>0">退款积分:{{ detail.use_point }}</view>
|
||||
<view class="cell">{{ $lang('refund.refundTypeLabel') }}:{{ detail.refund_type == 1 ? $lang('refund.refundOnlyLabel') : $lang('refund.refundReturnLabel') }}</view>
|
||||
<view class="cell" v-if="detail.refund_status == 3">{{ $lang('refund.refundPath') }}:{{ detail.refund_money_type == 1 ? $lang('refund.refundOriginal') : detail.refund_money_type == 2 ? $lang('refund.refundOffline') : $lang('refund.refundToBalance') }}</view>
|
||||
<view class="cell">{{ $lang('refund.refundReason') }}:{{ detail.refund_reason }}</view>
|
||||
<view class="cell" v-if="detail.refund_status == 3 && detail.refund_real_money>0">{{ $lang('refund.refundAmount') }}:{{ $lang('common.currencySymbol') }}{{ detail.refund_real_money }}</view>
|
||||
<view class="cell" v-else-if="detail.refund_apply_money>0">{{ $lang('refund.refundAmount') }}:{{ $lang('common.currencySymbol') }}{{ detail.refund_apply_money }}</view>
|
||||
<view class="cell">{{ $lang('refund.refundNo') }}:{{ detail.refund_no }}</view>
|
||||
<view class="cell">{{ $lang('refund.applyTime') }}:{{ $util.timeStampTurnTime(detail.refund_action_time) }}</view>
|
||||
<view class="cell" v-if="detail.refund_time">{{ $lang('refund.refundTime') }}:{{ $util.timeStampTurnTime(detail.refund_time) }}</view>
|
||||
<view class="cell" v-if="detail.refund_remark != ''">{{ $lang('refund.refundRemark') }}:{{ detail.refund_remark }}</view>
|
||||
<view class="cell" v-if="detail.use_point>0">{{ $lang('refund.refundPoint') }}:{{ detail.use_point }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -72,44 +72,44 @@
|
||||
<view v-show="action == 'returngoods'">
|
||||
<view class="return-goods-container">
|
||||
<view class="form-wrap">
|
||||
<view class="item">
|
||||
<view class="label">物流公司</view>
|
||||
<view class="cont">
|
||||
<input
|
||||
type="text"
|
||||
placeholder="请输入物流公司"
|
||||
class="input"
|
||||
placeholder-class="input-placeholder color-tip"
|
||||
v-model="formData.refund_delivery_name"
|
||||
/>
|
||||
<view class="item">
|
||||
<view class="label">{{ $lang('refund.returnExpressCompany') }}</view>
|
||||
<view class="cont">
|
||||
<input
|
||||
type="text"
|
||||
:placeholder="$lang('refund.inputExpressCompany')"
|
||||
class="input"
|
||||
placeholder-class="input-placeholder color-tip"
|
||||
v-model="formData.refund_delivery_name"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label">{{ $lang('refund.returnExpressNo') }}</view>
|
||||
<view class="cont">
|
||||
<input
|
||||
type="text"
|
||||
:placeholder="$lang('refund.inputExpressNo')"
|
||||
class="input"
|
||||
placeholder-class="input-placeholder color-tip"
|
||||
v-model="formData.refund_delivery_no"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label">{{ $lang('refund.expressRemark') }}</view>
|
||||
<view class="cont">
|
||||
<textarea
|
||||
placeholder-class="color-tip font-size-tag"
|
||||
:auto-height="true"
|
||||
class="textarea"
|
||||
:placeholder="$lang('form.optional')"
|
||||
v-model="formData.refund_delivery_remark"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label">物流单号</view>
|
||||
<view class="cont">
|
||||
<input
|
||||
type="text"
|
||||
placeholder="请输入物流单号"
|
||||
class="input"
|
||||
placeholder-class="input-placeholder color-tip"
|
||||
v-model="formData.refund_delivery_no"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label">物流说明</view>
|
||||
<view class="cont">
|
||||
<textarea
|
||||
placeholder-class="color-tip font-size-tag"
|
||||
:auto-height="true"
|
||||
class="textarea"
|
||||
placeholder="选填"
|
||||
v-model="formData.refund_delivery_remark"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<button type="primary" class="sub-btn" @click="refurnGoods">提交</button>
|
||||
<button type="primary" class="sub-btn" @click="refurnGoods">{{ $lang('form.submit') }}</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
<view class="record-item" :class="logItem.action_way == 1 ? 'buyer' : ''" v-for="(logItem, logIndex) in detail.refund_log_list" :key="logIndex">
|
||||
<view class="cont">
|
||||
<view class="head">
|
||||
<text>{{ logItem.action_way == 1 ? '买家' : '卖家' }}</text>
|
||||
<text>{{ logItem.action_way == 1 ? $lang('refund.buyer') : $lang('refund.seller') }}</text>
|
||||
<text class="time">{{ $util.timeStampTurnTime(logItem.action_time) }}</text>
|
||||
</view>
|
||||
<view class="body">
|
||||
@@ -136,7 +136,7 @@
|
||||
<text>联系客服</text>
|
||||
</view>
|
||||
</ns-contact> -->
|
||||
<view @click="switchAction('')">返回详情</view>
|
||||
<view @click="switchAction('')">{{ $lang('refund.backToDetail') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
@@ -190,7 +190,7 @@ export default {
|
||||
this.detail = res.data;
|
||||
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
|
||||
} else {
|
||||
this.$util.showToast({ title: '未获取到该订单项退款信息' });
|
||||
this.$util.showToast({ title: this.$lang('refund.notObtained') });
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_order/list');
|
||||
}, 1000);
|
||||
@@ -206,7 +206,7 @@ export default {
|
||||
case 'orderRefundCancel':
|
||||
this.cancleRefund(this.detail.order_goods_id, res => {
|
||||
if (res.code >= 0) {
|
||||
this.$util.showToast({ title: '撤销成功' });
|
||||
this.$util.showToast({ title: this.$lang('refund.cancelSuccess') });
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_order/list');
|
||||
}, 1000);
|
||||
@@ -223,8 +223,8 @@ export default {
|
||||
},
|
||||
refurnGoods() {
|
||||
var rule = [
|
||||
{ name: 'refund_delivery_name', checkType: 'required', errorMsg: '请输入物流公司' },
|
||||
{ name: 'refund_delivery_no', checkType: 'required', errorMsg: '请输入物流单号' }
|
||||
{ name: 'refund_delivery_name', checkType: 'required', errorMsg: this.$lang('refund.inputExpressCompany') },
|
||||
{ name: 'refund_delivery_no', checkType: 'required', errorMsg: this.$lang('refund.inputExpressNo') }
|
||||
];
|
||||
this.formData.order_goods_id = this.order_goods_id;
|
||||
var checkRes = validate.check(this.formData, rule);
|
||||
|
||||
@@ -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('refund.refundOnly') }}</text>
|
||||
<text class="font-size-goods-tag color-tip">{{ $lang('refund.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('refund.returnRefund') }}</text>
|
||||
<text class="font-size-goods-tag color-tip">{{ $lang('refund.returnRefundDesc') }}</text>
|
||||
</view>
|
||||
<text class="iconfont icon-right"></text>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user