refactor: 替换项目中硬编码文本为多语言配置

将多处页面和组件内的硬编码文字替换为国际化语言包调用,包括空状态提示、按钮文案、表单占位符、弹窗标题等内容,统一项目多语言管理
This commit is contained in:
2026-06-22 10:38:33 +08:00
parent 062fb3be90
commit 45830ebda4
14 changed files with 126 additions and 126 deletions

View File

@@ -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">支付方式</text>
<text class="tit">{{ $lang('payment.paymentMethod') }}</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">支付金额{{ payMoney | moneyFormat }}元</text>
<text class="money">{{ $lang('payment.paymentAmount') }}{{ payMoney | moneyFormat }}{{ $lang('sku.unit') }}</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">余额抵扣</text>
<view class="money">可用¥{{ balanceDeduct }}</view>
<text class="name">{{ $lang('payment.balanceDeduct') }}</text>
<view class="money">{{ $lang('payment.available') }}¥{{ 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">平台尚未配置支付方式!</view>
<view class="empty">{{ $lang('payment.noPaymentMethod') }}</view>
</block>
</block>
</scroll-view>
<view class="popup-footer" :class="{ 'bottom-safe-area': isIphoneX }">
<view class="confirm-btn color-base-bg" @click="confirm()">确认支付</view>
<view class="confirm-btn color-base-bg" @click="confirm()">{{ $lang('payment.confirmPayment') }}</view>
</view>
</view>
</uni-popup>
@@ -158,12 +158,12 @@ export default {
confirm() {
if (this.payTypeList.length == 0 && this.payMoney > 0) {
this.$util.showToast({
title: '请选择支付方式!'
title: this.$lang('payment.selectPaymentMethod')
});
return;
}
uni.showLoading({
title: '支付中...',
title: this.$lang('payment.paying'),
mask: true
});
this.$refs.choosePaymentPopup.close();
@@ -182,7 +182,7 @@ export default {
this.pay();
} else {
this.$util.showToast({
title: '未获取到支付信息!'
title: this.$lang('payment.noPaymentInfo')
});
setTimeout(() => {
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
@@ -295,7 +295,7 @@ export default {
},
res => {
this.$util.showToast({
title: '您已取消支付'
title: this.$lang('payment.cancelledPayment')
});
setTimeout(() => {
this.$util.redirectTo('/pages_tool/pay/result', {