refactor: 替换多页面国际化文本为硬编码中文内容
移除项目内大部分$lang()国际化调用,替换为直接中文文本,统一前端展示文案
This commit is contained in:
@@ -4,19 +4,19 @@
|
||||
<uni-popup ref="choosePaymentPopup" type="center" :mask-click="false">
|
||||
<view class="choose-payment-popup popup" @touchmove.prevent.stop>
|
||||
<view class="popup-header">
|
||||
<text class="tit">{{ $lang('payment.paymentMethod') }}</text>
|
||||
<text class="tit">支付方式</text>
|
||||
<text class="iconfont icon-close" @click="close()"></text>
|
||||
</view>
|
||||
<scroll-view scroll-y="true" class="popup-body" :class="{ 'safe-area': isIphoneX }">
|
||||
<view class="pay-money">
|
||||
<!-- <text class="unit">{{ $lang('common.currencySymbol') }}</text> -->
|
||||
<text class="money">{{ $lang('payment.paymentAmount') }}{{ payMoney | moneyFormat }}{{ $lang('sku.unit') }}</text>
|
||||
<text class="money">支付金额{{ payMoney | moneyFormat }}元</text>
|
||||
</view>
|
||||
<view class="payment-item" v-if="balanceDeduct > 0 && balanceConfig == 1 && sale">
|
||||
<view class="iconfont icon-yue"></view>
|
||||
<view class="info-wrap">
|
||||
<text class="name">{{ $lang('payment.balanceDeduct') }}</text>
|
||||
<view class="money">{{ $lang('payment.available') }}¥{{ balanceDeduct }}</view>
|
||||
<text class="name">余额抵扣</text>
|
||||
<view class="money">可用¥{{ balanceDeduct }}</view>
|
||||
</view>
|
||||
<ns-switch class="balance-switch" @change="useBalance" :checked="isBalance == 1"></ns-switch>
|
||||
</view>
|
||||
@@ -31,12 +31,12 @@
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="empty">{{ $lang('payment.noPaymentMethod') }}</view>
|
||||
<view class="empty">平台尚未配置支付方式!</view>
|
||||
</block>
|
||||
</block>
|
||||
</scroll-view>
|
||||
<view class="popup-footer" :class="{ 'bottom-safe-area': isIphoneX }">
|
||||
<view class="confirm-btn color-base-bg" @click="confirm()">{{ $lang('payment.confirmPayment') }}</view>
|
||||
<view class="confirm-btn color-base-bg" @click="confirm()">确认支付</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
@@ -72,12 +72,12 @@ export default {
|
||||
payIndex: 0,
|
||||
// #ifdef H5
|
||||
payTypeList: [{
|
||||
name: this.$lang('payment.alipayPay'),
|
||||
name: '支付宝支付',
|
||||
icon: 'icon-zhifubaozhifu-',
|
||||
type: 'alipay'
|
||||
},
|
||||
{
|
||||
name: this.$lang('payment.wechatPay'),
|
||||
name: '微信支付',
|
||||
icon: 'icon-weixin1',
|
||||
type: 'wechatpay'
|
||||
}
|
||||
@@ -86,7 +86,7 @@ export default {
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
payTypeList: [{
|
||||
name: this.$lang('payment.wechatPay'),
|
||||
name: '微信支付',
|
||||
provider: 'wxpay',
|
||||
icon: 'icon-weixin1',
|
||||
type: 'wechatpay'
|
||||
@@ -95,7 +95,7 @@ export default {
|
||||
// #endif
|
||||
// #ifdef MP-ALIPAY
|
||||
payTypeList: [{
|
||||
name: this.$lang('payment.alipayPay'),
|
||||
name: '支付宝支付',
|
||||
icon: 'icon-zhifubaozhifu-',
|
||||
type: 'alipay',
|
||||
provider: 'alipay'
|
||||
@@ -158,12 +158,12 @@ export default {
|
||||
confirm() {
|
||||
if (this.payTypeList.length == 0 && this.payMoney > 0) {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('payment.selectPaymentMethod')
|
||||
title: '请选择支付方式!'
|
||||
});
|
||||
return;
|
||||
}
|
||||
uni.showLoading({
|
||||
title: this.$lang('payment.paying'),
|
||||
title: '支付中...',
|
||||
mask: true
|
||||
});
|
||||
this.$refs.choosePaymentPopup.close();
|
||||
@@ -182,7 +182,7 @@ export default {
|
||||
this.pay();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('payment.noPaymentInfo')
|
||||
title: '未获取到支付信息!'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||
@@ -295,7 +295,7 @@ export default {
|
||||
},
|
||||
res => {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('payment.cancelledPayment')
|
||||
title: '您已取消支付'
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_tool/pay/result', {
|
||||
@@ -392,10 +392,10 @@ export default {
|
||||
fail: res => {
|
||||
this.flag = false;
|
||||
if (res.errMsg == 'requestOrderPayment:fail cancel') {
|
||||
this.$util.showToast({ title: this.$lang('payment.payCancel') });
|
||||
this.$util.showToast({ title: '您已取消支付' });
|
||||
} else {
|
||||
uni.showModal({
|
||||
content: this.$lang('payment.payFail') + ', ' + this.$lang('payment.errorReason') + res.errMsg,
|
||||
content: '支付失败,失败原因: ' + res.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
@@ -428,10 +428,10 @@ export default {
|
||||
fail: res => {
|
||||
this.flag = false;
|
||||
if (res.errMsg == 'requestPayment:fail cancel') {
|
||||
this.$util.showToast({ title: this.$lang('payment.payCancel') });
|
||||
this.$util.showToast({ title: '您已取消支付' });
|
||||
} else {
|
||||
uni.showModal({
|
||||
content: this.$lang('payment.payFail') + ', ' + this.$lang('payment.errorReason') + res.errMsg,
|
||||
content: '支付失败,失败原因: ' + res.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user