feat: 新增多语言国际化页面配置,修复部分页面硬编码文案
1. 新增了zh-cn和en-us两套语言下的大量页面国际化配置文件,覆盖商品、订单、会员、营销活动等多个业务模块 2. 修复了分销页面、VR页面、支付页面、商品不存在页面的硬编码提示文案,替换为国际化调用 3. 删除了原有的i18n检查脚本文件
This commit is contained in:
@@ -53,54 +53,54 @@ export default {
|
||||
begin_time:'',//团购开始时间
|
||||
end_time:''//团购结束时间
|
||||
},
|
||||
groundingArray: [$lang('merch.public.edit.l56'), $lang('merch.public.edit.l56')],
|
||||
groundingArray: ['下架', '上架'],
|
||||
|
||||
pickuptypeArray: [$lang('merch.public.edit.l58'), $lang('merch.public.edit.l58'), $lang('merch.public.edit.l58')],//, $lang('merch.public.edit.l58')
|
||||
pickuptypeArray: ['当日达', '次日达', '隔日达'],//, '自定义'
|
||||
|
||||
|
||||
currCategory: 0, // 当前所设置的商品分类
|
||||
virtualDeliverArray: [{
|
||||
name: $lang('merch.public.edit.l63'),
|
||||
name: '自动发货',
|
||||
value: 'auto_deliver',
|
||||
},
|
||||
{
|
||||
name: $lang('merch.public.edit.l67'),
|
||||
name: '手动发货',
|
||||
value: 'artificial_deliver',
|
||||
},
|
||||
{
|
||||
name: $lang('merch.public.edit.l71'),
|
||||
name: '到店核销',
|
||||
value: 'verify',
|
||||
}
|
||||
],
|
||||
virtualDeliverValue: {
|
||||
'auto_deliver': $lang('merch.public.edit.l63'),
|
||||
'artificial_deliver': $lang('merch.public.edit.l67'),
|
||||
'verify': $lang('merch.public.edit.l71')
|
||||
'auto_deliver': '自动发货',
|
||||
'artificial_deliver': '手动发货',
|
||||
'verify': '到店核销'
|
||||
},
|
||||
virtualReceiveArray: [{
|
||||
name: $lang('merch.public.edit.l81'),
|
||||
name: '自动收货',
|
||||
value: 'auto_receive',
|
||||
},
|
||||
{
|
||||
name: $lang('merch.public.edit.l85'),
|
||||
name: '买家确认收货',
|
||||
value: 'artificial_receive',
|
||||
},
|
||||
],
|
||||
virtualReceiveValue: {
|
||||
'auto_receive': $lang('merch.public.edit.l81'),
|
||||
'artificial_receive': $lang('merch.public.edit.l85'),
|
||||
'auto_receive': '自动收货',
|
||||
'artificial_receive': '买家确认收货',
|
||||
},
|
||||
validityTypeArray: [$lang('goods.detail.l133'), $lang('merch.public.edit.l93'), $lang('merch.public.edit.l93')],
|
||||
validityTypeArray: ['永久', '购买后几日有效', '指定过期日期'],
|
||||
virtualIndate: 0,
|
||||
minDate: '',
|
||||
carmiLength: $lang('merch.public.edit.l96'),
|
||||
carmiLength: '添加卡密',
|
||||
limitLength: [ //限购
|
||||
{
|
||||
name: $lang('merch.public.edit.l99'),
|
||||
name: '单次限购',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
name: $lang('merch.public.edit.l103'),
|
||||
name: '长期限购',
|
||||
value: '2'
|
||||
}
|
||||
],
|
||||
@@ -123,14 +123,14 @@ export default {
|
||||
if (this.goodsData.id) {
|
||||
this.isAWait = true;
|
||||
uni.setNavigationBarTitle({
|
||||
title: $lang('merch.public.edit.l126')
|
||||
title: '编辑商品'
|
||||
});
|
||||
await this.editGetGoodsInfo();
|
||||
} else {
|
||||
|
||||
this.isAWait = false;
|
||||
uni.setNavigationBarTitle({
|
||||
title: $lang('merch.public.edit.l133')
|
||||
title: '添加商品'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ export default {
|
||||
if(res.result.detail){
|
||||
this.goodsData = res.result.detail
|
||||
this.$util.showToast({
|
||||
title: $lang('merch.public.edit.l170'),
|
||||
title: '商品不存在',
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_goods/list', {}, 'redirectTo');
|
||||
@@ -265,7 +265,7 @@ export default {
|
||||
this.$forceUpdate();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: $lang('merch.public.edit.l170'),
|
||||
title: '商品不存在',
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_goods/list', {}, 'redirectTo');
|
||||
@@ -493,7 +493,7 @@ export default {
|
||||
addShopCategory() {
|
||||
if (this.shopCategoryNumber == 10) {
|
||||
this.$util.showToast({
|
||||
title: $lang('merch.public.edit.l496')
|
||||
title: '商品可以属于多个分类,最多10个'
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -530,7 +530,7 @@ export default {
|
||||
|
||||
this.goodsData.carmichael = uni.getStorageSync('editGoodsCarmichael') ? JSON.parse(uni.getStorageSync('editGoodsCarmichael')) : [];
|
||||
if (this.goodsData.carmichael.length > 0) {
|
||||
this.carmiLength = $lang('merch.public.edit.l533') + this.goodsData.carmichael.length + '】'
|
||||
this.carmiLength = '添加卡密【' + this.goodsData.carmichael.length + '】'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -568,21 +568,21 @@ export default {
|
||||
|
||||
if (this.goodsData.goodsname.length == 0) {
|
||||
this.$util.showToast({
|
||||
title: $lang('common.ns-navbar.l31.t0')
|
||||
title: '请输入商品名称'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.goodsData.subtitle.length > 100) {
|
||||
this.$util.showToast({
|
||||
title: $lang('merch.public.edit.l578')
|
||||
title: '商品简介不能超过100个字符'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.goodsData.goods_image.length == 0) {
|
||||
this.$util.showToast({
|
||||
title: $lang('merch.public.edit.l585')
|
||||
title: '请上传商品图片'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
@@ -632,20 +632,20 @@ export default {
|
||||
if (this.goodsData.price == 0) {
|
||||
|
||||
this.$util.showToast({
|
||||
title: $lang('merch.public.edit.l635')
|
||||
title: '请输入销售价'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (isNaN(this.goodsData.price) || !this.$util.data().regExp.digit.test(this.goodsData.price)) {
|
||||
this.$util.showToast({
|
||||
title: $lang('merch.public.edit.l641')
|
||||
title: '[销售价]格式输入错误'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.goodsData.productprice.length > 0 && (isNaN(this.goodsData.productprice) || !this.$util.data().regExp.digit.test(this.goodsData.productprice))) {
|
||||
this.$util.showToast({
|
||||
title: $lang('merch.public.edit.l648')
|
||||
title: '[原价价]格式输入错误'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
@@ -655,26 +655,26 @@ export default {
|
||||
// 总库存
|
||||
if (this.goodsData.total == 0) {
|
||||
this.$util.showToast({
|
||||
title: $lang('merch.public.edit.l658')
|
||||
title: '请输入库存'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isNaN(this.goodsData.total) || !this.$util.data().regExp.number.test(this.goodsData.total)) {
|
||||
this.$util.showToast({
|
||||
title: $lang('merch.public.edit.l665')
|
||||
title: '[库存]格式输入错误'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (isNaN(this.goodsData.goods_start_count) || !this.$util.data().regExp.number.test(this.goodsData.goods_start_count)) {
|
||||
this.$util.showToast({
|
||||
title: $lang('merch.public.edit.l671')
|
||||
title: '[起售]格式输入错误'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.goodsData.goods_start_count < 0) {
|
||||
this.$util.showToast({
|
||||
title: $lang('merch.public.edit.l677')
|
||||
title: '起售数量不能小于0'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
@@ -905,7 +905,7 @@ export default {
|
||||
getGoodsForm() {
|
||||
getOrderFormList().then(res=>{
|
||||
if (res.data) {
|
||||
let goodsForm = [$lang('merch.public.edit.l908')];
|
||||
let goodsForm = ['请选择商品表单'];
|
||||
res.data.forEach((item, index) => {
|
||||
goodsForm.push(item.form_name);
|
||||
if (this.goodsData.form_id && this.goodsData.form_id == item.id) this.goodsData.goods_form_index = index + 1;
|
||||
@@ -926,7 +926,7 @@ export default {
|
||||
getSupplyList() {
|
||||
getSupplyList().then(res=>{
|
||||
if (res.data) {
|
||||
let supplyForm = [$lang('merch.public.edit.l929')];
|
||||
let supplyForm = ['请选择供应商'];
|
||||
res.data.forEach((item, index) => {
|
||||
supplyForm.push(item.title);
|
||||
if (this.goodsData.supplier_id && this.goodsData.supplier_id == item.supplier_id) this.goodsData.supply_index = index + 1;
|
||||
|
||||
Reference in New Issue
Block a user