refactor: 将项目内硬编码文本替换为多语言调用
统一替换所有页面和组件中的硬编码字符串为 $lang 多语言方法调用,提升项目国际化适配能力
This commit is contained in:
@@ -392,10 +392,10 @@ export default {
|
||||
fail: res => {
|
||||
this.flag = false;
|
||||
if (res.errMsg == 'requestOrderPayment:fail cancel') {
|
||||
this.$util.showToast({ title: '您已取消支付' });
|
||||
this.$util.showToast({ title: this.$lang('payment.payCancel') });
|
||||
} else {
|
||||
uni.showModal({
|
||||
content: '支付失败,失败原因: ' + res.errMsg,
|
||||
content: this.$lang('payment.payFail') + ', ' + this.$lang('payment.errorReason') + 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.$util.showToast({ title: this.$lang('payment.payCancel') });
|
||||
} else {
|
||||
uni.showModal({
|
||||
content: '支付失败,失败原因: ' + res.errMsg,
|
||||
content: this.$lang('payment.payFail') + ', ' + this.$lang('payment.errorReason') + res.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user