refactor: 替换多页面国际化文本为硬编码中文内容

移除项目内大部分$lang()国际化调用,替换为直接中文文本,统一前端展示文案
This commit is contained in:
2026-06-23 08:55:16 +08:00
parent 750ed2dac7
commit f258987e0e
180 changed files with 2207 additions and 4701 deletions

View File

@@ -34,20 +34,20 @@ export default {
*/
promotion(data){
if (data.promotion && data.promotion.manjian && data.promotion.manjian.length) {
let promotionStr = {title: this.$lang('order.fullReduce'), content: ''}
let promotionStr = {title: `满减送`, content: ''}
data.promotion.manjian.forEach((mItem,mIndex)=>{
let promotion = '';
let content = {};
let limit = mItem.type == 0 ? this.$lang('common.yuan') : this.$lang('sku.unit');
let limit = mItem.type == 0 ? '元' : '件';
if(mItem.rule){
var item = mItem.discount_array.rule;
item.limit = mItem.type == 0 ? parseFloat(item.limit).toFixed(2) : parseInt(item.limit);
// 满减
if (item.discount_money != undefined) {
if (content.manjian == undefined) {
content.manjian = this.$lang('order.fullReduceDesc', { limit: item.limit, type: limit, money: item.discount_money });
content.manjian = '购买可享受满' + item.limit + limit + '减' + item.discount_money + '元';
} else {
content.manjian += this.$lang('order.fullReduceDesc', { limit: item.limit, type: limit, money: item.discount_money });
content.manjian += ';满' + item.limit + limit + '减' + item.discount_money + '元';
}
}
// 满送优惠券
@@ -55,32 +55,32 @@ export default {
let text = '';
item.coupon_list.forEach((couponItem, couponIndex) => {
if (couponItem.type == 'discount') {
if (text == '') text = this.$lang('order.fullSendCoupon', { num: couponItem.give_num, value: parseFloat(couponItem.discount) });
else text += '、' + this.$lang('order.fullSendCoupon', { num: couponItem.give_num, value: parseFloat(couponItem.discount) });
if (text == '') text = '送'+ couponItem.give_num +'张' + parseFloat(couponItem.discount) + '折优惠券';
else text += '、送'+ couponItem.give_num +'张' + parseFloat(couponItem.discount) + '折优惠券';
} else {
if (text == '') text = this.$lang('order.fullSendCoupon', { num: couponItem.give_num, value: parseFloat(couponItem.money) });
else text += '、' + this.$lang('order.fullSendCoupon', { num: couponItem.give_num, value: parseFloat(couponItem.money) });
if (text == '') text = '送'+ couponItem.give_num +'张' + parseFloat(couponItem.money) + '元优惠券';
else text += '、送'+ couponItem.give_num +'张' + parseFloat(couponItem.money) + '元优惠券';
}
})
if (content.mansong == undefined) {
content.mansong = this.$lang('order.fullSend', { limit: item.limit, type: limit }) + text;
content.mansong = '购物满' + item.limit + limit + text;
} else {
content.mansong += ';' + this.$lang('order.fullSend', { limit: item.limit, type: limit }) + text;
content.mansong += ';' + '满' + item.limit + limit + text;
}
}
// 满送积分
if (item.point) {
let point_text = this.$lang('order.fullSendPoint', { point: item.point });
let point_text = '可得' + item.point + '积分';
if(content.point_text == undefined) {
content.point_text = this.$lang('order.fullSend', { limit: item.limit, type: limit }) + point_text
content.point_text = '购物满' + item.limit + limit + point_text
}else {
content.point_text += ';' + this.$lang('order.fullSend', { limit: item.limit, type: limit }) + point_text;
content.point_text += ';' + '满' + item.limit + limit + point_text;
}
}
// 包邮
if (item.free_shipping != undefined) {
if (content.free_shipping == undefined) {
content.free_shipping = this.$lang('order.freeShipping', { limit: item.limit, type: limit });
content.free_shipping = '购物满' + item.limit + limit + '包邮';
}
}
}