refactor(i18n): 替换硬编码文本为多语言配置
1. 删除冗余的语言文件 contenr.js 2. 将页面内硬编码字符串替换为$this.lang()调用 3. 整理common.js内的多语言词条,归类移动旧有配置到正确分组
This commit is contained in:
@@ -1 +0,0 @@
|
||||
export const lang = {}
|
||||
@@ -1550,16 +1550,35 @@ export const lang = {
|
||||
// 预约时间
|
||||
yuyueDate: {
|
||||
appointedDate: "指定日期",
|
||||
full: "已约满",
|
||||
available: "可预约",
|
||||
noSelection: "暂无选择",
|
||||
},
|
||||
|
||||
// 企业微信
|
||||
wxwork: {
|
||||
jumpSuccess: "跳转成功",
|
||||
notConfigured: "未配置企业微信客服信息",
|
||||
sdkNotInit: "企业微信SDK未初始化",
|
||||
jumpFailed: "跳转失败,请检查企业微信配置",
|
||||
openProfileFailed: "打开用户资料失败",
|
||||
},
|
||||
|
||||
// 隐私协议
|
||||
privacy: {
|
||||
noAgreementTip: "未同意隐私协议,无法使用相关功能",
|
||||
title: "用户隐私保护指引",
|
||||
thanks: "感谢使用",
|
||||
beforeUse: "在使用前,请您仔细阅读",
|
||||
agreeTip: "我们将通过",
|
||||
functionTip: "为您提供相关服务",
|
||||
disagree: "不同意",
|
||||
agreeAndContinue: "同意并继续",
|
||||
contractName: "用户隐私保护指引",
|
||||
miniAppName: "本小程序",
|
||||
appName: "本应用",
|
||||
termsTitle: "《隐私条款》",
|
||||
serviceTerms: "《用户服务协议》",
|
||||
},
|
||||
|
||||
// 优惠券组件
|
||||
@@ -2390,6 +2409,19 @@ export const lang = {
|
||||
// 商品
|
||||
goods: {
|
||||
piece: "件",
|
||||
buy: "购买",
|
||||
givePoints: "送{points}积分",
|
||||
giveDiscountCoupon: "送{num}张{discount}折优惠券",
|
||||
andGiveDiscountCoupon: "、送{num}张{discount}折优惠券",
|
||||
giveMoneyCoupon: "送{num}张{money}元优惠券",
|
||||
andGiveMoneyCoupon: "、送{num}张{money}元优惠券",
|
||||
spendLimit: "满{limit}{unit}",
|
||||
semicolonSpend: ";",
|
||||
spendLimitFreeShipping: "满{limit}{unit}包邮",
|
||||
semicolonSpendLimitFreeShipping: ";满{limit}{unit}包邮",
|
||||
searchResultCount: "搜索结果共{count}件商品",
|
||||
insufficientStock: "商品库存不足",
|
||||
maxBuyLimit: "该商品每人限购{max}{unit}",
|
||||
},
|
||||
|
||||
// 文章
|
||||
@@ -2397,13 +2429,26 @@ export const lang = {
|
||||
viewMore: "查看更多",
|
||||
},
|
||||
|
||||
// 隐私
|
||||
privacy: {
|
||||
contractName: "用户隐私保护指引",
|
||||
miniAppName: "本小程序",
|
||||
appName: "本应用",
|
||||
termsTitle: "《隐私条款》",
|
||||
serviceTerms: "《用户服务协议》",
|
||||
// 商户
|
||||
merch: {
|
||||
grounding: "下架",
|
||||
listing: "上架",
|
||||
sameDay: "当日达",
|
||||
nextDay: "次日达",
|
||||
dayAfter: "隔日达",
|
||||
autoDeliver: "自动发货",
|
||||
manualDeliver: "手动发货",
|
||||
storeVerify: "到店核销",
|
||||
autoReceive: "自动收货",
|
||||
buyerConfirm: "买家确认收货",
|
||||
permanent: "永久",
|
||||
validDays: "购买后几日有效",
|
||||
expireDate: "指定过期日期",
|
||||
addCarmi: "添加卡密",
|
||||
singleLimit: "单次限购",
|
||||
longLimit: "长期限购",
|
||||
editGoods: "编辑商品",
|
||||
addGoods: "添加商品",
|
||||
},
|
||||
|
||||
// 配送
|
||||
@@ -2411,15 +2456,6 @@ export const lang = {
|
||||
immediate: "立即配送",
|
||||
},
|
||||
|
||||
// 企业微信
|
||||
wxwork: {
|
||||
notConfigured: "未配置企业微信客服信息",
|
||||
jumpFailed: "跳转失败,请检查企业微信配置",
|
||||
sdkNotInit: "企业微信SDK未初始化",
|
||||
openProfileFailed: "打开用户资料失败",
|
||||
jumpSuccess: "跳转成功",
|
||||
},
|
||||
|
||||
// 客服
|
||||
kefu: {
|
||||
hoverNavConsult: "来自悬浮按钮的咨询",
|
||||
@@ -2441,12 +2477,4 @@ export const lang = {
|
||||
hoursAgo: "小时前",
|
||||
daysAgo: "天前",
|
||||
},
|
||||
|
||||
// 预约日期
|
||||
yuyueDate: {
|
||||
appointedDate: "指定日期",
|
||||
full: "已约满",
|
||||
available: "可预约",
|
||||
noSelection: "暂无选择",
|
||||
},
|
||||
};
|
||||
|
||||
@@ -140,8 +140,8 @@ export default {
|
||||
})
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您确定已经收到货物了吗?',
|
||||
title: this.$lang('common.tip'),
|
||||
content: this.$lang('order.confirmReceived'),
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.$api.sendRequest({
|
||||
@@ -234,8 +234,8 @@ export default {
|
||||
})
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您确定要进行收货吗?',
|
||||
title: this.$lang('common.tip'),
|
||||
content: this.$lang('order.confirmTakeDelivery'),
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
this.$api.sendRequest({
|
||||
|
||||
@@ -53,54 +53,54 @@ export default {
|
||||
begin_time:'',//团购开始时间
|
||||
end_time:''//团购结束时间
|
||||
},
|
||||
groundingArray: ['下架', '上架'],
|
||||
groundingArray: [this.$lang('merch.grounding'), this.$lang('merch.listing')],
|
||||
|
||||
pickuptypeArray: ['当日达', '次日达', '隔日达'],//, '自定义'
|
||||
pickuptypeArray: [this.$lang('merch.sameDay'), this.$lang('merch.nextDay'), this.$lang('merch.dayAfter')],//, '自定义'
|
||||
|
||||
|
||||
currCategory: 0, // 当前所设置的商品分类
|
||||
virtualDeliverArray: [{
|
||||
name: '自动发货',
|
||||
name: this.$lang('merch.autoDeliver'),
|
||||
value: 'auto_deliver',
|
||||
},
|
||||
{
|
||||
name: '手动发货',
|
||||
name: this.$lang('merch.manualDeliver'),
|
||||
value: 'artificial_deliver',
|
||||
},
|
||||
{
|
||||
name: '到店核销',
|
||||
name: this.$lang('merch.storeVerify'),
|
||||
value: 'verify',
|
||||
}
|
||||
],
|
||||
virtualDeliverValue: {
|
||||
'auto_deliver': '自动发货',
|
||||
'artificial_deliver': '手动发货',
|
||||
'verify': '到店核销'
|
||||
'auto_deliver': this.$lang('merch.autoDeliver'),
|
||||
'artificial_deliver': this.$lang('merch.manualDeliver'),
|
||||
'verify': this.$lang('merch.storeVerify')
|
||||
},
|
||||
virtualReceiveArray: [{
|
||||
name: '自动收货',
|
||||
name: this.$lang('merch.autoReceive'),
|
||||
value: 'auto_receive',
|
||||
},
|
||||
{
|
||||
name: '买家确认收货',
|
||||
name: this.$lang('merch.buyerConfirm'),
|
||||
value: 'artificial_receive',
|
||||
},
|
||||
],
|
||||
virtualReceiveValue: {
|
||||
'auto_receive': '自动收货',
|
||||
'artificial_receive': '买家确认收货',
|
||||
'auto_receive': this.$lang('merch.autoReceive'),
|
||||
'artificial_receive': this.$lang('merch.buyerConfirm'),
|
||||
},
|
||||
validityTypeArray: ['永久', '购买后几日有效', '指定过期日期'],
|
||||
validityTypeArray: [this.$lang('merch.permanent'), this.$lang('merch.validDays'), this.$lang('merch.expireDate')],
|
||||
virtualIndate: 0,
|
||||
minDate: '',
|
||||
carmiLength: '添加卡密',
|
||||
carmiLength: this.$lang('merch.addCarmi'),
|
||||
limitLength: [ //限购
|
||||
{
|
||||
name: '单次限购',
|
||||
name: this.$lang('merch.singleLimit'),
|
||||
value: '1'
|
||||
},
|
||||
{
|
||||
name: '长期限购',
|
||||
name: this.$lang('merch.longLimit'),
|
||||
value: '2'
|
||||
}
|
||||
],
|
||||
|
||||
@@ -39,7 +39,7 @@ export default {
|
||||
fontWeight: false,
|
||||
padding: 0,
|
||||
cartEvent: "detail",
|
||||
text: "购买",
|
||||
text: this.$lang('goods.buy'),
|
||||
textColor: "#FFFFFF",
|
||||
theme: "default",
|
||||
aroundRadius: 25,
|
||||
|
||||
Reference in New Issue
Block a user