diff --git a/common/js/auth.js b/common/js/auth.js index d125d8e..60fd437 100644 --- a/common/js/auth.js +++ b/common/js/auth.js @@ -33,8 +33,8 @@ export default { } else { fallbackFunc && fallbackFunc(res); this.$util.showToast({ - title: res.message ? res.message : '小程序配置错误' - }); + title: res.message ? res.message : this.$lang('common.auth.miniProgramConfigError') + }); } } }) @@ -74,8 +74,8 @@ export default { } else { fallbackFunc && fallbackFunc(res); this.$util.showToast({ - title: res.message ? res.message : '小程序配置错误' - }); + title: res.message ? res.message : this.$lang('common.auth.miniProgramConfigError') + }); } } }) diff --git a/common/js/goods_detail_base.js b/common/js/goods_detail_base.js index de2f153..b37dc85 100644 --- a/common/js/goods_detail_base.js +++ b/common/js/goods_detail_base.js @@ -141,7 +141,7 @@ export default { }); this.goodsSkuDetail.swiperHeight = maxHeight + 'px'; - this.goodsSkuDetail.unit = this.goodsSkuDetail.unit || "件"; + this.goodsSkuDetail.unit = this.goodsSkuDetail.unit || this.$lang('unit.piece'); // 当前商品SKU规格 if (this.goodsSkuDetail.sku_spec_format) this.goodsSkuDetail.sku_spec_format = JSON.parse(this.goodsSkuDetail.sku_spec_format); @@ -199,7 +199,7 @@ export default { if (this.$refs.goodsDetailView) { // 初始化商品详情视图数据 - this.goodsSkuDetail.unit = this.goodsSkuDetail.unit || "件"; + this.goodsSkuDetail.unit = this.goodsSkuDetail.unit || this.$lang('unit.piece'); // 解决轮播图数量不一致时,切换到第一个 if (this.swiperCurrent > this.goodsSkuDetail.sku_images.length) { diff --git a/common/js/lang.js b/common/js/lang.js index 7f7fe01..165d5e6 100644 --- a/common/js/lang.js +++ b/common/js/lang.js @@ -42,6 +42,12 @@ const SHARED_LANG_PACKS = [ 'components/register-reward', 'components/wxwork-contact', 'components/yuyue-date', + 'components/chat-message', + 'components/pick-regions', + 'components/ns-goods-sku', + 'components/ns-chat-receiveGoods', + 'components/ns-chat-goods', + 'components/ns-video-player-popup', 'components-diy/diy-article', 'components-diy/diy-bargain', 'components-diy/diy-category', @@ -58,6 +64,16 @@ const SHARED_LANG_PACKS = [ 'components-diy/diy-seckill', 'components-diy/diy-store', 'components-diy/diy-video', + 'components-diy/diy-search', + 'components-diy/diy-map', + 'components-diy/diy-kefu', + 'components-diy/diy-channel-video', + 'components-diy/diy-live', + 'components-diy/diy-listmenu', + 'components-diy/diy-text', + 'components-diy/diy-goods-recommend', + 'components-diy/diy-notes', + 'member/public', ]; function toCamelCaseName(name) { diff --git a/common/js/map/openMap.js b/common/js/map/openMap.js index 6c6a560..89ce913 100644 --- a/common/js/map/openMap.js +++ b/common/js/map/openMap.js @@ -1,5 +1,6 @@ import util from '@/common/js/util.js' import TransformCoordinate from './transformCoordinate.js' +import Lang from '@/common/js/lang.js' function openMapByDefault(latitude, longitude, name) { uni.openLocation({ @@ -8,7 +9,7 @@ function openMapByDefault(latitude, longitude, name) { name: name, fail: (e) => { uni.showModal({ - content: '打开地图失败,请稍后重试' + content: Lang.lang('common.map.openMapFailed') }) }, }) diff --git a/components-diy/diy-channel-video.vue b/components-diy/diy-channel-video.vue index 36056e6..fac5af7 100644 --- a/components-diy/diy-channel-video.vue +++ b/components-diy/diy-channel-video.vue @@ -17,7 +17,7 @@ {{ value.videoTitle }} - {{ value.viewCount }}次观看 + {{ $lang('components-diy.diyChannelVideo.viewCountSuffix', { count: value.viewCount }) }} @@ -29,7 +29,7 @@ - {{ value.viewCount }}次观看 + {{ $lang('components-diy.diyChannelVideo.viewCountSuffix', { count: value.viewCount }) }} @@ -37,7 +37,7 @@ {{ value.videoTitle }} - {{ value.viewCount }}次观看 + {{ $lang('components-diy.diyChannelVideo.viewCountSuffix', { count: value.viewCount }) }} diff --git a/components-diy/diy-goods-recommend.vue b/components-diy/diy-goods-recommend.vue index 54929c4..c7441d4 100644 --- a/components-diy/diy-goods-recommend.vue +++ b/components-diy/diy-goods-recommend.vue @@ -50,19 +50,19 @@ - ¥{{ showMarketPrice(dataItem) }} - - 售{{ dataItem.sale_num }}{{ dataItem.unit ? dataItem.unit : '件' }} - - - - - - - - - + ¥{{ showMarketPrice(dataItem) }} + + {{ $lang('components-diy.diyGoodsRecommend.soldPrefix') }}{{ dataItem.sale_num }}{{ dataItem.unit ? dataItem.unit : $lang('unit.piece') }} + + + + + + + + +