feat: 新增多语言文案与组件国际化适配

本次提交完成了大量多语言相关的新增与优化工作:
1. 新增充值、案例、会员资产、订单等页面的中文/英文翻译文案
2. 新增企业微信客服、时间选择、支付弹窗等组件的多语言包
3. 优化工具函数与自定义页面的多语言适配,替换硬编码提示文案
4. 新增会员等级规则、积分商品、退款管理等页面的国际化支持
5. 修复企业微信JS-SDK的错误提示文案硬编码问题
This commit is contained in:
2026-06-26 09:09:46 +08:00
parent 2d8846c64c
commit 066ca61d97
97 changed files with 2704 additions and 716 deletions

View File

@@ -318,9 +318,9 @@ export default {
let list = this.couponList;
if (res.data.is_exist == 1 && res.code < 0) {
msg = '您已领取过该优惠券,快去使用吧';
msg = this.$lang('couponAlreadyClaimed');
} else if (res.code == 0) {
msg = '领取成功,快去使用吧';
msg = this.$lang('couponClaimSuccess');
} else {
msg = res.message;
}
@@ -362,7 +362,7 @@ export default {
//获取满减信息
getManjian(data) {
this.manjian = data;
let limit = data.type == 0 ? '元' : '件';
let limit = data.type == 0 ? this.$lang('manjianUnitYuan') : this.$lang('manjianUnitPiece');
Object.keys(data.rule_json).forEach((key) => {
var item = data.rule_json[key];
if (item.coupon_data) {
@@ -373,41 +373,46 @@ export default {
item.limit = data.type == 0 ? parseFloat(item.limit).toFixed(2) : parseInt(item.limit);
// 满减
if (item.discount_money != undefined) {
let itemText = this.$lang('fullReductionItem', { limit: item.limit, unit: limit, money: item.discount_money });
if (this.manjian.manjian == undefined) {
this.manjian.manjian = '满' + item.limit + limit + '减' + item.discount_money + '元';
this.manjian.manjian = itemText;
} else {
this.manjian.manjian += ';满' + item.limit + limit + '减' + item.discount_money + '元';
this.manjian.manjian += this.$lang('manjianItemSeparator') + itemText;
}
}
// 满送
if (item.point != undefined || item.coupon != undefined) {
let text = '';
if (item.point != undefined) {
text = '送' + item.point + '积分';
text = this.$lang('fullGiftPoints', { point: item.point });
}
if (item.coupon != undefined && item.coupon_data != undefined) {
item.coupon_data.forEach((couponItem, couponIndex) => {
if (couponItem.type == 'discount') {
if (text == '') text = '送' + item.coupon_num[couponIndex] + '张' + parseFloat(couponItem.discount) + '折优惠券';
else text += '、送' + item.coupon_num[couponIndex] + '张' + parseFloat(couponItem.discount) + '折优惠券';
let couponText = this.$lang('fullGiftDiscountCoupon', { count: item.coupon_num[couponIndex], discount: parseFloat(couponItem.discount) });
if (text == '') text = couponText;
else text += this.$lang('fullGiftConnector') + couponText;
} else {
if (text == '') text = '送' + item.coupon_num[couponIndex] + '张' + parseFloat(couponItem.money) + '元优惠券';
else text += '、送' + item.coupon_num[couponIndex] + '张' + parseFloat(couponItem.money) + '元优惠券';
let couponText = this.$lang('fullGiftMoneyCoupon', { count: item.coupon_num[couponIndex], money: parseFloat(couponItem.money) });
if (text == '') text = couponText;
else text += this.$lang('fullGiftConnector') + couponText;
}
})
}
let giftItemText = this.$lang('fullGiftItem', { limit: item.limit, unit: limit, gift: text });
if (this.manjian.mansong == undefined) {
this.manjian.mansong = '满' + item.limit + limit + text;
this.manjian.mansong = giftItemText;
} else {
this.manjian.mansong += ';' + '满' + item.limit + limit + text;
this.manjian.mansong += this.$lang('manjianItemSeparator') + giftItemText;
}
}
// 包邮
if (item.free_shipping != undefined) {
let itemText = this.$lang('freeShippingItem', { limit: item.limit, unit: limit });
if (this.manjian.free_shipping == undefined) {
this.manjian.free_shipping = '满' + item.limit + limit + '包邮';
this.manjian.free_shipping = itemText;
} else {
this.manjian.free_shipping += ';满' + item.limit + limit + '包邮';
this.manjian.free_shipping += this.$lang('manjianItemSeparator') + itemText;
}
}
});