diff --git a/common/js/customer-service.js b/common/js/customer-service.js index fd5b2fe..efdb244 100644 --- a/common/js/customer-service.js +++ b/common/js/customer-service.js @@ -138,12 +138,12 @@ export class CustomerService { // #ifdef H5 window.location.href = aiChatUrl; // #endif - uni.showToast({ title: '打开客服失败', icon: 'none' }); + uni.showToast({ title: this.vm.$lang('customerService.openFailed'), icon: 'none' }); } }); } catch (e) { console.error('跳转 AI智能客服异常:', e); - uni.showToast({ title: '打开客服失败', icon: 'none' }); + uni.showToast({ title: this.vm.$lang('customerService.openFailed'), icon: 'none' }); } } @@ -223,7 +223,7 @@ export class CustomerService { // 检查是否有企业微信配置 if (!config.wxwork_url && !config.corpid) { console.error('企业微信配置不完整,缺少 wxwork_url 或 corpid'); - uni.showToast({ title: '企业微信配置不完整', icon: 'none' }); + uni.showToast({ title: this.vm.$lang('customerService.wxworkConfigIncomplete'), icon: 'none' }); this.fallbackToPhoneCall(); return; } @@ -267,12 +267,12 @@ export class CustomerService { }, fail: (err) => { console.error('【跳转第三方小程序失败】', err); - uni.showToast({ title: '跳转失败,请稍后重试', icon: 'none' }); + uni.showToast({ title: this.vm.$lang('customerService.jumpFailed'), icon: 'none' }); } }); // #endif // #ifdef H5 - uni.showToast({ title: '第三方小程序客服仅在微信小程序中可用', icon: 'none' }); + uni.showToast({ title: this.vm.$lang('customerService.miniProgramOnly'), icon: 'none' }); // #endif return; } @@ -286,7 +286,7 @@ export class CustomerService { uni.setClipboardData({ data: config.third_url, success: () => { - uni.showToast({ title: '链接已复制,请在浏览器打开', icon: 'none' }); + uni.showToast({ title: this.vm.$lang('customerService.linkCopied'), icon: 'none' }); } }); // #endif @@ -352,7 +352,7 @@ export class CustomerService { // #endif // #ifdef MP uni.setClipboardData({ data: serviceUrl }); - uni.showToast({ title: '客服链接已复制', icon: 'none' }); + uni.showToast({ title: this.vm.$lang('customerService.customerLinkCopied'), icon: 'none' }); // #endif return; } @@ -380,11 +380,11 @@ export class CustomerService { if (res.code === 0 && res.data?.mobile) { uni.makePhoneCall({ phoneNumber: res.data.mobile }); } else { - uni.showToast({ title: '暂无客服电话', icon: 'none' }); + uni.showToast({ title: this.vm.$lang('customerService.noServicePhone'), icon: 'none' }); } }, fail: () => { - uni.showToast({ title: '获取客服电话失败', icon: 'none' }); + uni.showToast({ title: this.vm.$lang('customerService.getPhoneFailed'), icon: 'none' }); } }); } @@ -392,23 +392,23 @@ export class CustomerService { showNoServicePopup() { const siteInfo = this.vm.$store.state.siteInfo || {}; const message = siteInfo?.site_tel - ? `请联系客服,客服电话是 ${siteInfo.site_tel}` - : '抱歉,商家暂无客服,请线下联系'; - uni.showModal({ title: '联系客服', content: message, showCancel: false }); + ? this.vm.$lang('customerService.callServiceTip', { phone: siteInfo.site_tel }) + : this.vm.$lang('customerService.noServiceOffline'); + uni.showModal({ title: this.vm.$lang('customerService.contactCustomerService'), content: message, showCancel: false }); } showConfigErrorPopup(errors) { uni.showModal({ - title: '客服配置错误', - content: `配置有误:\n${errors.join('\n')}`, + title: this.vm.$lang('customerService.configError'), + content: this.vm.$lang('customerService.configErrorDetail', { errors: errors.join('\n') }), showCancel: false }); } fallbackToOriginalService() { uni.showModal({ - title: '提示', - content: '无法直接添加企业微信,是否使用其他方式联系客服?', + title: this.vm.$lang('customerService.tip'), + content: this.vm.$lang('customerService.cannotAddWxwork'), success: (res) => { if (res.confirm) { this.openWxworkService(true); @@ -419,8 +419,8 @@ export class CustomerService { fallbackToPhoneCall() { uni.showModal({ - title: '提示', - content: '在线客服不可用,是否拨打电话联系客服?', + title: this.vm.$lang('customerService.tip'), + content: this.vm.$lang('customerService.onlineUnavailable'), success: (res) => { if (res.confirm) this.makePhoneCall(); } @@ -567,12 +567,12 @@ export class CustomerService { // #ifdef H5 window.location.href = aiChatUrl; // #endif - uni.showToast({ title: '打开客服失败', icon: 'none' }); + uni.showToast({ title: this.vm.$lang('customerService.openFailed'), icon: 'none' }); } }); } catch (e) { console.error('跳转 AI智能客服异常:', e); - uni.showToast({ title: '打开客服失败', icon: 'none' }); + uni.showToast({ title: this.vm.$lang('customerService.openFailed'), icon: 'none' }); } } @@ -580,7 +580,7 @@ export class CustomerService { * 打开客服选择对话框(预留方法) */ openCustomerSelectPopupDialog() { - uni.showToast({ title: '客服选择功能开发中', icon: 'none' }); + uni.showToast({ title: this.vm.$lang('customerService.developing'), icon: 'none' }); } /** @@ -610,7 +610,7 @@ export class CustomerService { if (qyweixinUrl) { window.location.href = qyweixinUrl; } else { - uni.showToast({ title: '企业微信客服未配置', icon: 'none' }); + uni.showToast({ title: this.vm.$lang('customerService.wxworkNotConfigured'), icon: 'none' }); } } } else { @@ -629,7 +629,7 @@ export class CustomerService { if (!validation.isValid) { console.error('客服配置无效:', validation.errors); - uni.showToast({ title: '客服暂不可用', icon: 'none' }); + uni.showToast({ title: this.vm.$lang('customerService.serviceUnavailable'), icon: 'none' }); return; } @@ -646,14 +646,14 @@ export class CustomerService { // #ifdef MP-WEIXIN if (!wxworkConfig?.enable || !wxworkConfig?.contact_url) { console.warn('企业微信配置不完整,使用原生客服'); - uni.showToast({ title: '企业微信配置不完整', icon: 'none' }); + uni.showToast({ title: this.vm.$lang('customerService.wxworkConfigIncomplete'), icon: 'none' }); } // #endif // #ifdef H5 if (!wxworkConfig?.contact_url && !platformConfig.wxwork_url) { console.error('企业微信链接未配置'); - uni.showToast({ title: '企业微信链接未配置', icon: 'none' }); + uni.showToast({ title: this.vm.$lang('customerService.wxworkLinkNotConfigured'), icon: 'none' }); return; } // #endif @@ -662,12 +662,12 @@ export class CustomerService { // 直接调用统一处理方法,由 CustomerService 内部根据配置路由 try { this.handleCustomerClick({ - sendMessageTitle: options.sendMessageTitle || '来自悬浮按钮的咨询', + sendMessageTitle: options.sendMessageTitle || this.vm.$lang('customerService.fromFloatButton'), sendMessagePath: options.sendMessagePath || '/pages/index/index' }); } catch (error) { console.error('客服处理失败:', error); - uni.showToast({ title: '打开客服失败', icon: 'none' }); + uni.showToast({ title: this.vm.$lang('customerService.openFailed'), icon: 'none' }); } } } diff --git a/common/js/diy.js b/common/js/diy.js index 3992dd5..7320054 100644 --- a/common/js/diy.js +++ b/common/js/diy.js @@ -45,6 +45,12 @@ export default { diyRoute: '', // 页面路由 openBottomNav: false, isShowCopyRight: false, + + // getDiyInfo 节流 + diyInfoLoading: false, // 是否正在请求 + lastDiyInfoTime: 0, // 上次成功加载的时间戳 + lastDiyInfoLang: '', // 上次加载时的语言,语言切换时强制刷新 + diyInfoTtl: 3 * 60 * 1000, // 3分钟内不重复请求 //启动广告 adv:{}, @@ -304,20 +310,45 @@ export default { } }, - async getDiyInfo() { - let res = await this.$api.sendRequest({ - url: '/api/diyview/info', - data: { - id: this.id, - name: this.name, - en_type:uni.getStorageSync("lang"),//获取语言底部 - }, - async: false - }); - if (res.code != 0 || !res.data) { + async getDiyInfo(force = false) { + // 节流:正在请求 / N 秒内已加载过 / 语言未变 -> 跳过 + const now = Date.now(); + const currentLang = uni.getStorageSync("lang") || ''; + if (!force) { + if (this.diyInfoLoading) return; + if (this.lastDiyInfoTime && (now - this.lastDiyInfoTime) < this.diyInfoTtl + && this.lastDiyInfoLang === currentLang) { + return; + } + } + + this.diyInfoLoading = true; + let res; + try { + res = await this.$api.sendRequest({ + url: '/api/diyview/info', + data: { + id: this.id, + name: this.name, + en_type: currentLang, + }, + async: false + }); + } catch (e) { + console.error('getDiyInfo request failed', e); + if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); + this.$util.showToast({ + title: '网络异常,请稍后重试' + }); + this.diyInfoLoading = false; + return; + } + this.diyInfoLoading = false; + + if (!res || res.code != 0 || !res.data) { if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); - if (res.code == -3) { + if (res && res.code == -3) { this.$util.showToast({ title: res.message }); @@ -332,12 +363,16 @@ export default { return; } + this.lastDiyInfoTime = now; + this.lastDiyInfoLang = currentLang; + let diyDataValue = res.data; if (diyDataValue.value) { this.diyData = JSON.parse(diyDataValue.value); // 导航栏标题要根据语言环境切换 - const title = this.isEnEnv ? this.diyData?.global?.en_title : this.diyData?.global?.title; + // 优先使用 title_map 多语言 map,没有则回退到 title / en_title + const title = this.$langConfig.getField(this.diyData?.global, 'title'); if (title) this.$langConfig.title(title); this.mpCollect = this.diyData.global.mpCollect; @@ -582,7 +617,7 @@ export default { if (this.id) shareUrl += '?id=' + this.id; else if (this.name) shareUrl += '?name=' + this.name; this.$util.setPublicShare({ - title: this.diyData.global.title, + title: this.$langConfig.getField(this.diyData.global, 'title'), desc: '', link: shareUrl, imgUrl: this.siteInfo ? this.$util.img(this.siteInfo.logo_square) : '' diff --git a/common/js/lang.js b/common/js/lang.js index 0bf8ae9..7f40af2 100644 --- a/common/js/lang.js +++ b/common/js/lang.js @@ -161,6 +161,52 @@ function applyLangParams(value, args) { return result; } +/** + * 从后端数据中提取当前语言的文案(向后兼容) + * + * 优先使用多语言 map(如 title_map / text_map),格式: + * { "zh-cn": "标题", "en-us": "Title" } + * + * 如果没有 map,回退到二元模式(兼容旧数据): + * field = 'title' → 取 title / en_title + * field = 'text' → 取 text / en_text + * + * @param {Object} data 后端数据对象 + * @param {string} field 基础字段名(如 'title'、'text'、'goods_name') + * @param {string} [locale] 目标语言,默认取当前语言 + * @returns {string} 对应语言的文案,找不到返回空串 + */ +function getI18nField(data, field, locale) { + if (!data || !field) return ''; + const lang = locale || getCurrentLocale(); + + // 1) 优先尝试多语言 map: title_map / text_map / goods_name_map + const mapKey = field + '_map'; + const map = data[mapKey]; + if (map && typeof map === 'object' && !Array.isArray(map)) { + // 精确匹配当前语言 + if (map[lang] !== undefined && map[lang] !== null && map[lang] !== '') { + return String(map[lang]); + } + // 兜底:取第一个非空值 + for (const k of Object.keys(map)) { + if (map[k] !== undefined && map[k] !== null && map[k] !== '') { + return String(map[k]); + } + } + } + + // 2) 回退到二元模式: field / en_field + const enKey = 'en_' + field; + if (lang === 'en-us' && data[enKey] !== undefined && data[enKey] !== '') { + return String(data[enKey]); + } + if (data[field] !== undefined && data[field] !== '') { + return String(data[field]); + } + return ''; +} + // 远端覆写:内存缓存 // shape: { [app_lang]: { version, map, ts, global_version } } // key 格式 `${appType}_${lang}`,天然按平台 + 语种二维隔离,避免多端 cache 串味 @@ -487,6 +533,23 @@ export default { */ getCurrentLocale, + /** + * 从后端数据中提取当前语言的文案(向后兼容) + * 优先使用 xxx_map 多语言 map,没有则回退到 xxx / en_xxx 二元模式 + * + * 用法: + * this.$langConfig.getField(item, 'title') // 取标题 + * this.$langConfig.getField(item, 'text') // 取 tabBar 文案 + * this.$langConfig.getField(item, 'goods_name') // 取商品名 + * + * @param {Object} data 后端数据对象 + * @param {string} field 基础字段名 + * @returns {string} + */ + getField(data, field) { + return getI18nField(data, field); + }, + /** * 当前租户 id */ diff --git a/common/js/util.js b/common/js/util.js index 66d6462..6621f21 100644 --- a/common/js/util.js +++ b/common/js/util.js @@ -958,6 +958,7 @@ export default { // #ifdef MP this.redirectTo('/pages_tool/webview/webview', { + ...link, src: encodeURIComponent(url) }); // #endif @@ -1024,11 +1025,11 @@ export default { break; case 'niushop': // Niushop客服 - this.redirectTo('/pages_tool/chat/room'); + this.redirectTo('/pages_tool/chat/room', {...link}); break; case 'weapp': // 微信小程序,由于需要手动点击按钮触发,所以要跳转到中间页 - this.redirectTo(link.wap_url); + this.redirectTo(link.wap_url, {...link}); break; default: // 拨打客服电话 @@ -1045,9 +1046,7 @@ export default { } } else if (link.wap_url) { - this.redirectTo(link.wap_url, { - ...link - }); + this.redirectTo(link.wap_url, {...link}); } }, /** diff --git a/components-diy/diy-article.vue b/components-diy/diy-article.vue index 5f615b7..49b3dba 100644 --- a/components-diy/diy-article.vue +++ b/components-diy/diy-article.vue @@ -91,12 +91,12 @@ - {{ viewMore.text || '查看更多' }} + {{ viewMore.text || $lang('components-diy.diy-article.viewMore') }} - 暂无相关文章 + {{ $lang('components-diy.diy-article.noArticles') }} @@ -327,7 +327,7 @@ export default { }, viewMore() { // control 默认 true 与后端 design.js + diy_view.php 对齐(老数据没 viewMore 时也走显示) - return Object.assign({ support: true, control: true, text: '查看更多', color: '#999999', iconSize: 24 }, + return Object.assign({ support: true, control: true, text: '', color: '#999999', iconSize: 24 }, this.value.viewMore || {}); }, // 阅读区样式(文字色 + 图标大小 + 文字大小) diff --git a/components-diy/diy-bottom-nav.vue b/components-diy/diy-bottom-nav.vue index 9784a80..124dd9d 100644 --- a/components-diy/diy-bottom-nav.vue +++ b/components-diy/diy-bottom-nav.vue @@ -28,12 +28,12 @@ - {{ currentLang == 'en-us' ? item.en_text : item.text }} + {{ $langConfig.getField(item, 'text') }} - {{ currentLang == 'en-us' ? item.en_text : item.text }} + {{ $langConfig.getField(item, 'text') }} diff --git a/components-diy/diy-coupon.vue b/components-diy/diy-coupon.vue index 7859302..0457351 100644 --- a/components-diy/diy-coupon.vue +++ b/components-diy/diy-coupon.vue @@ -26,16 +26,16 @@ {{ item.discount | moneyConduct }} - 折 + {{ $lang('components-diy.diyCoupon.discount') }} - {{ item.at_least > 0 ? '满' + Number(item.at_least) + '元可用' : '无门槛优惠券' }} + {{ item.at_least > 0 ? $lang('components-diy.diyCoupon.minSpendAvailable', { amount: Number(item.at_least) }) : $lang('components-diy.diyCoupon.noThresholdCoupon') }} {{ value.btnStyle.text }} - 去使用 + {{ $lang('components-diy.diyCoupon.goUse') }} @@ -61,16 +61,16 @@ {{ item.discount | moneyConduct }} - 折 + {{ $lang('components-diy.diyCoupon.discount') }} - {{ item.at_least > 0 ? '满' + Number(item.at_least) + '元可用' : '无门槛优惠券' }} + {{ item.at_least > 0 ? $lang('components-diy.diyCoupon.minSpendAvailable', { amount: Number(item.at_least) }) : $lang('components-diy.diyCoupon.noThresholdCoupon') }} - {{ value.btnStyle.text || '领取' }} + {{ value.btnStyle.text || $lang('components-diy.diyCoupon.claim') }} - 去使用 + {{ $lang('components-diy.diyCoupon.goUse') }} @@ -95,20 +95,19 @@ {{ item.discount | moneyConduct }} - 折 + {{ $lang('components-diy.diyCoupon.discount') }} - {{ item.at_least > 0 ? '满' + - Number(item.at_least) + '元可用' : '无门槛优惠券' }} - 所有商品可用 - 指定商品可用 - 指定商品不可用 + {{ item.at_least > 0 ? $lang('components-diy.diyCoupon.minSpendAvailable', { amount: Number(item.at_least) }) : $lang('components-diy.diyCoupon.noThresholdCoupon') }} + {{ $lang('components-diy.diyCoupon.allProductsAvailable') }} + {{ $lang('components-diy.diyCoupon.specifiedProductsAvailable') }} + {{ $lang('components-diy.diyCoupon.specifiedProductsUnavailable') }} - {{ value.btnStyle.text || '领取' }} + {{ value.btnStyle.text || $lang('components-diy.diyCoupon.claim') }} - 去使用 + {{ $lang('components-diy.diyCoupon.goUse') }} @@ -133,16 +132,16 @@ {{ item.discount | moneyConduct }} - 折 + {{ $lang('components-diy.diyCoupon.discount') }} - {{ item.at_least > 0 ? '满' + Number(item.at_least) + '元可用' : '无门槛优惠券' }} + {{ item.at_least > 0 ? $lang('components-diy.diyCoupon.minSpendAvailable', { amount: Number(item.at_least) }) : $lang('components-diy.diyCoupon.noThresholdCoupon') }} - {{ value.btnStyle.text || '立即使用' }} + {{ value.btnStyle.text || $lang('components-diy.diyCoupon.useNow') }} - 去使用 + {{ $lang('components-diy.diyCoupon.goUse') }} @@ -160,11 +159,11 @@ {{ item.money | moneyConduct }} - 元 + {{ $lang('components-diy.diyCoupon.yuan') }} {{ item.discount | moneyConduct }} - 折 + {{ $lang('components-diy.diyCoupon.discount') }} @@ -173,14 +172,14 @@ {{ item.coupon_name }} 满{{ Number(item.at_least) }}元可用 + v-if="item.at_least > 0">{{ $lang('components-diy.diyCoupon.minSpendAvailable', { amount: Number(item.at_least) }) }} 无门槛优惠券 + v-else>{{ $lang('components-diy.diyCoupon.noThresholdCoupon') }} {{ - value.btnStyle.text || '立即领取' }} + value.btnStyle.text || $lang('components-diy.diyCoupon.claimNow') }} - 去使用 + {{ $lang('components-diy.diyCoupon.goUse') }} @@ -204,9 +203,9 @@ {{ (item.discount == '0.00' ? item.money : item.discount) | moneyConduct }} - {{ item.discount == '0.00' ? '元' : '折' }} + {{ item.discount == '0.00' ? $lang('components-diy.diyCoupon.yuan') : $lang('components-diy.diyCoupon.discount') }} - 优惠券 + {{ $lang('components-diy.diyCoupon.coupon') }} - 去使用 + {{ $lang('components-diy.diyCoupon.goUse') }} 满{{ item.at_least | moneyConduct }}元使用 - 无门槛使用 + v-if="parseFloat(item.at_least) > 0">{{ $lang('components-diy.diyCoupon.minSpendUse', { amount: item.at_least | moneyConduct }) }} + {{ $lang('components-diy.diyCoupon.noThresholdUse') }}
+ - 暂无优惠券 + {{ $lang('components-diy.diyCoupon.noCoupons') }}
- 去逛逛 + {{ $lang('components-diy.diyCoupon.goBrowse') }}
@@ -257,25 +256,24 @@ {{ item.money | moneyConduct }} - 元 + {{ $lang('components-diy.diyCoupon.yuan') }} {{ item.discount | moneyConduct }} - 折 + {{ $lang('components-diy.diyCoupon.discount') }} 满{{ Number(item.at_least) }}元可用 - 无门槛优惠券 - 有效期至{{ - $util.timeStampTurnTime(item.end_time, 'yearmonthday') }} + v-if="item.at_least > 0">{{ $lang('components-diy.diyCoupon.minSpendAvailable', { amount: Number(item.at_least) }) }} + {{ $lang('components-diy.diyCoupon.noThresholdCoupon') }} + {{ $lang('components-diy.diyCoupon.validUntil', { date: $util.timeStampTurnTime(item.end_time, 'yearmonthday') }) }} - {{ value.btnStyle.text || '立即领取' }} + {{ value.btnStyle.text || $lang('components-diy.diyCoupon.claimNow') }} - 去使用 + {{ $lang('components-diy.diyCoupon.goUse') }} @@ -404,7 +402,7 @@ export default { couponTap(item, index) { if (item.count == item.lead_count) { this.$util.showToast({ - title: '该优惠券已抢光' + title: this.$lang('components-diy.diyCoupon.couponSoldOut') }); return; } @@ -427,7 +425,7 @@ export default { var data = res.data; let msg = res.message; if (res.code == 0) { - msg = '领取成功'; + msg = this.$lang('components-diy.diyCoupon.claimSuccess'); if (res.data.is_exist == 1) { for (let i = 0; i < that.couponList.length; i++) { if (that.couponList[i].coupon_type_id == item.coupon_type_id) { diff --git a/components-diy/diy-member-info.vue b/components-diy/diy-member-info.vue index 36851ec..fc4348c 100644 --- a/components-diy/diy-member-info.vue +++ b/components-diy/diy-member-info.vue @@ -12,7 +12,7 @@ - 点击授权头像昵称 + {{ $lang('components-diy.diyMemberInfo.clickToAuthorizeAvatarNickname') }} {{ memberInfo.nickname }} @@ -36,7 +36,7 @@ - 点击获取微信头像 + {{ $lang('components-diy.diyMemberInfo.clickToGetWechatAvatar') }} {{ memberInfo.nickname @@ -194,13 +194,13 @@ - 获取您的昵称、头像 - 获取用户头像、昵称完善个人资料,主要用于向用户提供具有辨识度的用户中心界面 + {{ $lang('components-diy.diyMemberInfo.completeInfoTitle') }} + {{ $lang('components-diy.diyMemberInfo.completeInfoTip') }} - 头像 + {{ $lang('components-diy.diyMemberInfo.avatarLabel') }} - 昵称 - + {{ $lang('components-diy.diyMemberInfo.nicknameLabel') }} + - 头像 + {{ $lang('components-diy.diyMemberInfo.avatarLabel') }} + @@ -493,8 +493,8 @@ export default { showMemberQrcode() { if (!this.memberInfo.mobile && !this.memberInfo.member_code) { uni.showModal({ - title: '提示', - content: '使用会员码需先绑定手机号,是否绑定手机号?', + title: this.$lang('components-diy.diyMemberInfo.tip'), + content: this.$lang('components-diy.diyMemberInfo.bindMobileTip'), success: res => { if (res.confirm) { // #ifdef MP-WEIXIN @@ -643,7 +643,7 @@ export default { saveCompleteInfo() { if (this.nickName.length == 0) { this.$util.showToast({ - title: '请输入昵称' + title: this.$lang('components-diy.diyMemberInfo.pleaseEnterNickname') }); return; } @@ -682,7 +682,7 @@ export default { }, fail: () => { this.$util.showToast({ - title: '上传失败' + title: this.$lang('components-diy.diyMemberInfo.uploadFailed') }); } }) @@ -713,7 +713,7 @@ export default { }, fail: () => { this.$util.showToast({ - title: '头像拉取失败' + title: this.$lang('components-diy.diyMemberInfo.avatarPullFailed') }); } }) diff --git a/components-diy/diy-rubik-cube.vue b/components-diy/diy-rubik-cube.vue index 2f43ab5..22f0c2a 100644 --- a/components-diy/diy-rubik-cube.vue +++ b/components-diy/diy-rubik-cube.vue @@ -96,11 +96,47 @@ export default { }; }, created() { - if (this.value.mode == 'custom-rubik-cube') { - this.value.diyHtml = this.value.diyHtml.replace(/"/g, '"'); - this.customHtml = htmlParser(this.value.diyHtml); - } else { - this.initList(); + this.processValue(); + }, + watch: { + value: { + handler() { + this.processValue(); + }, + deep: true + } + }, + mixins: [DiyMinx], + computed: { + list() { + return this.processedList; + }, + rubikCubeWrapCss() { + var obj = ''; + obj += 'background-color:' + this.value.componentBgColor + ';'; + if (this.value.componentAngle == 'round') { + obj += 'border-top-left-radius:' + this.value.topAroundRadius * 2 + 'rpx;'; + obj += 'border-top-right-radius:' + this.value.topAroundRadius * 2 + 'rpx;'; + obj += 'border-bottom-left-radius:' + this.value.bottomAroundRadius * 2 + 'rpx;'; + obj += 'border-bottom-right-radius:' + this.value.bottomAroundRadius * 2 + 'rpx;'; + } + return obj; + } + }, + methods: { + // 统一处理 value prop:首次加载和 value 变化时都走这里 + processValue() { + if (!this.value || !this.value.mode) return; + if (this.value.mode == 'custom-rubik-cube') { + const diyHtml = (this.value.diyHtml || '').replace(/"/g, '"'); + this.customHtml = htmlParser(diyHtml); + } else { + this.initList(); + this.recalcLayout(); + } + }, + // 根据当前 mode 派发到对应的 calcXxx + recalcLayout() { var singleRow = { 'row1-of2': { ratio: 2, @@ -127,36 +163,7 @@ export default { } else if (this.value.mode == 'row1-lt-of1-tp-of2-bm') { this.calcRowOneLeftOfOneTopOfTwoBottom(); } - } - }, - watch: { - value: { - handler() { - if (this.value.mode != 'custom-rubik-cube') { - this.initList(); - } - }, - deep: true - } - }, - mixins: [DiyMinx], - computed: { - list() { - return this.processedList; }, - rubikCubeWrapCss() { - var obj = ''; - obj += 'background-color:' + this.value.componentBgColor + ';'; - if (this.value.componentAngle == 'round') { - obj += 'border-top-left-radius:' + this.value.topAroundRadius * 2 + 'rpx;'; - obj += 'border-top-right-radius:' + this.value.topAroundRadius * 2 + 'rpx;'; - obj += 'border-bottom-left-radius:' + this.value.bottomAroundRadius * 2 + 'rpx;'; - obj += 'border-bottom-right-radius:' + this.value.bottomAroundRadius * 2 + 'rpx;'; - } - return obj; - } - }, - methods: { initList() { if (!this.value.list || !Array.isArray(this.value.list)) { this.processedList = []; diff --git a/components/ns-empty/ns-empty.vue b/components/ns-empty/ns-empty.vue index 3249614..240b312 100644 --- a/components/ns-empty/ns-empty.vue +++ b/components/ns-empty/ns-empty.vue @@ -1,9 +1,9 @@ @@ -15,7 +15,7 @@ export default { props: { text: { type: String, - default: '暂无相关数据' + default: '' }, subText: { type: String, @@ -28,7 +28,7 @@ export default { emptyBtn: { type: Object, default: () => { - return { text: '去逛逛' }; + return { text: '' }; } }, fixed: { @@ -40,6 +40,22 @@ export default { default: '' } }, + computed: { + // 显示文案:优先用 prop 传入的,没有则用语言包默认值 + displayText() { + return this.text || this.$lang('common.mescrollEmpty') || '暂无相关数据'; + }, + displaySubText() { + return this.subText || ''; + }, + displayBtnText() { + return (this.emptyBtn && this.emptyBtn.text) || this.$lang('toGoodsCategoryPage') || '去逛逛'; + }, + // 建立 componentRefresh 依赖,切语言时自动更新 + _i18nRefresh() { + return this.componentRefresh; + } + }, methods: { goIndex() { if (this.emptyBtn.url) { diff --git a/components/ns-goods-sku/ns-goods-sku-category.vue b/components/ns-goods-sku/ns-goods-sku-category.vue index 16c4735..f9b5f07 100644 --- a/components/ns-goods-sku/ns-goods-sku-category.vue +++ b/components/ns-goods-sku/ns-goods-sku-category.vue @@ -13,10 +13,10 @@ goodsDetail.en_goods_name : goodsDetail.goods_name) }} - 库存{{ goodsDetail.stock }}{{ goodsDetail.unit }} - - 起售{{ goodsDetail.min_buy }}件 - + {{ $lang('goods.detail.stock') }}{{ goodsDetail.stock }}{{ goodsDetail.unit }} + + {{ $lang('goods.detail.startingNum', { num: goodsDetail.min_buy }) }} + @@ -43,7 +43,7 @@ @@ -72,8 +72,8 @@ - + @click="confirm($event)">{{ $lang('goods.detail.joinCart') }} + @@ -261,7 +261,7 @@ export default { } else { if (this.number >= this.goodsDetail.stock) { this.$util.showToast({ - title: '库存不足' + title: this.$lang('goods.detail.stockInsufficient') }); return; } @@ -269,14 +269,15 @@ export default { if (this.goodsDetail.is_limit == 1 && this.maxBuy > 0) { if (this.goodsDetail.limit_type == 1) { this.$util.showToast({ - title: '该商品每次最多购买' + this.maxBuy + this.goodsDetail.unit + title: this.$lang('goods.detail.maxPurchasePerTime', { count: this.maxBuy, unit: this.goodsDetail.unit }) }); return; } if (this.goodsDetail.limit_type == 2) { - let message = '该商品每人限购' + this.maxBuy + this.goodsDetail.unit; - message += this.goodsDetail.purchased_num > 0 ? ',您已购买了' + this.goodsDetail.purchased_num + this.goodsDetail.unit : ''; + let message = this.goodsDetail.purchased_num > 0 + ? this.$lang('goods.detail.purchaseLimitWithPurchased', { count: this.maxBuy, unit: this.goodsDetail.unit, purchased: this.goodsDetail.purchased_num }) + : this.$lang('goods.detail.purchaseLimit', { count: this.maxBuy, unit: this.goodsDetail.unit }); this.$util.showToast({ title: message }); @@ -375,7 +376,7 @@ export default { } if (this.goodsDetail.goods_state == 0) { this.$util.showToast({ - title: '商品已下架' + title: this.$lang('goods.detail.goodsOffShelves') }); return; } @@ -385,14 +386,14 @@ export default { this.keyInput(true, () => { if (this.goodsDetail.stock == 0) { this.$util.showToast({ - title: '商品已售罄' + title: this.$lang('goods.detail.soldOut') }); return; } if (this.number > this.goodsDetail.stock) { this.$util.showToast({ - title: '库存不足' + title: this.$lang('goods.detail.stockInsufficient') }); return; } @@ -400,15 +401,16 @@ export default { if (this.goodsDetail.is_limit == 1 && this.goodsDetail.limit_type == 1 && this.maxBuy > 0 && this.number > this.maxBuy) { this.$util.showToast({ - title: '该商品每次最多购买' + this.maxBuy + this.goodsDetail.unit + title: this.$lang('goods.detail.maxPurchasePerTime', { count: this.maxBuy, unit: this.goodsDetail.unit }) }); return; } if (this.goodsDetail.is_limit == 1 && this.goodsDetail.limit_type == 2 && this.maxBuy > 0 && this.number + this.goodsDetail.purchased_num > this.maxBuy) { - let message = '该商品每人限购' + this.maxBuy + this.goodsDetail.unit; - message += this.goodsDetail.purchased_num > 0 ? ',您已购买了' + this.goodsDetail.purchased_num + this.goodsDetail.unit : ''; + let message = this.goodsDetail.purchased_num > 0 + ? this.$lang('goods.detail.purchaseLimitWithPurchased', { count: this.maxBuy, unit: this.goodsDetail.unit, purchased: this.goodsDetail.purchased_num }) + : this.$lang('goods.detail.purchaseLimit', { count: this.maxBuy, unit: this.goodsDetail.unit }); this.$util.showToast({ title: message }); @@ -456,7 +458,7 @@ export default { this.$store.dispatch('cartCalculate'); this.$emit('refresh'); this.$util.showToast({ - title: '加入购物车成功' + title: this.$lang('goods.detail.addToCartSuccess') }); } this.btnSwitch = false; diff --git a/components/ns-goods-sku/ns-goods-sku-index.vue b/components/ns-goods-sku/ns-goods-sku-index.vue index f57f889..7804528 100644 --- a/components/ns-goods-sku/ns-goods-sku-index.vue +++ b/components/ns-goods-sku/ns-goods-sku-index.vue @@ -67,13 +67,13 @@ export default { let cart_id = cart ? cart.cart_id : 0; if (_num > parseInt(data.stock)) { this.$util.showToast({ - title: '商品库存不足' + title: this.$lang('goods.detail.goodsStockInsufficient') }); return; } if (data.is_limit && data.max_buy && _num > parseInt(data.max_buy)) { this.$util.showToast({ - title: `该商品每人限购${data.max_buy}${data.unit || '件'}` + title: this.$lang('goods.detail.purchaseLimit', { count: data.max_buy, unit: data.unit || '件' }) }); return; } @@ -121,7 +121,7 @@ export default { res.data; } this.$util.showToast({ - title: "商品添加购物车成功" + title: this.$lang('goods.detail.goodsAddCartSuccess') }); this.$store.commit('setCartChange'); this.$store.dispatch('cartCalculate'); diff --git a/components/ns-goods-sku/ns-goods-sku.vue b/components/ns-goods-sku/ns-goods-sku.vue index e4f5cb1..e2bf571 100644 --- a/components/ns-goods-sku/ns-goods-sku.vue +++ b/components/ns-goods-sku/ns-goods-sku.vue @@ -26,18 +26,18 @@ - 库存{{ goodsDetail.stock }}{{ goodsDetail.unit }} + {{ $lang('goods.detail.stock') }}{{ goodsDetail.stock }}{{ goodsDetail.unit }} {{ goodsDetail.name }} - 积分: + {{ $lang('goods.detail.pointLabel') }} {{ goodsDetail.point }} - 库存: + {{ $lang('goods.detail.stockLabel') }} {{ goodsDetail.stock }}{{ goodsDetail.unit }} @@ -48,13 +48,13 @@ {{ parseFloat(goodsDetail.presale_deposit).toFixed(2).split('.')[0] }} .{{ parseFloat(goodsDetail.presale_deposit).toFixed(2).split('.')[1] }} - 尾款 + {{ $lang('goods.detail.balanceLabel') }} ¥ {{ balance }} - 库存{{ goodsDetail.stock }}{{ goodsDetail.unit }} + {{ $lang('goods.detail.stock') }}{{ goodsDetail.stock }}{{ goodsDetail.unit }} @@ -117,11 +117,11 @@ .{{ parseFloat(goodsDetail.price).toFixed(2).split('.')[1] }} - 库存{{ goodsDetail.stock }}{{ goodsDetail.unit }} + {{ $lang('goods.detail.stock') }}{{ goodsDetail.stock }}{{ goodsDetail.unit }} - 已选规格: + {{ $lang('goods.detail.selectedSpec') }} {{ item.spec_value_name }} @@ -135,13 +135,13 @@   - {{ goodsDetail.pintuan_num }}人团 + {{ $lang('goods.detail.groupOfNum', { num: goodsDetail.pintuan_num }) }} - {{ goodsDetail.pintuan_num_2 }}人团 + {{ $lang('goods.detail.groupOfNum', { num: goodsDetail.pintuan_num_2 }) }} - {{ goodsDetail.pintuan_num_3 }}人团 + {{ $lang('goods.detail.groupOfNum', { num: goodsDetail.pintuan_num_3 }) }} @@ -158,14 +158,14 @@ - 兑换数量 - 购买数量 - (每人限购{{ limitNumber }}{{ goodsDetail.unit }}) + {{ $lang('goods.detail.exchangeCount') }} + {{ $lang('goods.detail.buyCount') }} + ({{ $lang('goods.detail.limitPerPerson', { count: limitNumber, unit: goodsDetail.unit }) }}) - ({{ minBuy }}{{ goodsDetail.unit }}起售,限购{{ maxBuy }}{{ goodsDetail.unit }}) + ({{ $lang('goods.detail.limitBuyRange', { minBuy: minBuy, maxBuy: maxBuy, unit: goodsDetail.unit }) }}) - (限购{{ maxBuy }}{{ goodsDetail.unit }}) - ({{ minBuy }}{{ goodsDetail.unit }}起售) + ({{ $lang('goods.detail.limitBuyMax', { maxBuy: maxBuy, unit: goodsDetail.unit }) }}) + ({{ $lang('goods.detail.minBuyStart', { minBuy: minBuy, unit: goodsDetail.unit }) }}) @@ -178,34 +178,34 @@ - + - - + + - + - - - + + + - + - + @@ -707,7 +707,7 @@ if (this.$util.inArray(this.skuId + '', this.goodsDetail.activity_sku_ids) == -1) { this.confirmDisabled = true; this.$util.showToast({ - title: '该规格未参与打包一口价活动' + title: this.$lang('goods.detail.specNotInBale') }); } else { this.confirmDisabled = false; @@ -771,7 +771,7 @@ if (this.$util.inArray(skuId + '', this.goodsDetail.activity_sku_ids) == -1) { this.confirmDisabled = true; this.$util.showToast({ - title: '该规格未参与打包一口价活动' + title: this.$lang('goods.detail.specNotInBale') }); } else { this.confirmDisabled = false; @@ -850,7 +850,7 @@ } else { if (this.number >= this.goodsDetail.stock) { this.$util.showToast({ - title: '库存不足' + title: this.$lang('goods.detail.stockInsufficient') }); return; } @@ -858,14 +858,15 @@ if (this.goodsDetail.is_limit == 1 && this.maxBuy > 0) { if (this.goodsDetail.limit_type == 1) { this.$util.showToast({ - title: '该商品每次最多购买' + this.maxBuy + this.goodsDetail.unit + title: this.$lang('goods.detail.maxPurchasePerTime', { count: this.maxBuy, unit: this.goodsDetail.unit }) }); return; } if (this.goodsDetail.limit_type == 2) { - let message = '该商品每人限购' + this.maxBuy + this.goodsDetail.unit; - message += this.goodsDetail.purchased_num > 0 ? ',您已购买了' + this.goodsDetail.purchased_num + this.goodsDetail.unit : ''; + let message = this.goodsDetail.purchased_num > 0 + ? this.$lang('goods.detail.purchaseLimitWithPurchased', { count: this.maxBuy, unit: this.goodsDetail.unit, purchased: this.goodsDetail.purchased_num }) + : this.$lang('goods.detail.purchaseLimit', { count: this.maxBuy, unit: this.goodsDetail.unit }); this.$util.showToast({ title: message }); @@ -875,14 +876,14 @@ if (this.type == 'seckill' && this.goodsDetail.seckill_id && this.goodsDetail.num > 0) { this.$util.showToast({ - title: '该商品每人限购' + this.goodsDetail.num + this.goodsDetail.unit + title: this.$lang('goods.detail.purchaseLimit', { count: this.goodsDetail.num, unit: this.goodsDetail.unit }) }); return; } if (this.type == 'presale' && this.goodsDetail.presale_id && this.goodsDetail.presale_num > 0) { this.$util.showToast({ - title: '该商品每人限购' + this.goodsDetail.presale_num + this.goodsDetail.unit + title: this.$lang('goods.detail.purchaseLimit', { count: this.goodsDetail.presale_num, unit: this.goodsDetail.unit }) }); return; } @@ -894,7 +895,7 @@ } else { if (this.minBuy > 1) { this.$util.showToast({ - title: '该商品' + this.minBuy + this.goodsDetail.unit + '起售' + title: this.$lang('goods.detail.minBuyStart', { minBuy: this.minBuy, unit: this.goodsDetail.unit }) }); } return; @@ -982,7 +983,7 @@ uni.removeStorageSync('delivery'); if (this.preview) { this.$util.showToast({ - title: '预览商品无法购买' + title: this.$lang('goods.detail.previewCannotBuy') }); return; } @@ -997,43 +998,44 @@ this.keyInput(true, () => { if (this.goodsDetail.stock == 0) { this.$util.showToast({ - title: '商品已售罄' + title: this.$lang('goods.detail.soldOut') }); return; } if (this.number.length == 0 || this.number <= 0) { this.$util.showToast({ - title: '购买数量不能小于等于0' + title: this.$lang('goods.detail.buyCountNotZero') }); return; } if (this.goodsDetail.buy_num > this.goodsDetail.stock) { this.$util.showToast({ - title: '库存小于最低购买数量' + title: this.$lang('goods.detail.stockLessThanMinBuy') }); return; } if (this.number > this.goodsDetail.stock) { this.$util.showToast({ - title: '库存不足' + title: this.$lang('goods.detail.stockInsufficient') }); return; } if (this.goodsDetail.is_limit == 1 && this.goodsDetail.limit_type == 1 && this.maxBuy > 0 && this.number > this.maxBuy) { this.$util.showToast({ - title: '该商品每次最多购买' + this.maxBuy + this.goodsDetail.unit + title: this.$lang('goods.detail.maxPurchasePerTime', { count: this.maxBuy, unit: this.goodsDetail.unit }) }); return; } if (this.goodsDetail.is_limit == 1 && this.goodsDetail.limit_type == 2 && this.maxBuy > 0 && this.number + this.goodsDetail.purchased_num > this.maxBuy) { - let message = '该商品每人限购' + this.maxBuy + this.goodsDetail.unit; - message += this.goodsDetail.purchased_num > 0 ? ',您已购买了' + this.goodsDetail.purchased_num + this.goodsDetail.unit : ''; + let message = this.goodsDetail.purchased_num > 0 + ? this.$lang('goods.detail.purchaseLimitWithPurchased', { count: this.maxBuy, unit: this.goodsDetail.unit, purchased: this.goodsDetail.purchased_num }) + : this.$lang('goods.detail.purchaseLimit', { count: this.maxBuy, unit: this.goodsDetail.unit }); this.$util.showToast({ title: message }); @@ -1042,7 +1044,7 @@ if ((this.type == 'join_cart' || isJoinCartBtn) && this.goodsDetail.is_limit == 1 && this.maxBuy > 0 && this.cartNum + this.number > this.maxBuy) { this.$util.showToast({ - title: '该商品每人限购' + this.maxBuy + this.goodsDetail.unit + title: this.$lang('goods.detail.purchaseLimit', { count: this.maxBuy, unit: this.goodsDetail.unit }) }); return; } @@ -1070,7 +1072,7 @@ var data = res.data; if (data > 0) { this.$util.showToast({ - title: '加入购物车成功' + title: this.$lang('goods.detail.addToCartSuccess') }); this.cartNum += this.number; diff --git a/components/ns-login/ns-login.vue b/components/ns-login/ns-login.vue index 0715071..e50a286 100644 --- a/components/ns-login/ns-login.vue +++ b/components/ns-login/ns-login.vue @@ -7,35 +7,35 @@ - + - 欢迎来到 {{ site_name }} + {{ $lang('components.ns-login.welcomeTitle', { siteName: site_name }) }} - - 获得订单、售后等服务。 + + {{ $lang('components.ns-login.getServicesTip') }} @@ -46,11 +46,11 @@ :class="isAgree ? 'icon-fuxuankuang1 color-base-text' : 'icon-fuxuankuang2'" @click="isAgree = !isAgree"> - 我同意 + {{ $lang('components.ns-login.agree') }} 《隐私条款》 + @click="tourl('/pages_tool/agreement/contenr?type=0')">{{ $lang('components.ns-login.privacyPolicy') }} 《用户服务协议》 + @click="tourl('/pages_tool/agreement/contenr?type=1')">{{ $lang('components.ns-login.userServiceAgreement') }} @@ -58,25 +58,25 @@ - 暂不登录 + {{ $lang('components.ns-login.notNow') }} @@ -166,7 +166,7 @@ export default { dynacodeData: { seconds: 120, timer: null, - codeText: '获取动态码', + codeText: '', isSend: false }, // 小程序获取手机号所需数据 @@ -223,12 +223,14 @@ export default { if (siteInfo) { this.site_name = siteInfo.site_name; } + // 初始化动态码按钮文字 + this.dynacodeData.codeText = this.$lang('components.ns-login.getDynacode'); }, methods: { // 同意协议 authno() { if (!this.isAgree) { - this.$util.showToast({ title: '请确认相关协议' }); + this.$util.showToast({ title: this.$lang('components.ns-login.pleaseConfirmAgreement') }); } }, @@ -324,7 +326,7 @@ export default { }, fail: () => { this.$util.showToast({ - title: '上传失败' + title: this.$lang('components.ns-login.uploadFailed') }); } }) @@ -386,17 +388,17 @@ export default { var rule = [{ name: 'mobile', checkType: 'required', - errorMsg: '请输入手机号' + errorMsg: this.$lang('components.ns-login.pleaseEnterMobile') }, { name: 'mobile', checkType: 'phoneno', - errorMsg: '请输入正确的手机号' + errorMsg: this.$lang('components.ns-login.pleaseEnterCorrectMobile') }]; if (this.isOpenCaptcha == 1) { rule.push({ name: 'captcha_code', checkType: 'required', - errorMsg: '请输入验证码' + errorMsg: this.$lang('components.ns-login.pleaseEnterCaptcha') }); } var checkRes = validate.check(data, rule); @@ -411,7 +413,7 @@ export default { if (this.dynacodeData.seconds == 120) { this.dynacodeData.timer = setInterval(() => { this.dynacodeData.seconds--; - this.dynacodeData.codeText = this.dynacodeData.seconds + 's后可重新获取'; + this.dynacodeData.codeText = this.$lang('components.ns-login.resendAfter', { seconds: this.dynacodeData.seconds }); }, 1000); } @@ -430,7 +432,7 @@ export default { }, fail: () => { this.$util.showToast({ - title: 'request:fail' + title: this.$lang('components.ns-login.requestFail') }); this.refreshDynacodeData(); } @@ -444,7 +446,7 @@ export default { this.dynacodeData = { seconds: 120, timer: null, - codeText: '获取动态码', + codeText: this.$lang('components.ns-login.getDynacode'), isSend: false }; }, @@ -455,23 +457,23 @@ export default { let rule = [{ name: 'mobile', checkType: 'required', - errorMsg: '请输入手机号' + errorMsg: this.$lang('components.ns-login.pleaseEnterMobile') }, { name: 'mobile', checkType: 'phoneno', - errorMsg: '请输入正确的手机号' + errorMsg: this.$lang('components.ns-login.pleaseEnterCorrectMobile') }]; if (this.isOpenCaptcha == 1) { if (this.captcha.id != '') rule.push({ name: 'captcha_code', checkType: 'required', - errorMsg: '请输入验证码' + errorMsg: this.$lang('components.ns-login.pleaseEnterCaptcha') }); } rule.push({ name: 'code', checkType: 'required', - errorMsg: '请输入动态码' + errorMsg: this.$lang('components.ns-login.pleaseEnterDynacode') }); var checkRes = validate.check(data, rule); @@ -594,7 +596,7 @@ export default { }, fail: res => { this.$util.showToast({ - title: 'request:fail' + title: this.$lang('components.ns-login.requestFail') }); } }); @@ -603,7 +605,7 @@ export default { // 授权登录 authLogin(data, type = 'authLogin') { uni.showLoading({ - title: '登录中' + title: this.$lang('components.ns-login.loggingIn') }); uni.setStorageSync('authInfo', data); if (uni.getStorageSync('source_member')) data.source_member = uni.getStorageSync('source_member'); @@ -643,7 +645,7 @@ export default { fail: () => { uni.hideLoading(); this.$util.showToast({ - title: '登录失败' + title: this.$lang('components.ns-login.loginFailed') }); } }); @@ -669,12 +671,12 @@ export default { // 微信小程序保存数据 saveMp() { if (this.formData.mobile === '') { - this.$util.showToast({ title: '请授权您的手机号码' }); + this.$util.showToast({ title: this.$lang('components.ns-login.pleaseAuthorizeMobile') }); return; } if (this.nickName.length == 0 && this.enableNickAndAvatar) { - this.$util.showToast({ title: '请输入昵称' }); + this.$util.showToast({ title: this.$lang('components.ns-login.pleaseEnterNickname') }); return; } @@ -715,7 +717,7 @@ export default { }, fail: () => { this.$util.showToast({ - title: '头像拉取失败' + title: this.$lang('components.ns-login.avatarPullFailed') }); } }) diff --git a/components/ns-newform/ns-newform.vue b/components/ns-newform/ns-newform.vue index 394f703..a01132f 100644 --- a/components/ns-newform/ns-newform.vue +++ b/components/ns-newform/ns-newform.vue @@ -11,7 +11,7 @@ @@ -28,7 +28,7 @@ @@ -50,7 +50,7 @@ {{ item.val }} - {{ item.value.placeholder || '请选择' }} + {{ item.value.placeholder || $lang('components.ns-newform.selectPlaceholder') }} @@ -146,7 +146,7 @@ @change="bindDateChange($event, index)" > - {{ item.val ? item.val : (item.value.placeholder || '请选择日期') }} + {{ item.val ? item.val : (item.value.placeholder || $lang('components.ns-newform.datePlaceholder')) }} @@ -170,7 +170,7 @@ > - {{ item.start_date ? item.start_date : (item.value.placeholder_start || '开始日期') }} + {{ item.start_date ? item.start_date : (item.value.placeholder_start || $lang('components.ns-newform.startDate')) }} @@ -184,7 +184,7 @@ > - {{ item.end_date ? item.end_date : (item.value.placeholder_end || '结束日期') }} + {{ item.end_date ? item.end_date : (item.value.placeholder_end || $lang('components.ns-newform.endDate')) }} @@ -207,7 +207,7 @@ @change="bindTimeChange($event, index)" > - {{ item.val ? item.val : (item.value.placeholder || '请选择时间') }} + {{ item.val ? item.val : (item.value.placeholder || $lang('components.ns-newform.timePlaceholder')) }} @@ -231,7 +231,7 @@ > - {{ item.start_time ? item.start_time : (item.value.placeholder_start || '开始时间') }} + {{ item.start_time ? item.start_time : (item.value.placeholder_start || $lang('components.ns-newform.startTime')) }} @@ -245,7 +245,7 @@ > - {{ item.end_time ? item.end_time : (item.value.placeholder_end || '结束时间') }} + {{ item.end_time ? item.end_time : (item.value.placeholder_end || $lang('components.ns-newform.endTime')) }} @@ -268,7 +268,7 @@ @getRegions="handleGetRegions($event, index)" > - {{ item.val ? item.val : (item.value.placeholder || (item.value.default_type == 1 ? '请选择省市' : '请选择省市区')) }} + {{ item.val ? item.val : (item.value.placeholder || (item.value.default_type == 1 ? $lang('components.ns-newform.selectProvinceCity') : $lang('components.ns-newform.selectProvinceCityDistrict'))) }} @@ -788,89 +788,89 @@ export default { if (item.controller == 'Text') { if (item.value.required && !item.val) { - this.$util.showToast({ title: '请输入' + item.value.title }); + this.$util.showToast({ title: this.$lang('components.ns-newform.pleaseInput', { title: item.value.title }) }); return false; } if (item.name == 'ID_CARD' && !/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(item.val)) { if (!item.value.required) { - this.$util.showToast({ title: '身份证输入不合法' }); + this.$util.showToast({ title: this.$lang('components.ns-newform.idCardInvalid') }); return false; } if (item.val != '') { - this.$util.showToast({ title: '身份证输入不合法' }); + this.$util.showToast({ title: this.$lang('components.ns-newform.idCardInvalid') }); return false; } } if (item.name == 'MOBILE' && !this.$util.verifyMobile(item.val)) { if (!item.value.required) { - this.$util.showToast({ title: '手机号输入不合法' }); + this.$util.showToast({ title: this.$lang('components.ns-newform.mobileInvalid') }); return false; } if (item.val != '') { - this.$util.showToast({ title: '手机号输入不合法' }); + this.$util.showToast({ title: this.$lang('components.ns-newform.mobileInvalid') }); return false; } } } if (item.controller == 'Textarea' && item.value.required && !item.val) { - this.$util.showToast({ title: '请输入' + item.value.title }); + this.$util.showToast({ title: this.$lang('components.ns-newform.pleaseInput', { title: item.value.title }) }); return false; } if (item.controller == 'Select' && item.value.required && !item.val) { - this.$util.showToast({ title: '请选择' + item.value.title }); + this.$util.showToast({ title: this.$lang('components.ns-newform.pleaseSelect', { title: item.value.title }) }); return false; } if (item.controller == 'Checkbox' && item.value.required && !item.val) { - this.$util.showToast({ title: '请至少选择一个' + item.value.title }); + this.$util.showToast({ title: this.$lang('components.ns-newform.pleaseSelectAtLeastOne', { title: item.value.title }) }); return false; } if (item.controller == 'Img' && item.value.required && !item.val) { - this.$util.showToast({ title: '请至少上传一张' + item.value.title }); + this.$util.showToast({ title: this.$lang('components.ns-newform.pleaseUploadAtLeastOne', { title: item.value.title }) }); return false; } if (item.controller == 'Date' && item.value.required && !item.val) { - this.$util.showToast({ title: '请选择' + item.value.title }); + this.$util.showToast({ title: this.$lang('components.ns-newform.pleaseSelect', { title: item.value.title }) }); return false; } if (item.controller == 'Datelimit') { if (item.value.required && !item.val) { - this.$util.showToast({ title: '请选择' + item.value.title }); + this.$util.showToast({ title: this.$lang('components.ns-newform.pleaseSelect', { title: item.value.title }) }); return false; } if (this.$util.timeTurnTimeStamp(item.start_date) > this.$util.timeTurnTimeStamp(item.end_date)) { - this.$util.showToast({ title: '结束日期不能小于开始日期' }); + this.$util.showToast({ title: this.$lang('components.ns-newform.endDateBeforeStartDate') }); return false; } } if (item.controller == 'Time' && item.value.required && !item.val) { - this.$util.showToast({ title: '请选择' + item.value.title }); + this.$util.showToast({ title: this.$lang('components.ns-newform.pleaseSelect', { title: item.value.title }) }); return false; } if (item.controller == 'Timelimit') { if (item.value.required && !item.val) { - this.$util.showToast({ title: '请选择' + item.value.title }); + this.$util.showToast({ title: this.$lang('components.ns-newform.pleaseSelect', { title: item.value.title }) }); return false; } if (item.start_time >= item.end_time) { - this.$util.showToast({ title: '结束时间必须大于开始时间' }); + this.$util.showToast({ title: this.$lang('components.ns-newform.endTimeBeforeStartTime') }); return false; } } if (item.controller == 'City' && item.value.required && !item.val) { - this.$util.showToast({ title: '请选择' + item.value.title }); + this.$util.showToast({ title: this.$lang('components.ns-newform.pleaseSelect', { title: item.value.title }) }); return false; } } @@ -902,7 +902,7 @@ export default { if (res.length > 0) { res.forEach(function(img) { if (self.formData[index].img_lists.length >= Number(self.formData[index].value.max_count)) { - self.$util.showToast({ title: '最多上传' + self.formData[index].value.max_count + '张图片' }); + self.$util.showToast({ title: self.$lang('components.ns-newform.maxUploadImages', { max: self.formData[index].value.max_count }) }); return false; } self.formData[index].img_lists.push(img); @@ -916,7 +916,7 @@ export default { addImg(index) { let self = this; if (this.formData[index].img_lists.length >= Number(this.formData[index].value.max_count)) { - this.$util.showToast({ title: '最多上传' + this.formData[index].value.max_count + '张图片' }); + this.$util.showToast({ title: this.$lang('components.ns-newform.maxUploadImages', { max: this.formData[index].value.max_count }) }); return false; } diff --git a/components/yuyue-date/yuyue-date.vue b/components/yuyue-date/yuyue-date.vue index a43125e..b2a8c82 100644 --- a/components/yuyue-date/yuyue-date.vue +++ b/components/yuyue-date/yuyue-date.vue @@ -20,7 +20,7 @@
- 指定日期 + {{ $lang('components.yuyueDate.appointedDate') }}
@@ -46,7 +46,7 @@ {{ item.time }} - {{ item.disable ? disableText : undisableText }} + {{ item.disable ? disableTextI18n : undisableTextI18n }} @@ -173,7 +173,7 @@ return { pickerStartDay: '', // 指定开始日期 pickerEndDay: '', // 指定结束日期 - orderDateTime: '暂无选择', // 选中时间 + orderDateTime: '', // 选中时间 orderTimeArr: {}, //多选的时间 dateArr: [], //日期数据 timeArr: [], //时间数据 @@ -187,6 +187,18 @@ timeQuanEnd: '' //时间段结束时间 }; }, + computed: { + disableTextI18n() { + return this.disableText && this.disableText !== '已约满' + ? this.disableText + : this.$lang('components.yuyueDate.fullyBooked'); + }, + undisableTextI18n() { + return this.undisableText && this.undisableText !== '可预约' + ? this.undisableText + : this.$lang('components.yuyueDate.available'); + }, + }, created(props) { this.selectDate = this.nowDate = currentTime().date; this.pickerStartDay = currentTime().year + '-' + currentTime().date; @@ -213,7 +225,7 @@ let index = new Date(e).getDay(); if (this.disableWeek.indexOf(weekBox[index]) != -1) { uni.showToast({ - title: weekBox[index] + '不可以预约', + title: this.$lang('components.yuyueDate.weekdayCannotBook', { weekday: weekBox[index] }), icon: 'none' }) return false; @@ -280,7 +292,7 @@ this.isSection && (item.isInclude = false); }); - this.orderDateTime = isFullTime ? '暂无选择' : this.selectDate; + this.orderDateTime = isFullTime ? this.$lang('components.yuyueDate.noSelection') : this.selectDate; this.timeActive = -1; for (let i = 0, len = this.timeArr.length; i < len; i++) { if (!this.timeArr[i].disable) { @@ -301,7 +313,7 @@ let index = new Date(item.timeStamp).getDay(); if (this.disableWeek.indexOf(weekBox[index]) != -1) { uni.showToast({ - title: weekBox[index] + '不可以预约', + title: this.$lang('components.yuyueDate.weekdayCannotBook', { weekday: weekBox[index] }), icon: 'none' }) return false; diff --git a/lang/en-us/ai-chat/index.js b/lang/en-us/ai-chat/index.js index 12467ee..bcc767b 100644 --- a/lang/en-us/ai-chat/index.js +++ b/lang/en-us/ai-chat/index.js @@ -72,6 +72,20 @@ export const lang = { prompt: 'Prompt', serviceTypeNotSupported: 'Current service type does not support this page', + // ====== index.vue - Help Content ====== + helpContent: '# Help Guide\n\n## Basic Features\n- **Send Message**: Type in the input box and send\n- **Voice Input**: Tap the microphone icon for voice input\n- **Attachments**: Tap + to send images, files, locations\n\n## Message Types\n- **Text Message**: Regular text conversation\n- **Markdown**: Supports formatted document content\n- **File**: Supports various file format previews\n- **Audio**: Supports voice message playback\n- **Video**: Supports video playback\n- **Link**: Supports web link navigation\n- **Product**: Supports product card display\n\n## Actions\n- **Like/Dislike**: Rate AI responses\n- **Copy**: Long press a message to copy content\n- **Forward**: Supports message forwarding', + + // ====== index.vue - AI Response Templates ====== + aiResponseTemplate1: 'I understand your needs, let me provide you with a detailed answer.', + aiResponseTemplate2: 'Thank you for your question, that is a great question.', + aiResponseTemplate3: 'Based on your question, I suggest you consider the following aspects:', + aiResponseTemplate4: 'This is a common question, let me provide you with some solutions.', + aiResponseTemplate5: 'I understand your confusion, let me help you analyze it.', + aiProcessingMessage: 'I have received your question "{question}" and am working on it...', + + // ====== index.vue - Product Inquiry ====== + productInquiryTemplate: 'I would like to learn more about the following product:\nProduct Name: {name}\nPrice: ¥{price}\nProduct ID: {id}', + // ====== ai-chat-avatar-selector ====== avatarSelectorTitle: 'Change Avatar', chooseFromAlbum: 'Choose from Album', diff --git a/lang/en-us/common.js b/lang/en-us/common.js index a5cf7dd..fcff4c8 100644 --- a/lang/en-us/common.js +++ b/lang/en-us/common.js @@ -28,6 +28,31 @@ export const lang = { weChatWorkKefu: 'WeChat Work Customer Service', }, + // customer service module + customerService: { + openFailed: 'Failed to open customer service', + wxworkConfigIncomplete: 'WeChat Work configuration incomplete', + jumpFailed: 'Jump failed, please try again later', + miniProgramOnly: 'Third-party mini program customer service is only available in WeChat Mini Program', + linkCopied: 'Link copied, please open in browser', + customerLinkCopied: 'Customer service link copied', + noServicePhone: 'No customer service phone number', + getPhoneFailed: 'Failed to get customer service phone', + contactCustomerService: 'Contact Customer Service', + callServiceTip: 'Please contact customer service at {phone}', + noServiceOffline: 'Sorry, no customer service available, please contact offline', + configError: 'Customer Service Configuration Error', + configErrorDetail: 'Configuration errors:\n{errors}', + tip: 'Tip', + cannotAddWxwork: 'Cannot add WeChat Work directly, use other methods to contact customer service?', + onlineUnavailable: 'Online customer service unavailable, call customer service?', + developing: 'Customer service selection feature under development', + wxworkNotConfigured: 'WeChat Work customer service not configured', + serviceUnavailable: 'Customer service temporarily unavailable', + wxworkLinkNotConfigured: 'WeChat Work link not configured', + fromFloatButton: 'Inquiry from floating button', + }, + getDynacode: 'Get Code', login: 'Login/Register', diff --git a/lang/en-us/components-diy/diy-article.js b/lang/en-us/components-diy/diy-article.js new file mode 100644 index 0000000..47f67f5 --- /dev/null +++ b/lang/en-us/components-diy/diy-article.js @@ -0,0 +1,4 @@ +export const lang = { + viewMore: 'View More', + noArticles: 'No articles found', +} diff --git a/lang/en-us/components-diy/diy-coupon.js b/lang/en-us/components-diy/diy-coupon.js new file mode 100644 index 0000000..2e3f38b --- /dev/null +++ b/lang/en-us/components-diy/diy-coupon.js @@ -0,0 +1,30 @@ +export const lang = { + // Button text + claim: 'Claim', + claimNow: 'Claim Now', + goUse: 'Use Now', + useNow: 'Use Now', + goBrowse: 'Go Browse', + + // Currency / discount units + yuan: 'yuan', + discount: '% off', + + // Coupon usage conditions + minSpendAvailable: 'Available on orders over {amount}', + noThresholdCoupon: 'No threshold coupon', + minSpendUse: 'Use on orders over {amount}', + noThresholdUse: 'No threshold', + allProductsAvailable: 'All products available', + specifiedProductsAvailable: 'Specified products available', + specifiedProductsUnavailable: 'Specified products unavailable', + + // Other text + coupon: 'Coupon', + noCoupons: 'No coupons available', + validUntil: 'Valid until {date}', + + // Toast messages + couponSoldOut: 'This coupon is sold out', + claimSuccess: 'Claimed successfully', +} diff --git a/lang/en-us/components-diy/diy-member-info.js b/lang/en-us/components-diy/diy-member-info.js new file mode 100644 index 0000000..fa1cfde --- /dev/null +++ b/lang/en-us/components-diy/diy-member-info.js @@ -0,0 +1,22 @@ +export const lang = { + // Authorization prompt text + clickToAuthorizeAvatarNickname: 'Tap to authorize avatar & nickname', + clickToGetWechatAvatar: 'Tap to get WeChat avatar', + + // Complete info popup + completeInfoTitle: 'Get your nickname and avatar', + completeInfoTip: 'Get user avatar and nickname to complete personal profile, mainly to provide a recognizable user center interface', + avatarLabel: 'Avatar', + nicknameLabel: 'Nickname', + nicknamePlaceholder: 'Enter nickname', + save: 'Save', + + // Modal prompts + tip: 'Tip', + bindMobileTip: 'You need to bind a mobile number to use the member code. Bind now?', + + // Toast messages + pleaseEnterNickname: 'Please enter nickname', + uploadFailed: 'Upload failed', + avatarPullFailed: 'Failed to pull avatar', +} diff --git a/lang/en-us/components/ns-login.js b/lang/en-us/components/ns-login.js new file mode 100644 index 0000000..be6eaef --- /dev/null +++ b/lang/en-us/components/ns-login.js @@ -0,0 +1,51 @@ +export const lang = { + // ===== ns-login component ===== + 'ns-login': { + // H5 bind mobile popup + bindMobileTitle: 'Mobile number not bound yet', + bindMobileTip: 'Please bind your mobile number to receive order updates', + mobileLabel: 'Mobile', + mobilePlaceholder: 'Enter mobile number', + captchaLabel: 'Captcha', + captchaPlaceholder: 'Enter captcha', + dynacodeLabel: 'Code', + dynacodePlaceholder: 'Enter code', + save: 'Save', + + // Mini Program login popup + welcomeTitle: 'Welcome to {siteName}', + loginWithMobile: 'Login with mobile, ', + registerLogin: 'Register & login, ', + getServicesTip: 'to access orders, after-sales and more.', + agree: 'I agree', + privacyPolicy: '《Privacy Policy》', + userServiceAgreement: '《User Service Agreement》', + agreeAndAuthorizeMobile: 'Agree & Authorize Mobile', + authorizeMobile: 'Authorize Mobile', + notNow: 'Not Now', + + // Nickname & Avatar + avatarLabel: 'Avatar', + nicknameLabel: 'Nickname', + nicknamePlaceholder: 'Enter nickname', + getMobile: 'Get Mobile Number', + + // Dynacode + getDynacode: 'Get Code', + resendAfter: 'Resend in {seconds}s', + + // Toast messages + pleaseConfirmAgreement: 'Please confirm the agreement', + uploadFailed: 'Upload failed', + pleaseEnterMobile: 'Please enter mobile number', + pleaseEnterCorrectMobile: 'Please enter correct mobile number', + pleaseEnterCaptcha: 'Please enter captcha', + pleaseEnterDynacode: 'Please enter dynamic code', + requestFail: 'request:fail', + loggingIn: 'Logging in', + loginFailed: 'Login failed', + pleaseAuthorizeMobile: 'Please authorize your mobile number', + pleaseEnterNickname: 'Please enter nickname', + avatarPullFailed: 'Avatar pull failed', + } +} diff --git a/lang/en-us/components/ns-newform.js b/lang/en-us/components/ns-newform.js new file mode 100644 index 0000000..f6cce4b --- /dev/null +++ b/lang/en-us/components/ns-newform.js @@ -0,0 +1,33 @@ +export const lang = { + // ===== ns-newform component ===== + 'ns-newform': { + // Input placeholder defaults + inputPlaceholder: 'Please enter', + selectPlaceholder: 'Please select', + datePlaceholder: 'Please select date', + timePlaceholder: 'Please select time', + startDate: 'Start date', + endDate: 'End date', + startTime: 'Start time', + endTime: 'End time', + selectProvinceCity: 'Please select province and city', + selectProvinceCityDistrict: 'Please select province, city and district', + + // Validation - required + pleaseInput: 'Please enter {title}', + pleaseSelect: 'Please select {title}', + pleaseSelectAtLeastOne: 'Please select at least one {title}', + pleaseUploadAtLeastOne: 'Please upload at least one {title}', + + // Validation - format + idCardInvalid: 'Invalid ID card number', + mobileInvalid: 'Invalid mobile number', + + // Validation - range + endDateBeforeStartDate: 'End date cannot be earlier than start date', + endTimeBeforeStartTime: 'End time must be later than start time', + + // Image upload + maxUploadImages: 'Upload up to {max} images', + } +} diff --git a/lang/en-us/components/yuyue-date.js b/lang/en-us/components/yuyue-date.js new file mode 100644 index 0000000..95059a0 --- /dev/null +++ b/lang/en-us/components/yuyue-date.js @@ -0,0 +1,17 @@ +export const lang = { + // ===== yuyue-date component ===== + 'yuyueDate': { + // Appointed date button + appointedDate: 'Appointed Date', + + // Time status text + fullyBooked: 'Fully Booked', + available: 'Available', + + // Selection status + noSelection: 'No Selection', + + // Toast message + weekdayCannotBook: '{weekday} cannot be booked', + } +} diff --git a/lang/en-us/fenxiao/apply.js b/lang/en-us/fenxiao/apply.js index 1306afc..5fc5df7 100644 --- a/lang/en-us/fenxiao/apply.js +++ b/lang/en-us/fenxiao/apply.js @@ -1,5 +1,55 @@ export const lang = { //title为每个页面的标题 // title: 'Distributor Application' - title: '' -} \ No newline at end of file + title: '', + + // Page header + pleaseFillApplyInfo: 'Please fill in application information', + + // Form fields + inviter: 'Inviter', + nameLabel: 'Name', + namePlaceholder: 'Please enter {name} name', + mobile: 'Mobile', + mobilePlaceholder: 'Please enter mobile number', + + // Agreement + haveReadAndUnderstand: 'I have read and understand', + applyAgreement: '【{name} Application Agreement】', + + // Buttons + applyBecome: 'Apply to become {name}', + reapply: 'Reapply', + + // Application conditions + applyConditionTitle: 'Distributor Application Conditions', + becomeConditionTitle: 'Conditions to Become a Distributor', + conditionConsumeCount: 'To apply to become {name}, your purchase count must reach {count} times', + conditionConsumeMoney: 'To apply to become {name}, your purchase amount must reach {money} yuan', + conditionBuyGoods: 'To apply to become {name}, you need to purchase one of the following specified products', + becomeConditionBuyGoods: 'To become {name}, you need to purchase one of the following specified products', + + // Expand/collapse + expandMore: 'Expand more', + collapse: 'Collapse', + + // Status messages + notFenxiao: 'You are not a distributor yet', + applyPending: 'You have submitted the {name} application, waiting for review', + applyRejected: 'Your {name} application has been rejected, please try again', + + // Default values + none: 'None', + + // Toast messages + merchantNotOpenFenxiao: 'Merchant has not enabled distribution', + pleaseReadAndCheckAgreement: 'Please read the agreement carefully and check it', + + // Page title suffix + applySuffix: 'Application', + + // Form validation + pleaseEnterName: 'Please enter {name} name', + pleaseEnterMobile: 'Please enter mobile number', + pleaseEnterValidMobile: 'Please enter a valid mobile number', +} diff --git a/lang/en-us/fenxiao/index.js b/lang/en-us/fenxiao/index.js index e8aab4e..4b3e5d7 100644 --- a/lang/en-us/fenxiao/index.js +++ b/lang/en-us/fenxiao/index.js @@ -1,5 +1,70 @@ export const lang = { //title为每个页面的标题 // title: 'Distribution Center', - title: '' -} \ No newline at end of file + title: '', + + // Header member info + superiorAgent: 'Superior Agent', + headquarters: 'Headquarters', + invitedSuccess: 'Invited successfully: {count} people', + + // Commission / Balance + withdrawable: 'Available {withdraw} (Yuan)', + withdrawDetail: 'Withdrawal Details', + withdrawing: 'Withdrawing (Yuan)', + pendingDeposit: 'Pending (Yuan)', + withdraw: 'Withdraw', + + // Menu items + myFans: 'My Fans', + invitedUsers: 'Invited Users', + detail: 'Details', + totalAccumulated: 'Total {account} {symbol}{amount}', + order: 'Orders', + orderDetail: 'Order Details', + myInviteCode: 'My Invite Code', + inviteFriendsEarnRewards: 'Invite friends, earn rewards', + + // Empty / Not applied state + notFenxiaoYet: 'You are not a {name} yet, please submit an application', + joinNow: 'Join Now', + + // Task popup + quickUpgradeTips: 'Quick Upgrade Tips', + completed: 'Completed', + incomplete: 'Incomplete', + goComplete: 'Go Complete', + tip: 'Tip', + anyConditionUpgrade: 'Meet any one condition to upgrade', + allConditionsUpgrade: 'All conditions must be met to upgrade', + + // Page title suffix + center: 'Center', + + // Toast messages + merchantNotOpenFenxiao: 'Merchant has not enabled distribution', + fenxiaoFrozen: 'Distributor account has been frozen', + + // Upgrade tasks - Subordinate consumption + subordinateConsumption: 'Subordinate Consumption', + subordinateOrderCount: '{count} subordinate orders completed', + subordinateOrderCountTip: 'Number of orders placed by the distributor and their direct referred members', + subordinateOrderAmount: 'Subordinate order amount reaches {amount} Yuan', + subordinateOrderAmountTip: 'Total order amount of the distributor and their direct referred members', + subordinateCommissionAmount: 'Total {account} from subordinate consumption reaches {amount} Yuan', + subordinateCommissionAmountTip: 'Total {account} from orders of the distributor and their direct referred members', + + // Upgrade tasks - Self consumption + selfConsumption: 'Self Consumption', + selfOrderCount: '{count} self orders completed', + selfOrderCountTip: 'Number of orders placed by the distributor themselves', + selfOrderAmount: 'Self order amount reaches {amount} Yuan', + selfOrderAmountTip: 'Total order amount of the distributor\'s own purchases', + + // Upgrade tasks - Invite friends + inviteFriends: 'Invite Friends', + inviteFriendCount: 'Invite {count} friends', + inviteFriendCountTip: 'Number of direct subordinate members (including those who have applied to become distributors)', + inviteFenxiaoCount: 'Invite {count} friends to become distributors', + inviteFenxiaoCountTip: 'Number of direct subordinate distributors', +} diff --git a/lang/en-us/fenxiao/level.js b/lang/en-us/fenxiao/level.js index 8d9fb0a..cf3d22e 100644 --- a/lang/en-us/fenxiao/level.js +++ b/lang/en-us/fenxiao/level.js @@ -1,5 +1,49 @@ export const lang = { //title为每个页面的标题 // title: 'Distributor Level', - title: '' -} \ No newline at end of file + title: '', + + // 页面标题后缀 + levelSuffix: 'Level', + + // 分佣比率 + firstLevelCommissionRate: 'First Level Commission Rate', + secondLevelCommissionRate: 'Second Level Commission Rate', + thirdLevelCommissionRate: 'Third Level Commission Rate', + + // 升级任务 + quickUpgradeTips: 'Quick Upgrade Tips', + completed: 'Completed', + incomplete: 'Incomplete', + + // 提示弹窗 + tip: 'Tip', + anyConditionUpgrade: 'Upgrade when any condition is met', + allConditionsUpgrade: 'All conditions must be met to upgrade', + + // Toast 提示 + merchantNotOpenFenxiao: 'Merchant has not enabled distribution', + + // 升级任务 - 下级消费 + subordinateConsumption: 'Subordinate Consumption', + subordinateOrderCount: '{count} subordinate orders required', + subordinateOrderCountTip: 'The number of orders placed by the distributor and their direct referrals reaches {count}', + subordinateOrderAmount: 'Subordinate order amount reaches {amount} yuan', + subordinateOrderAmountTip: 'The total order amount from the distributor and their direct referrals reaches {amount} yuan', + subordinateCommissionAmount: 'Commission from subordinate consumption reaches {amount} yuan', + subordinateCommissionAmountTip: 'The total commission from orders of the distributor and their direct referrals reaches {amount} yuan', + + // 升级任务 - 自身消费 + selfConsumption: 'Self Consumption', + selfOrderCount: '{count} self orders required', + selfOrderCountTip: 'The number of orders placed by the distributor reaches {count}', + selfOrderAmount: 'Self order amount reaches {amount} yuan', + selfOrderAmountTip: 'The total order amount from the distributor reaches {amount} yuan', + + // 升级任务 - 邀请好友 + inviteFriends: 'Invite Friends', + inviteFriendCount: 'Invite {count} friends', + inviteFriendCountTip: 'The number of direct subordinate members reaches {count} (including those who have applied to become distributors)', + inviteFenxiaoCount: 'Invite {count} friends to become distributors', + inviteFenxiaoCountTip: 'The number of direct subordinate distributors reaches {count}', +} diff --git a/lang/en-us/goods/cart.js b/lang/en-us/goods/cart.js index 273691d..7b86b01 100644 --- a/lang/en-us/goods/cart.js +++ b/lang/en-us/goods/cart.js @@ -1,5 +1,5 @@ export const lang = { - //title为每个页面的标题 + //title is the title of each page title: 'Shopping Cart', complete: 'Complete', edit: 'Manage', @@ -9,5 +9,39 @@ export const lang = { emptyTips: 'No products yet', goForStroll: 'Go shopping', del: 'Delete', - login: 'Go to login' -} \ No newline at end of file + login: 'Go to login', + // cart header + totalKinds: '{count} item(s)', + // coupon tips + coupon: 'Coupon', + couponMaxDiscount: 'Save up to {money} with coupons', + receive: 'Receive', + view: 'View', + clickToReceive: 'Click to receive', + clickToView: 'Click to view', + // full reduction + fullReduction: 'Full Reduction', + fullReductionItem: 'Spend {limit}, get {discount} off', + // invalid goods + invalidGoods: '{count} invalid item(s)', + clear: 'Clear', + invalid: 'Invalid', + // empty cart + cartEmpty: 'Shopping cart is empty', + cartEmptySubText: 'Go browse and find your favorite products', + // discount detail popup + discountDetail: 'Discount Details', + goodsTotal: 'Subtotal', + // coupon popup + discountLabel: 'off', + minSpend: 'Min. spend {amount}', + noThreshold: 'No threshold', + maxDiscount: 'Max discount {symbol}{limit}', + validityPeriod: 'Valid: ', + validFromReceive: 'Valid for {days} days from receipt', + longTermValid: 'Long-term valid', + received: 'Received', + // settlement button + receiveCouponSettle: 'Receive & Checkout ({count})', + settleImmediately: 'Checkout ({count})' +} diff --git a/lang/en-us/goods/detail.js b/lang/en-us/goods/detail.js index f680782..e3e2a96 100644 --- a/lang/en-us/goods/detail.js +++ b/lang/en-us/goods/detail.js @@ -34,6 +34,83 @@ export const lang = { kefu:'Contact', follow:'Follow', - - spec:'Spec' -} + + spec:'Spec', + + // SKU related + stockInsufficient: 'Insufficient stock', + offShelves: 'This product has been removed', + soldOut: 'Sold out', + buyCountNotZero: 'Purchase quantity cannot be less than or equal to 0', + stockLessThanMinBuy: 'Stock is less than minimum purchase quantity', + purchaseLimit: 'Limit {count} {unit} per person', + purchaseLimitWithPurchased: 'Limit {count} {unit} per person, you have purchased {purchased} {unit}', + maxPurchasePerTime: 'Maximum purchase of {count} {unit} per time', + selectedSpec: 'Selected: ', + buyCount: 'Purchase Quantity', + exchangeCount: 'Exchange Quantity', + joinCart: 'Add to Cart', + confirmBtn: 'Confirm', + rushBuy: 'Buy Now', + exchangeBtn: 'Exchange', + addToCartSuccess: 'Added to cart successfully', + minBuyStart: 'Minimum order: {minBuy} {unit}', + balanceLabel: 'Balance', + pointLabel: 'Points: ', + stockLabel: 'Stock: ', + groupOfNum: '{num}-person group', + limitPerPerson: 'Limit: {count} {unit}/person', + limitBuyRange: 'From {minBuy} {unit}, limit {maxBuy} {unit}', + limitBuyMax: 'Limit: {maxBuy} {unit}', + previewCannotBuy: 'Preview products cannot be purchased', + specNotInBale: 'This spec is not in the bale activity', + goodsStockInsufficient: 'Insufficient product stock', + goodsAddCartSuccess: 'Product added to cart successfully', + selected: 'Selected: ', + startingNum: 'Min. order: {num} pcs', + goodsOffShelves: 'Product has been removed', + + // Price & Promotion + limitedTimeDiscount: 'Limited Time Discount', + sold: 'Sold', + countdownEndsIn: 'Ends In', + originalPrice: 'Original Price', + + // Combo Package + comboPackage: 'Combo Package', + comboPrice: 'Combo Price', + + // Coupons + coupons: 'Coupons', + discountOff: '% off', + minSpendAvailable: 'Min. spend {amount}', + noThreshold: 'No threshold', + maxDiscount: 'Max discount: {symbol}{amount}', + validUntilDate: 'Valid until: {date}', + validForDays: 'Valid for {days} days after claiming', + validPermanent: 'Valid: Permanent', + couponSoldOut: 'Sold out', + couponClaimed: 'Claimed', + couponReceive: 'Claim', + + // Promotions + promotion: 'Promotion', + fullReduction: 'Full Reduction', + fullGift: 'Full Gift', + freeShipping: 'Free Shipping', + + // Product Message + productMessage: 'Product Message', + + // AI Customer Service + aiCustomerService: 'AI Assistant', + + // Contact Popup + dialOnMobile: 'Dial {phone} on mobile', + cancel: 'Cancel', + copyToClipboard: 'Copy to Clipboard', + copySuccess: 'Copied successfully', + + // Common Button + confirm: 'Confirm', +} diff --git a/lang/en-us/member/card_buy.js b/lang/en-us/member/card_buy.js index 3234b08..f795221 100644 --- a/lang/en-us/member/card_buy.js +++ b/lang/en-us/member/card_buy.js @@ -1,4 +1,57 @@ export const lang = { - //title为每个页面的标题 - title: 'Membership Card' -} \ No newline at end of file + //title is the page title + title: 'Membership Card', + + // Member info + validUntil: 'Valid until: ', + + // Membership card description + enjoyDiscountAnd: 'can enjoy consumption discounts and', + memberGiftBenefits: 'member gift package benefits', + + // Card type selection + cardTypeSelection: 'Card Type', + weekCardName: 'Weekly Card', + weekCardUnit: 'week', + monthCardName: 'Monthly Card', + monthCardUnit: 'month', + quarterCardName: 'Quarterly Card', + quarterCardUnit: 'quarter', + yearCardName: 'Annual Card', + yearCardUnit: 'year', + + // Member benefits + memberBenefits: 'Member Benefits', + freeShipping: 'Free Shipping', + enjoyFreeShipping: 'Enjoy free shipping on all products', + consumptionDiscount: 'Consumption Discount', + enjoyDiscountOnSomeProducts: 'Enjoy {discount}% off on some products', + pointsReward: 'Points Reward', + earnPointsMultiplier: 'Earn {multiplier}x points on orders', + + // Welcome gift + welcomeGift: 'Welcome Gift', + pointsGift: 'Points Gift', + giftPoints: '{points} points as gift', + redPacketGift: 'Red Packet Gift', + giftRedPacket: '{amount} yuan red packet as gift', + couponGift: 'Coupon Gift', + giftCoupons: '{count} coupons as gift', + + // Action buttons + renewNow: 'Renew Now', + rechargeToActivate: 'Recharge to Activate', + activateNow: 'Activate Now', + + // Agreement + purchaseAgreement: 'By purchasing, you agree to', + + // Popup + cardDescription: 'Card Description', + + // Empty data + noCardsAvailable: 'No membership cards available', + + // Confirmation + cardOverrideConfirm: 'You have an unexpired membership card. Purchasing again will override your current card. Continue?', +} diff --git a/lang/en-us/member/info.js b/lang/en-us/member/info.js index b37e91c..ebb6a77 100644 --- a/lang/en-us/member/info.js +++ b/lang/en-us/member/info.js @@ -52,5 +52,28 @@ export const lang = { surePhoneNumber: "Please enter a valid phone number", alikePhone: "Same as original phone number, no need to modify", - modify: 'Modify' + modify: 'Modify', + + sexUnknown: "Unknown", + sexMale: "Male", + sexFemale: "Female", + + pleaseSelectBirthday: "Please select birthday", + alikeRealName: "Same as original real name, no need to modify", + noEmptyRealName: "Real name cannot be empty", + + passwordMinLength: "New password must be at least {num} characters", + passwordComplexityPrefix: "Password must contain", + passwordNumber: "numbers", + passwordLowercase: "lowercase letters", + passwordUppercase: "uppercase letters", + passwordSymbol: "special characters", + passwordSeparator: ", ", + + pleaseInputMobile: "Please enter phone number", + codeSent: "Sent ({seconds}s)", + doNotRepeatedlyClick: "Do not click repeatedly", + + pleaseSelectRegion: "Please select region", + pleaseInputDetailAddress: "Please enter detailed address" } \ No newline at end of file diff --git a/lang/en-us/member/info_edit.js b/lang/en-us/member/info_edit.js index ab59965..d49b47a 100644 --- a/lang/en-us/member/info_edit.js +++ b/lang/en-us/member/info_edit.js @@ -57,5 +57,39 @@ export const lang = { surePhoneNumber: "Please enter a valid phone number", alikePhone: "Same as original phone number, no need to modify", - modify: 'Modify' + modify: 'Modify', + + pleaseInput: "Please enter", + usernameModifyTip: "Username can only be modified once, please set carefully", + pleaseSelectBirthday: "Please select birthday", + bindMobileFirstTip: "Please bind your mobile phone first", + bindNow: "Bind Now", + smsCode: "SMS Verification Code", + sendCodeTip: 'Click "Get Dynamic Code" and a verification code will be sent to your bound mobile number {mobile}', + oneClickAuthBind: "One-Click Authorization Binding", + manualBind: "Manual Binding", + region: "Region", + pleaseSelectRegion: "Please select province/city/district", + detailAddress: "Detailed Address", + + sexUnknown: "Unknown", + sexMale: "Male", + sexFemale: "Female", + + alikeRealName: "Same as original real name, no need to modify", + noEmptyRealName: "Real name cannot be empty", + + passwordMinLength: "New password must be at least {num} characters", + passwordComplexityPrefix: "Password must contain", + passwordNumber: "numbers", + passwordLowercase: "lowercase letters", + passwordUppercase: "uppercase letters", + passwordSymbol: "special characters", + passwordSeparator: ", ", + + pleaseInputMobile: "Please enter phone number", + codeSent: "Sent ({seconds}s)", + doNotRepeatedlyClick: "Do not click repeatedly", + + pleaseInputDetailAddress: "Please enter detailed address" } \ No newline at end of file diff --git a/lang/en-us/member/invite_friends.js b/lang/en-us/member/invite_friends.js index a5d534b..e0ca6dd 100644 --- a/lang/en-us/member/invite_friends.js +++ b/lang/en-us/member/invite_friends.js @@ -1,3 +1,56 @@ export const lang = { + // title is the page title title: 'Invite Friends', -} \ No newline at end of file + + // Activity header + activityDescription: 'Activity Description', + activityTime: 'Activity Time: {startTime} to {endTime}', + inviteNow: 'Invite Now', + + // Invite list + myFriends: 'My Friends', + cashRedPacketAmount: '{amount} yuan cash red packet', + pointsAmount: '{amount} points', + couponsAmount: '{count} coupons', + viewMore: 'View More', + noMoreData: 'No more data', + noInvitedFriendsTip: 'You haven\'t invited any new friends yet', + inviteTip: 'Invite friends and earn rewards. Give it a try~', + + // Invite rewards + inviteRewards: 'Invite Rewards', + cashRedPacket: 'Cash Red Packet', + points: 'Points', + couponUnit: '', + coupon: 'Coupon', + shareDesc: 'Share with friends. When friends enter through your share link and register, you can receive the following rewards:', + balanceReward: 'Get {amount} yuan red packet', + pointReward: 'Get {amount} points', + couponReward: 'Get {count} coupons', + unlimitedReward: 'Unlimited rewards available', + rewardLimit: 'Reward limit: {max} people', + + // Invite steps + howToInvite: 'How to Invite', + stepShareLink: 'Share link with friends', + stepFriendEnter: 'Friend enters', + stepFriendRegister: 'Friend registers and gets reward', + + // Poster popup + saveImage: 'Save Image', + longPressSaveImage: 'Long press to save image', + + // Share popup + share: 'Share', + shareToFriends: 'Share to Friends', + generatePoster: 'Generate Share Poster', + copyLink: 'Copy Link', + cancelShare: 'Cancel', + + // Empty data + noData: 'No relevant data', + + // Action tips + saveSuccess: 'Saved successfully', + saveFailed: 'Save failed, please try again later', +} diff --git a/lang/en-us/order/detail.js b/lang/en-us/order/detail.js index 0d8984e..719391a 100644 --- a/lang/en-us/order/detail.js +++ b/lang/en-us/order/detail.js @@ -1,4 +1,108 @@ export const lang = { - //title为每个页面的标题 - title: 'Order Details' -} \ No newline at end of file + //title for each page + title: 'Order Details', + + // ====== Order Status ====== + status: { + estimatedDelivery: 'Estimated delivery in {days} days', + orderCloseReason: 'Order close reason:', + remainingTime: 'Remaining time:' + }, + + // ====== Address ====== + address: { + receivingAddress: 'Shipping Address:', + deliveryTime: 'Delivery Time:', + deliverer: 'Deliverer:', + delivererMobile: 'Delivery Phone:' + }, + + // ====== Store Pickup ====== + store: { + businessHours: 'Business Hours:', + address: 'Address:', + noPickupStore: 'No pickup store available', + pickupName: 'Name', + reservedMobile: 'Reserved Phone', + pickupTime: 'Pickup Time', + pickupCode: 'Pickup Code:' + }, + + // ====== Goods ====== + goods: { + cardDeduction: 'Card Deduction', + applyAfterSales: 'After-sales', + applyRefund: 'Refund', + viewAfterSales: 'View After-sales', + viewRefund: 'View Refund' + }, + + // ====== Order Info ====== + orderInfo: { + orderType: 'Order Type:', + orderNo: 'Order No.:', + outTradeNo: 'Trade No.:', + createTime: 'Created:', + closeTime: 'Closed:', + payType: 'Payment Method:', + payTime: 'Paid At:', + deliveryType: 'Delivery Method:', + buyerMessage: 'Buyer Message:', + promotionDiscount: 'Promotion Discount:', + invoiceType: 'Invoice Type:', + invoiceTypePaper: 'Paper Invoice', + invoiceTypeElectronic: 'Electronic Invoice', + invoiceTitleType: 'Invoice Title Type:', + invoiceTitlePersonal: 'Personal', + invoiceTitleCompany: 'Company', + invoiceTitle: 'Invoice Title:', + invoiceContent: 'Invoice Content:', + invoiceMailAddress: 'Invoice Mailing Address:', + invoiceEmail: 'Invoice Email:', + myCardPack: 'My Card Pack:', + view: 'View' + }, + + // ====== Virtual Goods Verification ====== + virtualGoods: { + showCodeToVerifier: 'Please show the barcode or QR code to the verifier', + verifyInfo: 'Verification Info', + verifyCount: 'Verification Count', + verifyCountText: '{remaining} remaining / {total} total', + validPeriod: 'Valid Period', + permanentValid: 'Permanent', + verifyRecord: 'Verification Records', + verifier: 'Verified By', + verifyTime: 'Verification Time', + noVerifyRecord: 'No verification records', + cardInfo: 'Card Info', + cardNo: 'Card No.:', + cardPassword: 'Password:' + }, + + // ====== Amount ====== + amount: { + goodsMoney: 'Goods Amount', + deliveryFee: 'Shipping', + memberCard: 'Member Card', + taxFee: 'Tax', + invoiceDeliveryFee: 'Invoice Delivery', + orderAdjust: 'Order Adjustment', + promotionDiscount: 'Discount', + coupon: 'Coupon', + balanceUsed: 'Balance Used', + pointDeduction: 'Points Deduction', + totalPayable: 'Total Payable:' + }, + + // ====== Buttons ====== + button: { + evaluate: 'Review', + additionalEvaluate: 'Add Review' + }, + + // ====== Toast Messages ====== + toast: { + orderInfoNotFound: 'Order information not found!' + } +} diff --git a/lang/en-us/order/payment.js b/lang/en-us/order/payment.js index aec078a..762ef5a 100644 --- a/lang/en-us/order/payment.js +++ b/lang/en-us/order/payment.js @@ -1,4 +1,151 @@ export const lang = { - //title为每个页面的标题 - title: 'Pending Payment Order' -} \ No newline at end of file + //title for each page + title: 'Confirm Order', + + // ====== Virtual Goods ====== + virtual: { + tips: 'Please provide your mobile number for virtual goods so the merchant can contact you', + mobile: 'Mobile Number', + mobilePlaceholder: 'Please enter your mobile number' + }, + + // ====== Address ====== + address: { + setAddress: 'Please set your delivery address', + deliveryTime: 'Delivery Time', + selectDeliveryTime: 'Please select delivery time' + }, + + // ====== Local Delivery ====== + localDelivery: { + providedBy: 'Delivered by ', + deliveredBy: '', + switchStore: 'Switch', + noStoreNearby: 'No stores available for delivery nearby, please choose another delivery method' + }, + + // ====== Store Pickup ====== + store: { + businessHours: 'Business Hours:', + name: 'Name', + reservedMobile: 'Reserved Phone', + pickupTime: 'Pickup Time', + noPickupStore: 'No pickup store available, please choose another delivery method', + address: 'Address:' + }, + + // ====== Store List Popup ====== + storePopup: { + title: 'All relevant stores nearby have been selected for you', + businessHours: 'Business Hours:', + address: 'Address:', + noStoreNearby: 'No pickup stores available near the selected address' + }, + + // ====== Goods ====== + goods: { + notSupportDeliveryType: 'This product does not support {deliveryType}' + }, + + // ====== Order Money ====== + orderMoney: { + buyerMessage: 'Buyer Message', + noMessage: 'No message', + coupon: 'Coupon', + couponSelected: '{count} coupon selected', + noCoupon: 'No coupon', + totalItems: '{count} items', + subtotal: 'Subtotal:', + goodsAmount: 'Goods Amount', + shippingFee: 'Shipping', + discount: 'Discount', + pointsDeduction: 'Points Deduction' + }, + + // ====== Member Card ====== + memberCard: { + activate: 'Activate ', + expectedSave: 'Estimated savings for this order', + yuan: '', + weekCard: 'Weekly Card', + week: 'week', + monthCard: 'Monthly Card', + month: 'month', + quarterCard: 'Quarterly Card', + quarter: 'quarter', + yearCard: 'Yearly Card', + year: 'year' + }, + + // ====== Agreement ====== + agreement: { + tipPrefix: 'Please read the ', + tipSuffix: ' before purchase. Placing an order means you agree to this agreement' + }, + + // ====== Settlement Bar ====== + settlement: { + totalItems: '{count} items', + total: 'Total:', + submitOrder: 'Submit Order' + }, + + // ====== Promotion Popup ====== + promotionPopup: { + title: 'Promotion Discount', + confirm: 'OK' + }, + + // ====== Buyer Message Popup ====== + buyerMessagePopup: { + title: 'Buyer Message', + placeholder: 'Please coordinate with the merchant before leaving a message', + confirm: 'OK' + }, + + // ====== Coupon Popup ====== + couponPopup: { + title: 'Coupons', + discount: '% off', + minSpend: 'Min. spend {amount}', + noThreshold: 'No threshold', + maxDiscount: 'Max discount ¥{amount}', + validPeriod: 'Valid Period:', + permanentValid: 'Permanent', + noAvailableCoupon: 'No available coupons', + confirm: 'OK' + }, + + // ====== Form Popup ====== + formPopup: { + title: 'Buyer Info', + confirm: 'OK' + }, + + // ====== Member Card Popup ====== + memberCardPopup: { + title: 'Select Card', + unlimited: 'Unlimited', + remaining: '{count} remaining', + permanentValid: 'Permanent', + confirm: 'OK' + }, + + // ====== Toast Messages ====== + toast: { + enterReservedMobile: 'Please enter reserved mobile number', + enterValidMobile: 'Please enter a valid mobile number', + noDeliveryMethod: 'Merchant has not set delivery method', + selectAddressFirst: 'Please select your delivery address first', + noPickupStore: 'No pickup store available, please choose another delivery method', + selectPickupTime: 'Please select pickup time', + noDeliveryStore: 'No stores available for delivery, please choose another delivery method', + selectDeliveryTime: 'Please select delivery time', + enterInvoiceTitle: 'Please enter invoice title', + enterTaxpayerNumber: 'Please enter taxpayer identification number', + enterInvoiceAddress: 'Please enter invoice mailing address', + enterEmail: 'Please enter email', + enterValidEmail: 'Please enter a valid email', + selectInvoiceContent: 'Please select invoice content' + } +} diff --git a/lang/en-us/order/refund_detail.js b/lang/en-us/order/refund_detail.js index f8f8844..4955039 100644 --- a/lang/en-us/order/refund_detail.js +++ b/lang/en-us/order/refund_detail.js @@ -1,4 +1,72 @@ export const lang = { - //title为每个页面的标题 + //title is the page title title: 'Refund Details', -} \ No newline at end of file + + // ====== Status Tips ====== + statusTip: { + merchantReject: 'If the merchant rejects, you can reapply', + merchantAgree: 'If the merchant agrees, the application will be approved and refunded to you', + merchantConfirmReceive: 'Refund will be issued once the merchant confirms receipt', + merchantRejectReceive: 'If the merchant refuses to receive the goods, the refund will be closed and you can reapply' + }, + + // ====== Consult Record Entry ====== + consultRecord: 'Negotiation Records', + + // ====== Return Address ====== + returnAddress: { + title: 'Return Address', + receiver: 'Receiver: ', + contact: 'Contact: ', + address: 'Return Address: ', + copy: 'Copy' + }, + + // ====== Refund Information ====== + refundInfo: { + title: 'Refund Information', + refundMethod: 'Refund Method: ', + refundOnly: 'Refund Only', + refundReturn: 'Refund & Return', + refundChannel: 'Refund Channel: ', + originalRefund: 'Original Payment Refund', + offlineRefund: 'Offline Refund', + balanceRefund: 'Refund to Balance', + refundReason: 'Refund Reason: ', + refundAmount: 'Refund Amount: ', + refundNo: 'Refund No.: ', + applyTime: 'Apply Time: ', + refundTime: 'Refund Time: ', + refundRemark: 'Refund Remark: ', + refundPoint: 'Refund Points: ' + }, + + // ====== Return Goods Form ====== + returnGoods: { + expressCompany: 'Logistics Company', + expressCompanyPlaceholder: 'Please enter logistics company', + expressNo: 'Tracking Number', + expressNoPlaceholder: 'Please enter tracking number', + expressRemark: 'Logistics Remark', + expressRemarkPlaceholder: 'Optional' + }, + + // ====== Consult Record Page ====== + record: { + buyer: 'Buyer', + seller: 'Seller', + backToDetail: 'Back to Details' + }, + + // ====== Toast Messages ====== + toast: { + noRefundInfo: 'Refund information for this order item not found', + cancelSuccess: 'Cancelled successfully' + }, + + // ====== Form Validation ====== + validate: { + pleaseInputExpressCompany: 'Please enter logistics company', + pleaseInputExpressNo: 'Please enter tracking number' + } +} diff --git a/lang/en-us/point/detail.js b/lang/en-us/point/detail.js index bca1748..616dbf7 100644 --- a/lang/en-us/point/detail.js +++ b/lang/en-us/point/detail.js @@ -1,4 +1,45 @@ export const lang = { //title为每个页面的标题 - title: 'Exchange' -} \ No newline at end of file + title: 'Exchange', + + // 积分与价格 + pointsSuffix: ' points', + stockLabel: 'Stock:', + unlimitedStock: 'Unlimited', + unitPiece: 'pc(s)', + + // 优惠券描述 + containsBalance: 'Contains {balance}', + noThresholdCoupon: 'No threshold coupon', + fullReduction: 'Spend {atLeast} save {money}', + fullAmount: 'Spend {atLeast}', + discountSuffix: '% off', + maxDiscount: 'Max discount {limit}', + validFromReceive: 'Valid for {days} days from receipt', + validUntil: 'Expires {time}', + + // 社群 + addCommunity: 'Add', + addCommunityTitle: 'Add Community', + addCommunityTip: 'Long press to scan QR code and join the community', + + // 商品规格与属性 + selectSpec: 'Select', + attribute: 'Attributes', + goodsAttribute: 'Product Attributes', + goodsService: 'Product Services', + confirm: 'Confirm', + + // 详情 + exchangeDetail: 'Exchange Details', + noExchangeDetail: 'No exchange details available!', + + // 底部按钮 + loginToExchange: 'Login to redeem', + insufficientStock: 'Out of stock', + insufficientPoints: 'Insufficient points', + exchange: 'Redeem', + + // 分享 + shareTitle: 'Redeem {title} with only {point} points' +} diff --git a/lang/en-us/point/list.js b/lang/en-us/point/list.js index 7915f01..5f3e4e5 100644 --- a/lang/en-us/point/list.js +++ b/lang/en-us/point/list.js @@ -1,4 +1,57 @@ export const lang = { //title为每个页面的标题 - title: 'Point Mall' -} \ No newline at end of file + title: 'Point Mall', + + // 搜索 + searchPlaceholder: 'Search products', + + // 头部 + myPoints: 'My Points', + points: 'points', + reminder: 'Reminder', + remarkText: 'Redeem great gifts with points, new items daily!', + + // 储值套餐 + rechargeAmount: 'Recharge {price}', + earnPoints: 'Earn {point} points', + goRecharge: 'Recharge', + + // 分类标题 + exchangeCoupon: 'Points for Coupons', + exchangeHongbao: 'Points for Red Packets', + exchangeGift: 'Points for Gifts', + + // 优惠券 + discountSuffix: '% off', + noThresholdCoupon: 'No threshold coupon', + minSpendAvailable: 'Min. spend {amount}', + allStoreCoupon: 'Store-wide', + designatedCoupon: 'Designated items', + exchange: 'Redeem', + + // 商品 + yuan: '', + stock: 'Stock:', + exchanged: 'Redeemed:', + + // 积分说明弹窗 + pointDescription: 'Point Description', + pointAcquisition: 'Earning Points', + acquisitionItem1: '1. Points can be earned through registration, check-in, sharing, consumption, and recharge.', + acquisitionItem2: '2. Points can be earned when purchasing certain products.', + pointUsage: 'Using Points', + usageItem1: '1. Points can be used to redeem products in the Points Center.', + usageItem2: '2. Points can be used when participating in certain activities.', + usageItem3: '3. Points cannot be transferred, sold, and have no expiration date.', + pointQuery: 'Checking Points', + queryItem1: '1. Points balance and details can be checked in the Member Center.', + + // 分类列表 + categoryExchangeGoods: 'Points for Goodies', + categoryExchangeCoupon: 'Points for Coupons', + categoryExchangeHongbao: 'Points for Red Packets', + + // 提示 + merchantNotEnabled: 'Merchant has not enabled the points mall', + noActivity: 'No related activities available' +} diff --git a/lang/en-us/point/payment.js b/lang/en-us/point/payment.js index 1572d25..1cf2414 100644 --- a/lang/en-us/point/payment.js +++ b/lang/en-us/point/payment.js @@ -1,4 +1,63 @@ export const lang = { - //title为每个页面的标题 - title: 'Pending Payment Orders' -} \ No newline at end of file + //title for each page + title: 'Confirm Order', + + // ====== Virtual Goods ====== + virtual: { + tips: 'Please provide your mobile number for virtual goods so the merchant can contact you', + mobile: 'Mobile Number', + mobilePlaceholder: 'Please enter your mobile number' + }, + + // ====== Address ====== + address: { + setAddress: 'Please set your delivery address', + deliveryTime: 'Delivery Time', + selectDeliveryTime: 'Please select delivery time' + }, + + // ====== Local Delivery ====== + localDelivery: { + providedBy: 'Delivered by ', + deliveredBy: '', + switchStore: 'Switch', + noStoreNearby: 'No stores available for delivery nearby, please choose another delivery method' + }, + + // ====== Store Pickup ====== + store: { + businessHours: 'Business Hours:', + name: 'Name', + reservedMobile: 'Reserved Phone', + mobilePlaceholder: 'Please enter your mobile number', + pickupTime: 'Pickup Time', + noPickupStore: 'No pickup store available, please choose another delivery method', + address: 'Address:' + }, + + // ====== Store List Popup ====== + storePopup: { + title: 'All relevant stores nearby have been selected for you', + businessHours: 'Business Hours:', + address: 'Address:', + noStoreNearby: 'No pickup stores available near the selected address' + }, + + // ====== Order Money ====== + orderMoney: { + buyerMessage: 'Buyer Message', + buyerMessagePlaceholder: 'Please coordinate with the merchant before leaving a message', + pointsRequired: 'Points Required', + pointsSuffix: ' pts', + shippingFee: 'Shipping' + }, + + // ====== Settlement Bar ====== + settlement: { + totalItems: '{count} items', + total: 'Total:', + pointsSuffix: ' pts', + submitOrder: 'Submit Order', + shortByForMinimum: '{amount} more for minimum order' + } +} diff --git a/lang/zh-cn/ai-chat/index.js b/lang/zh-cn/ai-chat/index.js index 1a21c79..c2b2214 100644 --- a/lang/zh-cn/ai-chat/index.js +++ b/lang/zh-cn/ai-chat/index.js @@ -72,6 +72,20 @@ export const lang = { prompt: '提示', serviceTypeNotSupported: '当前客服类型不支持此页面', + // ====== index.vue - 帮助文档 ====== + helpContent: '# 使用帮助\n\n## 基本功能\n- **发送消息**: 在输入框中输入文字后发送\n- **语音输入**: 点击麦克风图标进行语音输入\n- **附件发送**: 点击+号可以发送图片、文件、位置\n\n## 消息类型\n- **文本消息**: 普通文字对话\n- **Markdown**: 支持格式化的文档内容\n- **文件**: 支持各种文件格式预览\n- **音频**: 支持语音消息播放\n- **视频**: 支持视频播放\n- **链接**: 支持网页链接跳转\n- **商品**: 支持商品卡片展示\n\n## 操作功能\n- **点赞/踩**: 对AI回复进行评价\n- **复制**: 长按消息可复制内容\n- **转发**: 支持消息转发功能', + + // ====== index.vue - AI回复模板 ====== + aiResponseTemplate1: '我理解您的需求,让我为您详细解答。', + aiResponseTemplate2: '感谢您的提问,这是一个很好的问题。', + aiResponseTemplate3: '根据您的问题,我建议您可以考虑以下几个方面:', + aiResponseTemplate4: '这个问题很常见,让我为您提供一些解决方案。', + aiResponseTemplate5: '我明白您的困惑,让我帮您分析一下。', + aiProcessingMessage: '您的问题"{question}"我已经收到,正在为您处理中...', + + // ====== index.vue - 商品咨询 ====== + productInquiryTemplate: '我想了解以下商品的详细信息:\n商品名称:{name}\n价格:¥{price}\n商品ID:{id}', + // ====== ai-chat-avatar-selector ====== avatarSelectorTitle: '更换头像', chooseFromAlbum: '从相册选择', diff --git a/lang/zh-cn/common.js b/lang/zh-cn/common.js index dfff79d..227ad4a 100644 --- a/lang/zh-cn/common.js +++ b/lang/zh-cn/common.js @@ -28,6 +28,31 @@ export const lang = { weChatWorkKefu: '企业微信客服', }, + // 客服服务 + customerService: { + openFailed: '打开客服失败', + wxworkConfigIncomplete: '企业微信配置不完整', + jumpFailed: '跳转失败,请稍后重试', + miniProgramOnly: '第三方小程序客服仅在微信小程序中可用', + linkCopied: '链接已复制,请在浏览器打开', + customerLinkCopied: '客服链接已复制', + noServicePhone: '暂无客服电话', + getPhoneFailed: '获取客服电话失败', + contactCustomerService: '联系客服', + callServiceTip: '请联系客服,客服电话是 {phone}', + noServiceOffline: '抱歉,商家暂无客服,请线下联系', + configError: '客服配置错误', + configErrorDetail: '配置有误:\n{errors}', + tip: '提示', + cannotAddWxwork: '无法直接添加企业微信,是否使用其他方式联系客服?', + onlineUnavailable: '在线客服不可用,是否拨打电话联系客服?', + developing: '客服选择功能开发中', + wxworkNotConfigured: '企业微信客服未配置', + serviceUnavailable: '客服暂不可用', + wxworkLinkNotConfigured: '企业微信链接未配置', + fromFloatButton: '来自悬浮按钮的咨询', + }, + login: '登录/注册', loginTips: '点击登录 享受更多精彩信息', toLogin: '去登录', diff --git a/lang/zh-cn/components-diy/diy-article.js b/lang/zh-cn/components-diy/diy-article.js new file mode 100644 index 0000000..98bc71a --- /dev/null +++ b/lang/zh-cn/components-diy/diy-article.js @@ -0,0 +1,4 @@ +export const lang = { + viewMore: '查看更多', + noArticles: '暂无相关文章', +} diff --git a/lang/zh-cn/components-diy/diy-coupon.js b/lang/zh-cn/components-diy/diy-coupon.js new file mode 100644 index 0000000..1e8cbe8 --- /dev/null +++ b/lang/zh-cn/components-diy/diy-coupon.js @@ -0,0 +1,30 @@ +export const lang = { + // 按钮文本 + claim: '领取', + claimNow: '立即领取', + goUse: '去使用', + useNow: '立即使用', + goBrowse: '去逛逛', + + // 金额单位 + yuan: '元', + discount: '折', + + // 优惠券使用条件 + minSpendAvailable: '满{amount}元可用', + noThresholdCoupon: '无门槛优惠券', + minSpendUse: '满{amount}元使用', + noThresholdUse: '无门槛使用', + allProductsAvailable: '所有商品可用', + specifiedProductsAvailable: '指定商品可用', + specifiedProductsUnavailable: '指定商品不可用', + + // 其他文本 + coupon: '优惠券', + noCoupons: '暂无优惠券', + validUntil: '有效期至{date}', + + // 提示消息 + couponSoldOut: '该优惠券已抢光', + claimSuccess: '领取成功', +} diff --git a/lang/zh-cn/components-diy/diy-member-info.js b/lang/zh-cn/components-diy/diy-member-info.js new file mode 100644 index 0000000..6d9d8a9 --- /dev/null +++ b/lang/zh-cn/components-diy/diy-member-info.js @@ -0,0 +1,22 @@ +export const lang = { + // 授权提示文本 + clickToAuthorizeAvatarNickname: '点击授权头像昵称', + clickToGetWechatAvatar: '点击获取微信头像', + + // 完善资料弹窗 + completeInfoTitle: '获取您的昵称、头像', + completeInfoTip: '获取用户头像、昵称完善个人资料,主要用于向用户提供具有辨识度的用户中心界面', + avatarLabel: '头像', + nicknameLabel: '昵称', + nicknamePlaceholder: '请输入昵称', + save: '保存', + + // 弹窗提示 + tip: '提示', + bindMobileTip: '使用会员码需先绑定手机号,是否绑定手机号?', + + // Toast 提示 + pleaseEnterNickname: '请输入昵称', + uploadFailed: '上传失败', + avatarPullFailed: '头像拉取失败', +} diff --git a/lang/zh-cn/components/ns-login.js b/lang/zh-cn/components/ns-login.js new file mode 100644 index 0000000..3f188ae --- /dev/null +++ b/lang/zh-cn/components/ns-login.js @@ -0,0 +1,51 @@ +export const lang = { + // ===== ns-login 组件 ===== + 'ns-login': { + // H5 绑定手机号弹窗 + bindMobileTitle: '检测到您还未绑定手机号', + bindMobileTip: '为了方便您接收订单等信息,需要绑定手机号', + mobileLabel: '手机号', + mobilePlaceholder: '请输入手机号', + captchaLabel: '验证码', + captchaPlaceholder: '请输入验证码', + dynacodeLabel: '动态码', + dynacodePlaceholder: '请输入动态码', + save: '保存', + + // 小程序登录弹窗 + welcomeTitle: '欢迎来到 {siteName}', + loginWithMobile: '使用手机号登录,', + registerLogin: '注册登录,', + getServicesTip: '获得订单、售后等服务。', + agree: '我同意', + privacyPolicy: '《隐私条款》', + userServiceAgreement: '《用户服务协议》', + agreeAndAuthorizeMobile: '同意隐私协议并授权手机号', + authorizeMobile: '授权手机号码', + notNow: '暂不登录', + + // 昵称头像 + avatarLabel: '头像', + nicknameLabel: '昵称', + nicknamePlaceholder: '请输入昵称', + getMobile: '获取手机号', + + // 动态码 + getDynacode: '获取动态码', + resendAfter: '{seconds}s后可重新获取', + + // 提示文案 + pleaseConfirmAgreement: '请确认相关协议', + uploadFailed: '上传失败', + pleaseEnterMobile: '请输入手机号', + pleaseEnterCorrectMobile: '请输入正确的手机号', + pleaseEnterCaptcha: '请输入验证码', + pleaseEnterDynacode: '请输入动态码', + requestFail: 'request:fail', + loggingIn: '登录中', + loginFailed: '登录失败', + pleaseAuthorizeMobile: '请授权您的手机号码', + pleaseEnterNickname: '请输入昵称', + avatarPullFailed: '头像拉取失败', + } +} diff --git a/lang/zh-cn/components/ns-newform.js b/lang/zh-cn/components/ns-newform.js new file mode 100644 index 0000000..2ba5d35 --- /dev/null +++ b/lang/zh-cn/components/ns-newform.js @@ -0,0 +1,33 @@ +export const lang = { + // ===== ns-newform 组件 ===== + 'ns-newform': { + // 输入框 placeholder 默认值 + inputPlaceholder: '请输入提示语', + selectPlaceholder: '请选择', + datePlaceholder: '请选择日期', + timePlaceholder: '请选择时间', + startDate: '开始日期', + endDate: '结束日期', + startTime: '开始时间', + endTime: '结束时间', + selectProvinceCity: '请选择省市', + selectProvinceCityDistrict: '请选择省市区', + + // 验证提示 - 必填 + pleaseInput: '请输入{title}', + pleaseSelect: '请选择{title}', + pleaseSelectAtLeastOne: '请至少选择一个{title}', + pleaseUploadAtLeastOne: '请至少上传一张{title}', + + // 验证提示 - 格式校验 + idCardInvalid: '身份证输入不合法', + mobileInvalid: '手机号输入不合法', + + // 验证提示 - 范围校验 + endDateBeforeStartDate: '结束日期不能小于开始日期', + endTimeBeforeStartTime: '结束时间必须大于开始时间', + + // 图片上传 + maxUploadImages: '最多上传{max}张图片', + } +} diff --git a/lang/zh-cn/components/yuyue-date.js b/lang/zh-cn/components/yuyue-date.js new file mode 100644 index 0000000..9729ff8 --- /dev/null +++ b/lang/zh-cn/components/yuyue-date.js @@ -0,0 +1,17 @@ +export const lang = { + // ===== yuyue-date 组件 ===== + 'yuyueDate': { + // 指定日期按钮 + appointedDate: '指定日期', + + // 时间状态文本 + fullyBooked: '已约满', + available: '可预约', + + // 选中状态 + noSelection: '暂无选择', + + // Toast 提示 + weekdayCannotBook: '{weekday}不可以预约', + } +} diff --git a/lang/zh-cn/fenxiao/apply.js b/lang/zh-cn/fenxiao/apply.js index 46bed58..0bc980f 100644 --- a/lang/zh-cn/fenxiao/apply.js +++ b/lang/zh-cn/fenxiao/apply.js @@ -1,5 +1,55 @@ export const lang = { //title为每个页面的标题 // title: '分销商申请' - title: '' + title: '', + + // 页面头部 + pleaseFillApplyInfo: '请填写申请信息', + + // 表单字段 + inviter: '邀请人', + nameLabel: '名称', + namePlaceholder: '请输入{name}名称', + mobile: '手机号', + mobilePlaceholder: '请输入手机号', + + // 协议 + haveReadAndUnderstand: '我已阅读并了解', + applyAgreement: '【{name}申请协议】', + + // 按钮 + applyBecome: '申请成为{name}', + reapply: '重新申请', + + // 申请条件 + applyConditionTitle: '分销商申请条件', + becomeConditionTitle: '成为分销商的条件', + conditionConsumeCount: '申请成为{name},需要您的消费次数达到{count}次', + conditionConsumeMoney: '申请成为{name},需要您的消费金额达到{money}元', + conditionBuyGoods: '申请成为{name},需要购买以下指定商品(任选其一)', + becomeConditionBuyGoods: '成为{name},需要购买以下指定商品(任选其一)', + + // 展开收起 + expandMore: '展开更多', + collapse: '收起', + + // 状态提示 + notFenxiao: '您还不是分销商', + applyPending: '您已提交{name}申请,等待平台审核', + applyRejected: '您提交的{name}申请,已被拒绝,请再接再厉', + + // 默认值 + none: '无', + + // Toast 提示 + merchantNotOpenFenxiao: '商家未开启分销', + pleaseReadAndCheckAgreement: '请仔细阅读协议,并勾选', + + // 页面标题后缀 + applySuffix: '申请', + + // 表单校验 + pleaseEnterName: '请输入{name}名称', + pleaseEnterMobile: '请输入手机号', + pleaseEnterValidMobile: '请输入正确的手机号', } diff --git a/lang/zh-cn/fenxiao/index.js b/lang/zh-cn/fenxiao/index.js index 3f940bb..219ec98 100644 --- a/lang/zh-cn/fenxiao/index.js +++ b/lang/zh-cn/fenxiao/index.js @@ -1,5 +1,70 @@ export const lang = { //title为每个页面的标题 // title: '分销中心', - title: '' + title: '', + + // 头部会员信息 + superiorAgent: '上级代理商', + headquarters: '总店', + invitedSuccess: '已邀请成功:{count}人', + + // 佣金/余额 + withdrawable: '可{withdraw}(元)', + withdrawDetail: '提现明细', + withdrawing: '提现中(元)', + pendingDeposit: '待入账(元)', + withdraw: '提现', + + // 功能菜单 + myFans: '我的粉丝', + invitedUsers: '邀请的用户', + detail: '明细', + totalAccumulated: '累计{account}{symbol}{amount}', + order: '订单', + orderDetail: '订单明细', + myInviteCode: '我的邀请码', + inviteFriendsEarnRewards: '邀好友赚好礼', + + // 未申请/空状态 + notFenxiaoYet: '您还不是{name},请先提交申请', + joinNow: '立即加入', + + // 任务弹窗 + quickUpgradeTips: '快速升级技巧', + completed: '已完成', + incomplete: '未完成', + goComplete: '去完成', + tip: '提示', + anyConditionUpgrade: '满足任意一条件即可升级', + allConditionsUpgrade: '满足全部条件才能进行升级', + + // 页面标题后缀 + center: '中心', + + // Toast 提示 + merchantNotOpenFenxiao: '商家未开启分销', + fenxiaoFrozen: '当前分销商已冻结', + + // 升级任务 - 下级消费 + subordinateConsumption: '下级消费', + subordinateOrderCount: '下级消费单数满{count}单', + subordinateOrderCountTip: '分销商自己购买和自己推荐的直属会员购买的订单次数', + subordinateOrderAmount: '下级消费金额满{amount}元', + subordinateOrderAmountTip: '分销商自己购买和推荐的直属会员购买的订单的总额', + subordinateCommissionAmount: '下级消费产生{account}总额满{amount}元', + subordinateCommissionAmountTip: '分销商自己购买和自己推荐的直属会员购买的订单{account}总额', + + // 升级任务 - 自身消费 + selfConsumption: '自身消费', + selfOrderCount: '自身消费单数满{count}单', + selfOrderCountTip: '分销商自己购买的订单次数', + selfOrderAmount: '自身消费金额满{amount}元', + selfOrderAmountTip: '分销商自己购买的订单总额', + + // 升级任务 - 邀请好友 + inviteFriends: '邀请好友', + inviteFriendCount: '邀请好友人数达到{count}人', + inviteFriendCountTip: '分销商的直属下级会员人数(包含已经申请成为分销商的)', + inviteFenxiaoCount: '邀请好友成为分销商人数达到{count}人', + inviteFenxiaoCountTip: '分销商的直属下级分销商人数', } diff --git a/lang/zh-cn/fenxiao/level.js b/lang/zh-cn/fenxiao/level.js index a504074..82ea49f 100644 --- a/lang/zh-cn/fenxiao/level.js +++ b/lang/zh-cn/fenxiao/level.js @@ -1,5 +1,49 @@ export const lang = { //title为每个页面的标题 // title: '分销商等级', - title: '' + title: '', + + // 页面标题后缀 + levelSuffix: '等级', + + // 分佣比率 + firstLevelCommissionRate: '一级分佣比率', + secondLevelCommissionRate: '二级分佣比率', + thirdLevelCommissionRate: '三级分佣比率', + + // 升级任务 + quickUpgradeTips: '快速升级技巧', + completed: '已完成', + incomplete: '未完成', + + // 提示弹窗 + tip: '提示', + anyConditionUpgrade: '满足任意一条件即可升级', + allConditionsUpgrade: '满足全部条件才能进行升级', + + // Toast 提示 + merchantNotOpenFenxiao: '商家未开启分销', + + // 升级任务 - 下级消费 + subordinateConsumption: '下级消费', + subordinateOrderCount: '下级消费单数满{count}单', + subordinateOrderCountTip: '分销商自己购买和自己推荐的直属会员购买的订单次数达到{count}单', + subordinateOrderAmount: '下级消费金额满{amount}元', + subordinateOrderAmountTip: '分销商自己购买和推荐的直属会员购买的订单的总额达到{amount}元', + subordinateCommissionAmount: '下级消费产生佣金总额满{amount}元', + subordinateCommissionAmountTip: '分销商自己购买和自己推荐的直属会员购买的订单佣金总额达到{amount}元', + + // 升级任务 - 自身消费 + selfConsumption: '自身消费', + selfOrderCount: '自身消费单数满{count}单', + selfOrderCountTip: '分销商自己购买的订单次数达到{count}单', + selfOrderAmount: '自身消费金额满{amount}元', + selfOrderAmountTip: '分销商自己购买的订单总额满足{amount}元', + + // 升级任务 - 邀请好友 + inviteFriends: '邀请好友', + inviteFriendCount: '邀请好友人数达到{count}人', + inviteFriendCountTip: '分销商的直属下级会员人数达到{count}人(包含已经申请成为分销商的)', + inviteFenxiaoCount: '邀请好友成为分销商人数达到{count}人', + inviteFenxiaoCountTip: '分销商的直属下级分销商人数达到{count}人', } diff --git a/lang/zh-cn/goods/cart.js b/lang/zh-cn/goods/cart.js index 85f4341..dae8d52 100644 --- a/lang/zh-cn/goods/cart.js +++ b/lang/zh-cn/goods/cart.js @@ -9,5 +9,39 @@ export const lang = { emptyTips: '暂无商品', goForStroll: '去逛逛', del: '删除', - login: '去登录' + login: '去登录', + // 购物车头部 + totalKinds: '共{count}种商品', + // 优惠券提示 + coupon: '优惠券', + couponMaxDiscount: '领券结算最高可减{money}元', + receive: '领取', + view: '查看', + clickToReceive: '点击领取', + clickToView: '点击查看', + // 满减 + fullReduction: '满减', + fullReductionItem: '{limit}减{discount}', + // 失效商品 + invalidGoods: '失效商品{count}件', + clear: '清空', + invalid: '已失效', + // 空购物车 + cartEmpty: '购物车为空', + cartEmptySubText: '赶紧去逛逛,购买心仪的商品吧', + // 优惠明细弹窗 + discountDetail: '优惠明细', + goodsTotal: '商品总额', + // 优惠券弹窗 + discountLabel: '折', + minSpend: '满{amount}可用', + noThreshold: '无门槛', + maxDiscount: '最多可抵{symbol}{limit}', + validityPeriod: '有效期:', + validFromReceive: '领取之日起{days}天内有效', + longTermValid: '长期有效', + received: '已领取', + // 结算按钮 + receiveCouponSettle: '领券结算({count})', + settleImmediately: '立即结算({count})' } diff --git a/lang/zh-cn/goods/detail.js b/lang/zh-cn/goods/detail.js index 9bfc659..ea2baaf 100644 --- a/lang/zh-cn/goods/detail.js +++ b/lang/zh-cn/goods/detail.js @@ -29,4 +29,81 @@ export const lang = { kefu:'客服', follow:'收藏', spec:'规格', + + // SKU相关 + stockInsufficient: '库存不足', + offShelves: '该商品已下架', + soldOut: '商品已售罄', + buyCountNotZero: '购买数量不能小于等于0', + stockLessThanMinBuy: '库存小于最低购买数量', + purchaseLimit: '该商品每人限购{count}{unit}', + purchaseLimitWithPurchased: '该商品每人限购{count}{unit},您已购买了{purchased}{unit}', + maxPurchasePerTime: '该商品每次最多购买{count}{unit}', + selectedSpec: '已选规格:', + buyCount: '购买数量', + exchangeCount: '兑换数量', + joinCart: '加入购物车', + confirmBtn: '确认', + rushBuy: '立即抢购', + exchangeBtn: '兑换', + addToCartSuccess: '加入购物车成功', + minBuyStart: '{minBuy}{unit}起售', + balanceLabel: '尾款', + pointLabel: '积分:', + stockLabel: '库存:', + groupOfNum: '{num}人团', + limitPerPerson: '每人限购{count}{unit}', + limitBuyRange: '{minBuy}{unit}起售,限购{maxBuy}{unit}', + limitBuyMax: '限购{maxBuy}{unit}', + previewCannotBuy: '预览商品无法购买', + specNotInBale: '该规格未参与打包一口价活动', + goodsStockInsufficient: '商品库存不足', + goodsAddCartSuccess: '商品添加购物车成功', + selected: '已选择:', + startingNum: '起售{num}件', + goodsOffShelves: '商品已下架', + + // 价格与促销 + limitedTimeDiscount: '限时折扣', + sold: '已售', + countdownEndsIn: '距结束仅剩', + originalPrice: '原价', + + // 组合套餐 + comboPackage: '组合套餐', + comboPrice: '套餐价', + + // 优惠券 + coupons: '优惠券', + discountOff: '折', + minSpendAvailable: '满{amount}可用', + noThreshold: '无门槛', + maxDiscount: '最多可抵{symbol}{amount}', + validUntilDate: '有效期:{date}', + validForDays: '有效期:领取之日起{days}天内有效', + validPermanent: '有效期:长期有效', + couponSoldOut: '已抢光', + couponClaimed: '已领取', + couponReceive: '领取', + + // 促销活动 + promotion: '促销', + fullReduction: '满减', + fullGift: '满送', + freeShipping: '包邮', + + // 商品留言 + productMessage: '商品留言', + + // 智能客服 + aiCustomerService: '智能客服', + + // 联系弹窗 + dialOnMobile: '可在手机端拨打{phone}', + cancel: '取消', + copyToClipboard: '复制到剪切板', + copySuccess: '复制成功', + + // 通用按钮 + confirm: '确定', } diff --git a/lang/zh-cn/member/card_buy.js b/lang/zh-cn/member/card_buy.js index 1aab742..960a9d6 100644 --- a/lang/zh-cn/member/card_buy.js +++ b/lang/zh-cn/member/card_buy.js @@ -1,4 +1,57 @@ export const lang = { //title为每个页面的标题 - title: '会员卡' + title: '会员卡', + + // 会员信息 + validUntil: '有效期至:', + + // 会员卡描述 + enjoyDiscountAnd: '可享受消费折扣和', + memberGiftBenefits: '会员大礼包等权益', + + // 卡种选择 + cardTypeSelection: '卡种选择', + weekCardName: '周卡', + weekCardUnit: '周', + monthCardName: '月卡', + monthCardUnit: '月', + quarterCardName: '季卡', + quarterCardUnit: '季', + yearCardName: '年卡', + yearCardUnit: '年', + + // 会员权益 + memberBenefits: '会员权益', + freeShipping: '全场包邮', + enjoyFreeShipping: '享受商品包邮服务', + consumptionDiscount: '消费折扣', + enjoyDiscountOnSomeProducts: '部分商品下单可享{discount}折优惠', + pointsReward: '积分回馈', + earnPointsMultiplier: '下单享{multiplier}倍积分回馈', + + // 开卡礼包 + welcomeGift: '开卡礼包', + pointsGift: '积分礼包', + giftPoints: '赠送{points}积分', + redPacketGift: '红包礼包', + giftRedPacket: '赠送{amount}元红包', + couponGift: '优惠券礼包', + giftCoupons: '赠送{count}张优惠券', + + // 操作按钮 + renewNow: '立即续费', + rechargeToActivate: '充值开通', + activateNow: '立即开通', + + // 协议 + purchaseAgreement: '购买既视为同意', + + // 弹窗 + cardDescription: '会员卡说明', + + // 空数据 + noCardsAvailable: '暂无可开会员卡', + + // 确认提示 + cardOverrideConfirm: '您有尚未过期的会员卡,再次购卡会覆盖掉之前的卡,是否继续?', } diff --git a/lang/zh-cn/member/info.js b/lang/zh-cn/member/info.js index 52b220a..8446eaf 100644 --- a/lang/zh-cn/member/info.js +++ b/lang/zh-cn/member/info.js @@ -52,5 +52,28 @@ export const lang = { surePhoneNumber: "请输入正确的手机号", alikePhone: "与原手机号一致,无需修改", - modify: '修改' + modify: '修改', + + sexUnknown: "未知", + sexMale: "男", + sexFemale: "女", + + pleaseSelectBirthday: "请选择生日", + alikeRealName: "与原真实姓名一致,无需修改", + noEmptyRealName: "真实姓名不能为空", + + passwordMinLength: "新密码长度不能小于{num}位", + passwordComplexityPrefix: "密码需包含", + passwordNumber: "数字", + passwordLowercase: "小写字母", + passwordUppercase: "大写字母", + passwordSymbol: "特殊字符", + passwordSeparator: "、", + + pleaseInputMobile: "请输入手机号", + codeSent: "已发送({seconds}s)", + doNotRepeatedlyClick: "请勿重复点击", + + pleaseSelectRegion: "请选择所在地区", + pleaseInputDetailAddress: "请输入详细地址" } diff --git a/lang/zh-cn/member/info_edit.js b/lang/zh-cn/member/info_edit.js index 9220f03..e74f855 100644 --- a/lang/zh-cn/member/info_edit.js +++ b/lang/zh-cn/member/info_edit.js @@ -57,5 +57,39 @@ export const lang = { surePhoneNumber: "请输入正确的手机号", alikePhone: "与原手机号一致,无需修改", - modify: '修改' + modify: '修改', + + pleaseInput: "请输入", + usernameModifyTip: "用户名仅可修改一次,请谨慎设置", + pleaseSelectBirthday: "请选择生日", + bindMobileFirstTip: "请先绑定手机再执行该操作", + bindNow: "立即绑定", + smsCode: "短信验证码", + sendCodeTip: '点击"获取动态码",将会向您已绑定的手机号{mobile}发送验证码', + oneClickAuthBind: "一键授权绑定", + manualBind: "手动绑定", + region: "所在地区", + pleaseSelectRegion: "请选择省市区县", + detailAddress: "详细地址", + + sexUnknown: "未知", + sexMale: "男", + sexFemale: "女", + + alikeRealName: "与原真实姓名一致,无需修改", + noEmptyRealName: "真实姓名不能为空", + + passwordMinLength: "新密码长度不能小于{num}位", + passwordComplexityPrefix: "密码需包含", + passwordNumber: "数字", + passwordLowercase: "小写字母", + passwordUppercase: "大写字母", + passwordSymbol: "特殊字符", + passwordSeparator: "、", + + pleaseInputMobile: "请输入手机号", + codeSent: "已发送({seconds}s)", + doNotRepeatedlyClick: "请勿重复点击", + + pleaseInputDetailAddress: "请输入详细地址" } diff --git a/lang/zh-cn/member/invite_friends.js b/lang/zh-cn/member/invite_friends.js index 5456928..b599d18 100644 --- a/lang/zh-cn/member/invite_friends.js +++ b/lang/zh-cn/member/invite_friends.js @@ -1,3 +1,56 @@ export const lang = { + // title为每个页面的标题 title: '邀请好友', -} \ No newline at end of file + + // 活动头部 + activityDescription: '活动说明', + activityTime: '活动时间:{startTime}至{endTime}', + inviteNow: '立即邀请', + + // 邀请列表 + myFriends: '我的好友', + cashRedPacketAmount: '{amount}元现金红包', + pointsAmount: '{amount}积分', + couponsAmount: '{count}张优惠券', + viewMore: '查看更多', + noMoreData: '没有更多数据了', + noInvitedFriendsTip: '您还没有邀请到新朋友哦', + inviteTip: '邀请好友,赚取好礼。赶紧去试试吧~', + + // 邀请奖励 + inviteRewards: '邀请好友奖励', + cashRedPacket: '现金红包', + points: '积分', + couponUnit: '张', + coupon: '优惠券', + shareDesc: '分享给好友,让好友通过你的分享链接进入并注册登录,可获得以下奖励:', + balanceReward: '可得{amount}元红包奖励', + pointReward: '可得{amount}积分', + couponReward: '可得{count}张优惠券', + unlimitedReward: '可得奖励不受限制', + rewardLimit: '奖励上限为{max}人', + + // 邀请步骤 + howToInvite: '如何邀请好友', + stepShareLink: '分享链接给好友', + stepFriendEnter: '好友进入', + stepFriendRegister: '好友注册成功获得奖励', + + // 海报弹窗 + saveImage: '保存图片', + longPressSaveImage: '长按保存图片', + + // 分享弹窗 + share: '分享', + shareToFriends: '分享给好友', + generatePoster: '生成分享海报', + copyLink: '复制链接', + cancelShare: '取消分享', + + // 空数据 + noData: '暂无相关数据', + + // 操作提示 + saveSuccess: '保存成功', + saveFailed: '保存失败,请稍后重试', +} diff --git a/lang/zh-cn/order/detail.js b/lang/zh-cn/order/detail.js index 6c02235..df0b231 100644 --- a/lang/zh-cn/order/detail.js +++ b/lang/zh-cn/order/detail.js @@ -1,4 +1,108 @@ export const lang = { //title为每个页面的标题 - title: '订单详情' + title: '订单详情', + + // ====== 订单状态区 ====== + status: { + estimatedDelivery: '预计{days}日后发货', + orderCloseReason: '订单关闭原因:', + remainingTime: '剩余时间:' + }, + + // ====== 地址区 ====== + address: { + receivingAddress: '收货地址:', + deliveryTime: '送达时间:', + deliverer: '配送员:', + delivererMobile: '外卖电话:' + }, + + // ====== 门店自提区 ====== + store: { + businessHours: '营业时间:', + address: '地址:', + noPickupStore: '当前无自提门店', + pickupName: '姓名', + reservedMobile: '预留手机', + pickupTime: '提货时间', + pickupCode: '提货码:' + }, + + // ====== 商品区 ====== + goods: { + cardDeduction: '次卡抵扣', + applyAfterSales: '申请售后', + applyRefund: '申请退款', + viewAfterSales: '查看售后', + viewRefund: '查看退款' + }, + + // ====== 订单概况区 ====== + orderInfo: { + orderType: '订单类型:', + orderNo: '订单编号:', + outTradeNo: '订单交易号:', + createTime: '创建时间:', + closeTime: '关闭时间:', + payType: '支付方式:', + payTime: '支付时间:', + deliveryType: '配送方式:', + buyerMessage: '买家留言:', + promotionDiscount: '活动优惠:', + invoiceType: '发票类型:', + invoiceTypePaper: '纸质发票', + invoiceTypeElectronic: '电子发票', + invoiceTitleType: '发票抬头类型:', + invoiceTitlePersonal: '个人', + invoiceTitleCompany: '企业', + invoiceTitle: '发票抬头:', + invoiceContent: '发票内容:', + invoiceMailAddress: '发票邮寄地址:', + invoiceEmail: '发票接收邮件:', + myCardPack: '我的卡包:', + view: '查看' + }, + + // ====== 虚拟商品核销区 ====== + virtualGoods: { + showCodeToVerifier: '请将条形码或二维码出示给核销员', + verifyInfo: '核销信息', + verifyCount: '核销次数', + verifyCountText: '剩余{remaining}次/共{total}次', + validPeriod: '有效期', + permanentValid: '永久有效', + verifyRecord: '核销记录', + verifier: '核销人', + verifyTime: '核销时间', + noVerifyRecord: '暂无核销记录', + cardInfo: '卡密信息', + cardNo: '卡号:', + cardPassword: '密码:' + }, + + // ====== 金额区 ====== + amount: { + goodsMoney: '商品金额', + deliveryFee: '运费', + memberCard: '会员卡', + taxFee: '税费', + invoiceDeliveryFee: '发票邮寄费', + orderAdjust: '订单调整', + promotionDiscount: '优惠', + coupon: '优惠券', + balanceUsed: '使用余额', + pointDeduction: '积分抵扣', + totalPayable: '实付金额:' + }, + + // ====== 按钮区 ====== + button: { + evaluate: '评价', + additionalEvaluate: '追评' + }, + + // ====== 提示消息 ====== + toast: { + orderInfoNotFound: '未获取到订单信息!' + } } diff --git a/lang/zh-cn/order/payment.js b/lang/zh-cn/order/payment.js index 88657dd..b22973e 100644 --- a/lang/zh-cn/order/payment.js +++ b/lang/zh-cn/order/payment.js @@ -1,4 +1,151 @@ export const lang = { //title为每个页面的标题 - title: '待付款订单' + title: '确认订单', + + // ====== 虚拟商品区 ====== + virtual: { + tips: '购买虚拟类商品需填写手机号,方便商家与您联系', + mobile: '手机号码', + mobilePlaceholder: '请输入您的手机号码' + }, + + // ====== 地址区 ====== + address: { + setAddress: '请设置收货地址', + deliveryTime: '送达时间', + selectDeliveryTime: '请选择送达时间' + }, + + // ====== 本地配送区 ====== + localDelivery: { + providedBy: '由', + deliveredBy: '提供配送', + switchStore: '点击切换', + noStoreNearby: '您的附近没有可配送的门店,请选择其他配送方式' + }, + + // ====== 门店自提区 ====== + store: { + businessHours: '营业时间:', + name: '姓名', + reservedMobile: '预留手机', + pickupTime: '提货时间', + noPickupStore: '当前无自提门店,请选择其它配送方式', + address: '地址:' + }, + + // ====== 门店列表弹窗 ====== + storePopup: { + title: '已为您甄选出附近所有相关门店', + businessHours: '营业时间:', + address: '地址:', + noStoreNearby: '所选择收货地址附近没有可以自提的门店' + }, + + // ====== 商品区 ====== + goods: { + notSupportDeliveryType: '该商品不支持{deliveryType}' + }, + + // ====== 订单金额区 ====== + orderMoney: { + buyerMessage: '买家留言', + noMessage: '无留言', + coupon: '优惠券', + couponSelected: '已选择{count}张优惠券', + noCoupon: '不使用优惠券', + totalItems: '共{count}件', + subtotal: '小计:', + goodsAmount: '商品金额', + shippingFee: '运费', + discount: '优惠', + pointsDeduction: '积分抵扣' + }, + + // ====== 会员卡区 ====== + memberCard: { + activate: '开通', + expectedSave: '本单预计可省', + yuan: '元', + weekCard: '周卡', + week: '周', + monthCard: '月卡', + month: '月', + quarterCard: '季卡', + quarter: '季', + yearCard: '年卡', + year: '年' + }, + + // ====== 交易协议区 ====== + agreement: { + tipPrefix: '购买前请先阅读', + tipSuffix: ',下单即代表同意该协议' + }, + + // ====== 底部结算区 ====== + settlement: { + totalItems: '共{count}件', + total: '合计:', + submitOrder: '提交订单' + }, + + // ====== 活动优惠弹窗 ====== + promotionPopup: { + title: '活动优惠', + confirm: '确定' + }, + + // ====== 买家留言弹窗 ====== + buyerMessagePopup: { + title: '买家留言', + placeholder: '留言前建议先与商家协调一致', + confirm: '确定' + }, + + // ====== 优惠券弹窗 ====== + couponPopup: { + title: '优惠券', + discount: '折', + minSpend: '满{amount}可用', + noThreshold: '无门槛', + maxDiscount: '最多可抵¥{amount}', + validPeriod: '有效期:', + permanentValid: '长期有效', + noAvailableCoupon: '暂无可用的优惠券', + confirm: '确定' + }, + + // ====== 表单修改弹窗 ====== + formPopup: { + title: '买家信息', + confirm: '确定' + }, + + // ====== 次卡选择弹窗 ====== + memberCardPopup: { + title: '选择次卡', + unlimited: '不限次数', + remaining: '剩余{count}次', + permanentValid: '长期有效', + confirm: '确定' + }, + + // ====== 验证提示 ====== + toast: { + enterReservedMobile: '请输入预留手机', + enterValidMobile: '请输入正确的手机号', + noDeliveryMethod: '商家未设置配送方式', + selectAddressFirst: '请先选择您的收货地址', + noPickupStore: '没有可提货的门店,请选择其他配送方式', + selectPickupTime: '请选择提货时间', + noDeliveryStore: '没有可配送的门店,请选择其他配送方式', + selectDeliveryTime: '请选择送达时间', + enterInvoiceTitle: '请填写发票抬头', + enterTaxpayerNumber: '请填写纳税人识别号', + enterInvoiceAddress: '请填写发票邮寄地址', + enterEmail: '请填写邮箱', + enterValidEmail: '请填写正确的邮箱', + selectInvoiceContent: '请选择发票内容' + } } diff --git a/lang/zh-cn/order/refund_detail.js b/lang/zh-cn/order/refund_detail.js index f931c6b..e346b1a 100644 --- a/lang/zh-cn/order/refund_detail.js +++ b/lang/zh-cn/order/refund_detail.js @@ -1,4 +1,72 @@ export const lang = { //title为每个页面的标题 title: '退款详情', + + // ====== 状态提示 ====== + statusTip: { + merchantReject: '如果商家拒绝,你可重新发起申请', + merchantAgree: '如果商家同意,将通过申请并退款给你', + merchantConfirmReceive: '如果商家确认收货将会退款给你', + merchantRejectReceive: '如果商家拒绝收货,该次退款将会关闭,你可以重新发起退款' + }, + + // ====== 协商记录入口 ====== + consultRecord: '协商记录', + + // ====== 退货地址 ====== + returnAddress: { + title: '退货地址', + receiver: '收货人:', + contact: '联系方式:', + address: '退货地址:', + copy: '复制' + }, + + // ====== 退款信息 ====== + refundInfo: { + title: '退款信息', + refundMethod: '退款方式:', + refundOnly: '仅退款', + refundReturn: '退款退货', + refundChannel: '退款途径:', + originalRefund: '原路退款', + offlineRefund: '线下退款', + balanceRefund: '退款到余额', + refundReason: '退款原因:', + refundAmount: '退款金额:', + refundNo: '退款编号:', + applyTime: '申请时间:', + refundTime: '退款时间:', + refundRemark: '退款说明:', + refundPoint: '退款积分:' + }, + + // ====== 退货表单 ====== + returnGoods: { + expressCompany: '物流公司', + expressCompanyPlaceholder: '请输入物流公司', + expressNo: '物流单号', + expressNoPlaceholder: '请输入物流单号', + expressRemark: '物流说明', + expressRemarkPlaceholder: '选填' + }, + + // ====== 协商记录页 ====== + record: { + buyer: '买家', + seller: '卖家', + backToDetail: '返回详情' + }, + + // ====== 提示信息 ====== + toast: { + noRefundInfo: '未获取到该订单项退款信息', + cancelSuccess: '撤销成功' + }, + + // ====== 表单验证 ====== + validate: { + pleaseInputExpressCompany: '请输入物流公司', + pleaseInputExpressNo: '请输入物流单号' + } } diff --git a/lang/zh-cn/point/detail.js b/lang/zh-cn/point/detail.js index 17ad9f1..6f09ad2 100644 --- a/lang/zh-cn/point/detail.js +++ b/lang/zh-cn/point/detail.js @@ -1,4 +1,45 @@ export const lang = { //title为每个页面的标题 - title: '兑换' + title: '兑换', + + // 积分与价格 + pointsSuffix: '积分', + stockLabel: '库存:', + unlimitedStock: '无限', + unitPiece: '件', + + // 优惠券描述 + containsBalance: '内含{balance}元', + noThresholdCoupon: '无门槛优惠券', + fullReduction: '满{atLeast}减{money}', + fullAmount: '满{atLeast}元', + discountSuffix: '折', + maxDiscount: '最多优惠{limit}元', + validFromReceive: '领取之日起{days}天内有效', + validUntil: '{time}到期', + + // 社群 + addCommunity: '添加', + addCommunityTitle: '添加社群', + addCommunityTip: '长按识别二维码,添加社群', + + // 商品规格与属性 + selectSpec: '选择', + attribute: '属性', + goodsAttribute: '商品属性', + goodsService: '商品服务', + confirm: '确定', + + // 详情 + exchangeDetail: '兑换详情', + noExchangeDetail: '暂无兑换详情!', + + // 底部按钮 + loginToExchange: '登录之后方可兑换', + insufficientStock: '库存不足', + insufficientPoints: '积分不足', + exchange: '兑换', + + // 分享 + shareTitle: '仅需{point}积分即可兑换{title}' } diff --git a/lang/zh-cn/point/list.js b/lang/zh-cn/point/list.js index 35fa006..75c4d4c 100644 --- a/lang/zh-cn/point/list.js +++ b/lang/zh-cn/point/list.js @@ -1,4 +1,57 @@ export const lang = { //title为每个页面的标题 - title: '积分商城' + title: '积分商城', + + // 搜索 + searchPlaceholder: '搜索商品', + + // 头部 + myPoints: '我的积分', + points: '积分', + reminder: '提醒', + remarkText: '积分兑好礼,每日上新换不停!', + + // 储值套餐 + rechargeAmount: '储值{price}元', + earnPoints: '可得{point}积分', + goRecharge: '去储值', + + // 分类标题 + exchangeCoupon: '积分换券', + exchangeHongbao: '积分换红包', + exchangeGift: '积分换礼品', + + // 优惠券 + discountSuffix: '折', + noThresholdCoupon: '无门槛优惠券', + minSpendAvailable: '满{amount}可用', + allStoreCoupon: '全场券', + designatedCoupon: '指定券', + exchange: '兑换', + + // 商品 + yuan: '元', + stock: '库存:', + exchanged: '已兑:', + + // 积分说明弹窗 + pointDescription: '积分说明', + pointAcquisition: '积分的获取', + acquisitionItem1: '1、积分可在注册、签到、分享、消费、充值时获得。', + acquisitionItem2: '2、在购买部分商品时可获得积分。', + pointUsage: '积分的使用', + usageItem1: '1、积分可用于兑换积分中心的商品。', + usageItem2: '2、积分可在参与某些活动时使用。', + usageItem3: '3、积分不得转让,出售,不设有效期。', + pointQuery: '积分的查询', + queryItem1: '1、积分可在会员中心中查询具体数额以及明细。', + + // 分类列表 + categoryExchangeGoods: '积分换好物', + categoryExchangeCoupon: '积分换券', + categoryExchangeHongbao: '积分换红包', + + // 提示 + merchantNotEnabled: '商家未开启积分商城', + noActivity: '暂无相关活动' } diff --git a/lang/zh-cn/point/payment.js b/lang/zh-cn/point/payment.js index 88657dd..86e0393 100644 --- a/lang/zh-cn/point/payment.js +++ b/lang/zh-cn/point/payment.js @@ -1,4 +1,63 @@ export const lang = { //title为每个页面的标题 - title: '待付款订单' + title: '确认订单', + + // ====== 虚拟商品区 ====== + virtual: { + tips: '购买虚拟类商品需填写手机号,方便商家与您联系', + mobile: '手机号码', + mobilePlaceholder: '请输入您的手机号码' + }, + + // ====== 地址区 ====== + address: { + setAddress: '请设置收货地址', + deliveryTime: '送达时间', + selectDeliveryTime: '请选择送达时间' + }, + + // ====== 本地配送区 ====== + localDelivery: { + providedBy: '由', + deliveredBy: '提供配送', + switchStore: '点击切换', + noStoreNearby: '您的附近没有可配送的门店,请选择其他配送方式' + }, + + // ====== 门店自提区 ====== + store: { + businessHours: '营业时间:', + name: '姓名', + reservedMobile: '预留手机', + mobilePlaceholder: '请输入您的手机号码', + pickupTime: '自提时间', + noPickupStore: '当前无自提门店,请选择其它配送方式', + address: '地址:' + }, + + // ====== 门店列表弹窗 ====== + storePopup: { + title: '已为您甄选出附近所有相关门店', + businessHours: '营业时间:', + address: '地址:', + noStoreNearby: '所选择收货地址附近没有可以自提的门店' + }, + + // ====== 订单金额区 ====== + orderMoney: { + buyerMessage: '买家留言', + buyerMessagePlaceholder: '留言前建议先与商家协调一致', + pointsRequired: '所需积分', + pointsSuffix: '积分', + shippingFee: '运费' + }, + + // ====== 底部结算区 ====== + settlement: { + totalItems: '共{count}件', + total: '合计:', + pointsSuffix: '积分', + submitOrder: '提交订单', + shortByForMinimum: '差{amount}起送' + } } diff --git a/pages_goods/cart.vue b/pages_goods/cart.vue index b8dea99..8f649b6 100644 --- a/pages_goods/cart.vue +++ b/pages_goods/cart.vue @@ -5,7 +5,7 @@ :refresher-triggered="refresherTriggered" @refresherrefresh="onRefresh"> - 共{{ cartData[0].cartList.length }}种商品 + {{ $lang('goods.cart.totalKinds', { count: cartData[0].cartList.length }) }} {{ isAction ? $lang('complete') : $lang('edit') }} @@ -13,11 +13,11 @@ - 优惠券 - 领券结算最高可减{{ discount.coupon_info.coupon_money | moneyFormat }}元 + {{ $lang('goods.cart.coupon') }} + {{ $lang('goods.cart.couponMaxDiscount', { money: discount.coupon_info.coupon_money | moneyFormat }) }} - 点击{{ discount.coupon_info.receive_type == 'wait' ? '领取' : '查看' }} + {{ discount.coupon_info.receive_type == 'wait' ? $lang('goods.cart.clickToReceive') : $lang('goods.cart.clickToView') }} @@ -120,15 +120,14 @@ @limit="goodsLimit($event, { siteIndex, cartIndex })" /> - 满减 - - - {{ Number(mitem.limit) }}减{{ - mitem.discount_money }} - - - - + {{ $lang('goods.cart.fullReduction') }} + + + {{ $lang('goods.cart.fullReductionItem', { limit: Number(mitem.limit), discount: mitem.discount_money }) }} + + + + - 失效商品{{ invalidGoods.length }}件 + {{ $lang('goods.cart.invalidGoods', { count: invalidGoods.length }) }} - 清空 + {{ $lang('goods.cart.clear') }} @@ -189,7 +188,7 @@ - 已失效 + {{ $lang('goods.cart.invalid') }} @@ -199,7 +198,7 @@ - + disabled>{{ $lang('goods.cart.received') }} + @click.stop="receiveCoupon(discount.coupon_info.coupon_type_id)">{{ $lang('goods.cart.receive') }} @@ -329,7 +328,7 @@ - 优惠明细 + {{ $lang('goods.cart.discountDetail') }} @@ -338,8 +337,7 @@ + @@ -316,7 +316,7 @@ - 优惠券 + {{ $lang('coupons') }} @@ -331,33 +331,33 @@ {{ item.coupon_name }} - 最多可抵¥{{ item.discount_limit }} - 有效期:{{ $util.timeStampTurnTime(item.end_time) }} - 有效期:领取之日起{{ item.fixed_term }}天内有效 - 有效期:长期有效 + {{ $lang('maxDiscount', { symbol: $lang('common.currencySymbol'), amount: item.discount_limit }) }} + {{ $lang('validUntilDate', { date: $util.timeStampTurnTime(item.end_time) }) }} + {{ $lang('validForDays', { days: item.fixed_term }) }} + {{ $lang('validPermanent') }} - - - + + + - + @@ -367,24 +367,24 @@ - 促销 + {{ $lang('promotion') }} - 满减 + {{ $lang('fullReduction') }} {{ manjian.manjian }} - 满送 + {{ $lang('fullGift') }} {{ manjian.mansong }} - 包邮 + {{ $lang('freeShipping') }} {{ manjian.free_shipping }} - + @@ -393,7 +393,7 @@ - 商品留言 + {{ $lang('productMessage') }} @@ -414,7 +414,7 @@ - + @@ -520,11 +520,11 @@ - 可在手机端拨打 021-51815181 + {{ $lang('dialOnMobile', { phone: '021-51815181' }) }} - - + + @@ -588,7 +588,7 @@ export default { data: '021-51815181', success: () => { uni.showToast({ - title: '复制成功', + title: this.$lang('copySuccess'), icon: 'success' }); this.closeContactPopup(); diff --git a/pages_order/_components/common-payment/common-payment.vue b/pages_order/_components/common-payment/common-payment.vue index d1eeffd..7a71b05 100644 --- a/pages_order/_components/common-payment/common-payment.vue +++ b/pages_order/_components/common-payment/common-payment.vue @@ -4,7 +4,7 @@ - 确认订单 + {{ $lang('payment.title') }} @@ -18,14 +18,14 @@ - 购买虚拟类商品需填写手机号,方便商家与您联系 + {{ $lang('payment.virtual.tips') }} - 手机号码 - + {{ $lang('payment.virtual.mobile') }} + @@ -54,7 +54,7 @@ - 请设置收货地址 + {{ $lang('payment.address.setAddress') }} @@ -67,18 +67,18 @@ - 由 + {{ $lang('payment.localDelivery.providedBy') }} {{ storeInfo.store_name }} - 提供配送 + {{ $lang('payment.localDelivery.deliveredBy') }} - 点击切换 + {{ $lang('payment.localDelivery.switchStore') }} - 您的附近没有可配送的门店,请选择其他配送方式 + {{ $lang('payment.localDelivery.noStoreNearby') }} @@ -97,16 +97,16 @@ - 送达时间 + {{ $lang('payment.address.deliveryTime') }} - {{ deliveryTime ? deliveryTime : '请选择送达时间' }} + {{ deliveryTime ? deliveryTime : $lang('payment.address.selectDeliveryTime') }} - 请设置收货地址 + {{ $lang('payment.address.setAddress') }} @@ -125,7 +125,7 @@ {{ storeInfo.store_name }} - 营业时间:{{ storeInfo.open_date }} + {{ $lang('payment.store.businessHours') }}{{ storeInfo.open_date }} {{ storeInfo.full_address }} {{ storeInfo.address }} @@ -135,25 +135,25 @@ - 姓名 + {{ $lang('payment.store.name') }} - 预留手机 - + {{ $lang('payment.store.reservedMobile') }} + - 提货时间 + {{ $lang('payment.store.pickupTime') }} {{ deliveryTime }} - 当前无自提门店,请选择其它配送方式 + {{ $lang('payment.store.noPickupStore') }} @@ -189,7 +189,7 @@ goodsItem.support_trade_type.indexOf(orderCreateData.delivery.delivery_type) == -1 "> - 该商品不支持{{ orderCreateData.delivery.delivery_type_name }} + {{ $lang('payment.goods.notSupportDeliveryType', { deliveryType: orderCreateData.delivery.delivery_type_name }) }} @@ -224,22 +224,22 @@ - 买家留言 + {{ $lang('payment.orderMoney.buyerMessage') }} {{ orderCreateData.buyer_message[calculateGoodsData.merch_id] }} - 无留言 + {{ $lang('payment.orderMoney.noMessage') }} - 优惠券 + {{ $lang('payment.orderMoney.coupon') }} - 不使用优惠券 + {{ $lang('payment.orderMoney.noCoupon') }} @@ -247,8 +247,8 @@ - 共{{ calculateGoodsData.goods_num }}件 - 小计: + {{ $lang('payment.orderMoney.totalItems', { count: calculateGoodsData.goods_num }) }} + {{ $lang('payment.orderMoney.subtotal') }} {{ $lang('common.currencySymbol') }} {{ calculateGoodsData.goods_money | moneyFormat }} @@ -312,10 +312,10 @@ - 开通{{ paymentData.recommend_member_card.level_name }} - 本单预计可省 + {{ $lang('payment.memberCard.activate') }}{{ paymentData.recommend_member_card.level_name }} + {{ $lang('payment.memberCard.expectedSave') }} {{ paymentData.recommend_member_card.discount_money | moneyFormat }} - 元 + {{ $lang('payment.memberCard.yuan') }} @@ -332,14 +332,14 @@