refactor: 替换多页面国际化文本为硬编码中文内容
移除项目内大部分$lang()国际化调用,替换为直接中文文本,统一前端展示文案
This commit is contained in:
@@ -53,54 +53,54 @@ export default {
|
||||
begin_time:'',//团购开始时间
|
||||
end_time:''//团购结束时间
|
||||
},
|
||||
groundingArray: [this.$lang('merch.grounding'), this.$lang('merch.listing')],
|
||||
groundingArray: ['下架', '上架'],
|
||||
|
||||
pickuptypeArray: [this.$lang('merch.sameDay'), this.$lang('merch.nextDay'), this.$lang('merch.dayAfter')],//, '自定义'
|
||||
pickuptypeArray: ['当日达', '次日达', '隔日达'],//, '自定义'
|
||||
|
||||
|
||||
currCategory: 0, // 当前所设置的商品分类
|
||||
virtualDeliverArray: [{
|
||||
name: this.$lang('merch.autoDeliver'),
|
||||
name: '自动发货',
|
||||
value: 'auto_deliver',
|
||||
},
|
||||
{
|
||||
name: this.$lang('merch.manualDeliver'),
|
||||
name: '手动发货',
|
||||
value: 'artificial_deliver',
|
||||
},
|
||||
{
|
||||
name: this.$lang('merch.storeVerify'),
|
||||
name: '到店核销',
|
||||
value: 'verify',
|
||||
}
|
||||
],
|
||||
virtualDeliverValue: {
|
||||
'auto_deliver': this.$lang('merch.autoDeliver'),
|
||||
'artificial_deliver': this.$lang('merch.manualDeliver'),
|
||||
'verify': this.$lang('merch.storeVerify')
|
||||
'auto_deliver': '自动发货',
|
||||
'artificial_deliver': '手动发货',
|
||||
'verify': '到店核销'
|
||||
},
|
||||
virtualReceiveArray: [{
|
||||
name: this.$lang('merch.autoReceive'),
|
||||
name: '自动收货',
|
||||
value: 'auto_receive',
|
||||
},
|
||||
{
|
||||
name: this.$lang('merch.buyerConfirm'),
|
||||
name: '买家确认收货',
|
||||
value: 'artificial_receive',
|
||||
},
|
||||
],
|
||||
virtualReceiveValue: {
|
||||
'auto_receive': this.$lang('merch.autoReceive'),
|
||||
'artificial_receive': this.$lang('merch.buyerConfirm'),
|
||||
'auto_receive': '自动收货',
|
||||
'artificial_receive': '买家确认收货',
|
||||
},
|
||||
validityTypeArray: [this.$lang('merch.permanent'), this.$lang('merch.validDays'), this.$lang('merch.expireDate')],
|
||||
validityTypeArray: ['永久', '购买后几日有效', '指定过期日期'],
|
||||
virtualIndate: 0,
|
||||
minDate: '',
|
||||
carmiLength: this.$lang('merch.addCarmi'),
|
||||
carmiLength: '添加卡密',
|
||||
limitLength: [ //限购
|
||||
{
|
||||
name: this.$lang('merch.singleLimit'),
|
||||
name: '单次限购',
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
name: this.$lang('merch.longLimit'),
|
||||
name: '长期限购',
|
||||
value: '2'
|
||||
}
|
||||
],
|
||||
@@ -123,14 +123,14 @@ export default {
|
||||
if (this.goodsData.id) {
|
||||
this.isAWait = true;
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.$lang('merch.editGoods')
|
||||
title: '编辑商品'
|
||||
});
|
||||
await this.editGetGoodsInfo();
|
||||
} else {
|
||||
|
||||
this.isAWait = false;
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.$lang('merch.addGoods')
|
||||
title: '添加商品'
|
||||
});
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ export default {
|
||||
if(res.result.detail){
|
||||
this.goodsData = res.result.detail
|
||||
this.$util.showToast({
|
||||
title: this.$lang('merch.goodsNotExist'),
|
||||
title: '商品不存在',
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_goods/list', {}, 'redirectTo');
|
||||
@@ -265,7 +265,7 @@ export default {
|
||||
this.$forceUpdate();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('merch.goodsNotExist'),
|
||||
title: '商品不存在',
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_goods/list', {}, 'redirectTo');
|
||||
@@ -493,7 +493,7 @@ export default {
|
||||
addShopCategory() {
|
||||
if (this.shopCategoryNumber == 10) {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('merch.maxCategoryLimit')
|
||||
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 = this.$lang('merch.addCarmiWithCount', { count: 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: this.$lang('merch.inputGoodsName')
|
||||
title: '请输入商品名称'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.goodsData.subtitle.length > 100) {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('merch.subtitleMaxLength')
|
||||
title: '商品简介不能超过100个字符'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.goodsData.goods_image.length == 0) {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('merch.uploadGoodsImage')
|
||||
title: '请上传商品图片'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
@@ -632,7 +632,7 @@ export default {
|
||||
if (this.goodsData.price == 0) {
|
||||
|
||||
this.$util.showToast({
|
||||
title: this.$lang('merch.inputPrice')
|
||||
title: '请输入销售价'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
@@ -655,26 +655,26 @@ export default {
|
||||
// 总库存
|
||||
if (this.goodsData.total == 0) {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('merch.inputStock')
|
||||
title: '请输入库存'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isNaN(this.goodsData.total) || !this.$util.data().regExp.number.test(this.goodsData.total)) {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('merch.stockFormatError')
|
||||
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: this.$lang('merch.startCountFormatError')
|
||||
title: '[起售]格式输入错误'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.goodsData.goods_start_count < 0) {
|
||||
this.$util.showToast({
|
||||
title: this.$lang('merch.startCountNotNegative')
|
||||
title: '起售数量不能小于0'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
@@ -905,7 +905,7 @@ export default {
|
||||
getGoodsForm() {
|
||||
getOrderFormList().then(res=>{
|
||||
if (res.data) {
|
||||
let goodsForm = [this.$lang('merch.selectGoodsForm')];
|
||||
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 = [this.$lang('merch.selectSupplier')];
|
||||
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