feat: 新增多语言文案、优化导航及工具函数,修复部分业务逻辑

1. 新增多语言资源文件,覆盖文章、预约日期、会员信息、优惠券、表单、购物车、积分商城、分销、AI聊天等多个模块
2. 优化底部导航组件,使用多语言配置替代硬编码文案
3. 重构工具函数,新增从后端数据提取多语言文案的工具方法
4. 修复邀请好友页面的保存提示文案,替换为多语言版本
5. 修复商品SKU组件的提示文案,使用多语言配置
6. 重构AI聊天页面的帮助文档和回复模板,使用多语言配置
7. 优化空状态组件,支持多语言默认文案
8. 修复跳转逻辑,补全参数传递
9. 新增本地开发环境配置
This commit is contained in:
2026-06-25 18:15:31 +08:00
parent ca4e7fd170
commit 2d8846c64c
82 changed files with 3497 additions and 1062 deletions

View File

@@ -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' });
}
}
}

View File

@@ -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) : ''

View File

@@ -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
*/

View File

@@ -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});
}
},
/**

View File

@@ -91,12 +91,12 @@
<!-- 查看更多(仅非滚动模式显示) -->
<view class="view-more" v-if="viewMore.support && viewMore.control && list.length > 0"
:style="viewMoreStyle" @tap.stop="toListPage">
<text>{{ viewMore.text || '查看更多' }}</text>
<text>{{ viewMore.text || $lang('components-diy.diy-article.viewMore') }}</text>
<uni-icons type="arrowright" size="12" :color="viewMore.color" />
</view>
</template>
<view v-if="list.length === 0 && !loading" class="empty-placeholder">
<text class="empty-text">暂无相关文章</text>
<text class="empty-text">{{ $lang('components-diy.diy-article.noArticles') }}</text>
</view>
</view>
</view>
@@ -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 || {});
},
// 阅读区样式(文字色 + 图标大小 + 文字大小)

View File

@@ -28,12 +28,12 @@
<view class="label"
v-if="(tabBarList.type == 1 || tabBarList.type == 3) && tabBarList.theme == 'diy'"
:style="{ color: verify(item.link) ? tabBarList.textHoverColor : tabBarList.textColor }">
{{ currentLang == 'en-us' ? item.en_text : item.text }}
{{ $langConfig.getField(item, 'text') }}
</view>
<view class="label"
v-if="(tabBarList.type == 1 || tabBarList.type == 3) && tabBarList.theme == 'default'"
:style="{ color: verify(item.link) ? 'var(--base-color)' : '#333333' }">
{{ currentLang == 'en-us' ? item.en_text : item.text }}
{{ $langConfig.getField(item, 'text') }}
</view>
</view>
</view>

View File

@@ -26,16 +26,16 @@
</view>
<view class="coupon-num" :style="{ color: value.moneyColor }" v-else>
<text class="coupon-size">{{ item.discount | moneyConduct }}</text>
<text class="font-size-tag coupon-sign">折</text>
<text class="font-size-tag coupon-sign">{{ $lang('components-diy.diyCoupon.discount') }}</text>
</view>
<view class="coupon-type font-size-tag" :style="{ color: value.limitColor }">
{{ 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') }}
</view>
</view>
<view class="coupon-get" :style="couponBtnStyle" v-if="item.useState == 0">
{{ value.btnStyle.text }}
</view>
<view class="coupon-get" :style="couponBtnStyle" v-if="parseInt(item.useState)">去使用</view>
<view class="coupon-get" :style="couponBtnStyle" v-if="parseInt(item.useState)">{{ $lang('components-diy.diyCoupon.goUse') }}</view>
</view>
</swiper-item>
@@ -61,16 +61,16 @@
</view>
<view class="coupon-num" :style="{ color: value.moneyColor }" v-else>
<text class="coupon-size">{{ item.discount | moneyConduct }}</text>
<text class="font-size-tag coupon-sign">折</text>
<text class="font-size-tag coupon-sign">{{ $lang('components-diy.diyCoupon.discount') }}</text>
</view>
<view class="coupon-type font-size-tag" :style="{ color: value.limitColor }">
{{ 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') }}
</view>
</view>
<view class="coupon-get" :style="couponBtnStyle" v-if="item.useState == 0">
{{ value.btnStyle.text || '领取' }}
{{ value.btnStyle.text || $lang('components-diy.diyCoupon.claim') }}
</view>
<view class="coupon-get use" :style="couponBtnStyle" v-if="parseInt(item.useState)">去使用
<view class="coupon-get use" :style="couponBtnStyle" v-if="parseInt(item.useState)">{{ $lang('components-diy.diyCoupon.goUse') }}
</view>
</view>
</swiper-item>
@@ -95,20 +95,19 @@
</view>
<view class="coupon-num" :style="{ color: value.moneyColor }" v-else>
<text class="coupon-size">{{ item.discount | moneyConduct }}</text>
<text class="font-size-tag coupon-sign">折</text>
<text class="font-size-tag coupon-sign">{{ $lang('components-diy.diyCoupon.discount') }}</text>
</view>
<view class="coupon-type font-size-tag">
<text :style="{ color: value.limitColor }">{{ item.at_least > 0 ? '满' +
Number(item.at_least) + '元可用' : '无门槛优惠券' }}</text>
<view class="item-text" v-if="item.goods_type == 1">所有商品可用</view>
<view class="item-text" v-else-if="item.goods_type == 2">指定商品可用</view>
<view class="item-text" v-else-if="item.goods_type == 3">指定商品不可用</view>
<text :style="{ color: value.limitColor }">{{ item.at_least > 0 ? $lang('components-diy.diyCoupon.minSpendAvailable', { amount: Number(item.at_least) }) : $lang('components-diy.diyCoupon.noThresholdCoupon') }}</text>
<view class="item-text" v-if="item.goods_type == 1">{{ $lang('components-diy.diyCoupon.allProductsAvailable') }}</view>
<view class="item-text" v-else-if="item.goods_type == 2">{{ $lang('components-diy.diyCoupon.specifiedProductsAvailable') }}</view>
<view class="item-text" v-else-if="item.goods_type == 3">{{ $lang('components-diy.diyCoupon.specifiedProductsUnavailable') }}</view>
</view>
<view class="coupon-get" :style="couponBtnStyle" v-if="item.useState == 0">
{{ value.btnStyle.text || '领取' }}
{{ value.btnStyle.text || $lang('components-diy.diyCoupon.claim') }}
</view>
<view class="coupon-get" :style="couponBtnStyle" v-if="parseInt(item.useState)">去使用</view>
<view class="coupon-get" :style="couponBtnStyle" v-if="parseInt(item.useState)">{{ $lang('components-diy.diyCoupon.goUse') }}</view>
</view>
</swiper-item>
</swiper>
@@ -133,16 +132,16 @@
</view>
<view class="coupon-num" :style="{ color: value.moneyColor }" v-else>
<text class="coupon-size">{{ item.discount | moneyConduct }}</text>
<text class="font-size-tag coupon-sign">折</text>
<text class="font-size-tag coupon-sign">{{ $lang('components-diy.diyCoupon.discount') }}</text>
</view>
<view class="coupon-type font-size-tag" :style="{ color: value.limitColor }">
{{ 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') }}
</view>
</view>
<view class="coupon-get" :style="couponBtnStyle" v-if="item.useState == 0">
{{ value.btnStyle.text || '立即使用' }}
{{ value.btnStyle.text || $lang('components-diy.diyCoupon.useNow') }}
</view>
<view class="coupon-get" :style="couponBtnStyle" v-if="parseInt(item.useState)">去使用</view>
<view class="coupon-get" :style="couponBtnStyle" v-if="parseInt(item.useState)">{{ $lang('components-diy.diyCoupon.goUse') }}</view>
</view>
</swiper-item>
</swiper>
@@ -160,11 +159,11 @@
<view class="coupon-num" v-if="item.discount == '0.00'"
:style="{ color: value.moneyColor }">
<text class="coupon-size">{{ item.money | moneyConduct }}</text>
<text class="font-size-tag coupon-sign">元</text>
<text class="font-size-tag coupon-sign">{{ $lang('components-diy.diyCoupon.yuan') }}</text>
</view>
<view class="coupon-num" v-else :style="{ color: value.moneyColor }">
<text class="coupon-size">{{ item.discount | moneyConduct }}</text>
<text class="font-size-tag coupon-sign">折</text>
<text class="font-size-tag coupon-sign">{{ $lang('components-diy.diyCoupon.discount') }}</text>
</view>
</view>
<view class="coupon-line"></view>
@@ -173,14 +172,14 @@
<view class="coupon-name" :style="{ color: value.nameColor }">{{
item.coupon_name }}</view>
<text class="coupon-least" :style="{ color: value.limitColor }"
v-if="item.at_least > 0">满{{ Number(item.at_least) }}元可用</text>
v-if="item.at_least > 0">{{ $lang('components-diy.diyCoupon.minSpendAvailable', { amount: Number(item.at_least) }) }}</text>
<text class="coupon-least" :style="{ color: value.limitColor }"
v-else>无门槛优惠券</text>
v-else>{{ $lang('components-diy.diyCoupon.noThresholdCoupon') }}</text>
</view>
<view class="coupon-get" :style="couponBtnStyle" v-if="item.useState == 0">{{
value.btnStyle.text || '立即领取' }}</view>
value.btnStyle.text || $lang('components-diy.diyCoupon.claimNow') }}</view>
<view class="coupon-get" :style="couponBtnStyle" v-if="parseInt(item.useState)">
去使用</view>
{{ $lang('components-diy.diyCoupon.goUse') }}</view>
</view>
</view>
</view>
@@ -204,9 +203,9 @@
<view class="price-wrap">
<text class="price" :style="{ color: value.moneyColor }">{{ (item.discount == '0.00'
? item.money : item.discount) | moneyConduct }}</text>
<text class="unit">{{ item.discount == '0.00' ? '元' : '折' }}</text>
<text class="unit">{{ item.discount == '0.00' ? $lang('components-diy.diyCoupon.yuan') : $lang('components-diy.diyCoupon.discount') }}</text>
</view>
<text class="text">优惠券</text>
<text class="text">{{ $lang('components-diy.diyCoupon.coupon') }}</text>
</view>
<text class="btn" v-if="item.useState == 0" :style="{
color: value.btnStyle.textColor,
@@ -222,11 +221,11 @@
borderTopLeftRadius: value.btnStyle.aroundRadius * 2 + 'rpx',
borderBottomLeftRadius: value.btnStyle.aroundRadius * 2 + 'rpx'
}">
<text class="btn-content">去使用</text>
<text class="btn-content">{{ $lang('components-diy.diyCoupon.goUse') }}</text>
</text>
<text class="limit" :style="{ color: value.limitColor }"
v-if="parseFloat(item.at_least) > 0">满{{ item.at_least | moneyConduct }}元使用</text>
<text class="limit" :style="{ color: value.limitColor }" v-else>无门槛使用</text>
v-if="parseFloat(item.at_least) > 0">{{ $lang('components-diy.diyCoupon.minSpendUse', { amount: item.at_least | moneyConduct }) }}</text>
<text class="limit" :style="{ color: value.limitColor }" v-else>{{ $lang('components-diy.diyCoupon.noThresholdUse') }}</text>
</view>
<div v-if="computedCouponList.length <= 2" @tap.stop="$util.redirectTo('/pages_goods/category')"
@@ -238,9 +237,9 @@
}">
<div class="coupon-content" :style="{ color: value.moneyColor }">
<span class="price">+</span>
<span class="text">暂无优惠券</span>
<span class="text">{{ $lang('components-diy.diyCoupon.noCoupons') }}</span>
</div>
<span class="limit" :style="{ color: value.limitColor }">去逛逛</span>
<span class="limit" :style="{ color: value.limitColor }">{{ $lang('components-diy.diyCoupon.goBrowse') }}</span>
</div>
</swiper-item>
</swiper>
@@ -257,25 +256,24 @@
<view class="coupon-num" v-if="item.discount == '0.00'"
:style="{ color: value.moneyColor }">
<text class="coupon-size">{{ item.money | moneyConduct }}</text>
<text class="font-size-tag coupon-sign">元</text>
<text class="font-size-tag coupon-sign">{{ $lang('components-diy.diyCoupon.yuan') }}</text>
</view>
<view class="coupon-num" v-else :style="{ color: value.moneyColor }">
<text class="coupon-size">{{ item.discount | moneyConduct }}</text>
<text class="font-size-tag coupon-sign">折</text>
<text class="font-size-tag coupon-sign">{{ $lang('components-diy.diyCoupon.discount') }}</text>
</view>
</view>
<view class="coupon-type">
<text class="coupon-name" :style="{ color: value.limitColor }"
v-if="item.at_least > 0">满{{ Number(item.at_least) }}元可用</text>
<text class="coupon-name" :style="{ color: value.limitColor }" v-else>无门槛优惠券</text>
<view class="coupon-least" :style="{ color: value.limitColor }">有效期至{{
$util.timeStampTurnTime(item.end_time, 'yearmonthday') }}</view>
v-if="item.at_least > 0">{{ $lang('components-diy.diyCoupon.minSpendAvailable', { amount: Number(item.at_least) }) }}</text>
<text class="coupon-name" :style="{ color: value.limitColor }" v-else>{{ $lang('components-diy.diyCoupon.noThresholdCoupon') }}</text>
<view class="coupon-least" :style="{ color: value.limitColor }">{{ $lang('components-diy.diyCoupon.validUntil', { date: $util.timeStampTurnTime(item.end_time, 'yearmonthday') }) }}</view>
</view>
<view class="coupon-line"></view>
<view class="coupon-get" :style="couponBtnStyle" v-if="item.useState == 0">
{{ value.btnStyle.text || '立即领取' }}
{{ value.btnStyle.text || $lang('components-diy.diyCoupon.claimNow') }}
</view>
<view class="coupon-get" :style="couponBtnStyle" v-if="parseInt(item.useState)">去使用
<view class="coupon-get" :style="couponBtnStyle" v-if="parseInt(item.useState)">{{ $lang('components-diy.diyCoupon.goUse') }}
</view>
</view>
</view>
@@ -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) {

View File

@@ -12,7 +12,7 @@
<!-- #ifdef MP -->
<block
v-if="(memberInfo.nickname.indexOf('u_') != -1 && memberInfo.nickname == memberInfo.username) || memberInfo.nickname == memberInfo.mobile">
<view class="nickname"><text class="name" @tap.stop="getWxAuth">点击授权头像昵称</text></view>
<view class="nickname"><text class="name" @tap.stop="getWxAuth">{{ $lang('components-diy.diyMemberInfo.clickToAuthorizeAvatarNickname') }}</text></view>
</block>
<view class="nickname" v-else>
<text class="name" @tap.stop="getWxAuth">{{ memberInfo.nickname }}</text>
@@ -36,7 +36,7 @@
<!-- #ifdef H5 -->
<block
v-if="$util.isWeiXin() && ((memberInfo.nickname.indexOf('u_') != -1 && memberInfo.nickname == memberInfo.username) || memberInfo.nickname == memberInfo.mobile)">
<view class="nickname"><text class="name" @tap.stop="getWxAuth">点击获取微信头像</text></view>
<view class="nickname"><text class="name" @tap.stop="getWxAuth">{{ $lang('components-diy.diyMemberInfo.clickToGetWechatAvatar') }}</text></view>
</block>
<view class="nickname" v-else>
<text class="name" @tap.stop="redirect('/pages_tool/member/info')">{{ memberInfo.nickname
@@ -194,13 +194,13 @@
<uni-popup ref="completeInfoPopup" type="bottom" :maskClick="false">
<view class="complete-info-wrap">
<view class="head">
<text class="title">获取您的昵称、头像</text>
<text class="color-tip tips">获取用户头像、昵称完善个人资料,主要用于向用户提供具有辨识度的用户中心界面</text>
<text class="title">{{ $lang('components-diy.diyMemberInfo.completeInfoTitle') }}</text>
<text class="color-tip tips">{{ $lang('components-diy.diyMemberInfo.completeInfoTip') }}</text>
<text class="iconfont icon-close color-tip" @tap.stop="cancelCompleteInfo"></text>
</view>
<!-- #ifdef MP-WEIXIN -->
<view class="item-wrap">
<text class="label">头像</text>
<text class="label">{{ $lang('components-diy.diyMemberInfo.avatarLabel') }}</text>
<button open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<image :src="avatarUrl ? avatarUrl : $util.getDefaultImage().head"
@error="avatarUrl = $util.getDefaultImage().head" mode="aspectFill" show-menu-by-longpress/>
@@ -208,13 +208,13 @@
</button>
</view>
<view class="item-wrap">
<text class="label">昵称</text>
<input type="nickname" placeholder="请输入昵称" v-model="nickName" @blur="blurNickName" />
<text class="label">{{ $lang('components-diy.diyMemberInfo.nicknameLabel') }}</text>
<input type="nickname" :placeholder="$lang('components-diy.diyMemberInfo.nicknamePlaceholder')" v-model="nickName" @blur="blurNickName" />
</view>
<!-- #endif -->
<!-- #ifdef MP-ALIPAY -->
<view class="item-wrap">
<text class="label">头像</text>
<text class="label">{{ $lang('components-diy.diyMemberInfo.avatarLabel') }}</text>
<button open-type="getAuthorize" scope="userInfo" @getAuthorize="aliappGetUserinfo"
:plain="true" class="border-0">
<image :src="avatarUrl ? avatarUrl : $util.getDefaultImage().head"
@@ -223,11 +223,11 @@
</button>
</view>
<view class="item-wrap">
<text class="label">昵称</text>
<input type="nickname" placeholder="请输入昵称" v-model="nickName" @blur="blurNickName" />
<text class="label">{{ $lang('components-diy.diyMemberInfo.nicknameLabel') }}</text>
<input type="nickname" :placeholder="$lang('components-diy.diyMemberInfo.nicknamePlaceholder')" v-model="nickName" @blur="blurNickName" />
</view>
<!-- #endif -->
<button type="default" class="save-btn" @tap.stop="saveCompleteInfo" :disabled="isDisabled">保存</button>
<button type="default" class="save-btn" @tap.stop="saveCompleteInfo" :disabled="isDisabled">{{ $lang('components-diy.diyMemberInfo.save') }}</button>
</view>
</uni-popup>
</view>
@@ -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')
});
}
})

View File

@@ -96,11 +96,47 @@ export default {
};
},
created() {
if (this.value.mode == 'custom-rubik-cube') {
this.value.diyHtml = this.value.diyHtml.replace(/&quot;/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(/&quot;/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 = [];

View File

@@ -1,9 +1,9 @@
<template>
<view class="empty" :class="{ fixed: fixed }">
<view class="empty_img"><image :src="$util.img('public/uniapp/common/common-empty.png')" mode="aspectFit" show-menu-by-longpress></image></view>
<view class="color-tip margin-top title" :style="{ color: textColor + ' !important' }">{{ text }}</view>
<view class="color-tip margin-bottom font-size-sub">{{ subText }}</view>
<button type="primary" size="mini" class="button mini" @click="goIndex()" v-if="isIndex">{{ emptyBtn.text }}</button>
<view class="color-tip margin-top title" :style="{ color: textColor + ' !important' }">{{ displayText }}</view>
<view class="color-tip margin-bottom font-size-sub">{{ displaySubText }}</view>
<button type="primary" size="mini" class="button mini" @click="goIndex()" v-if="isIndex">{{ displayBtnText }}</button>
</view>
</template>
@@ -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) {

View File

@@ -13,10 +13,10 @@
goodsDetail.en_goods_name : goodsDetail.goods_name) }}</view>
<view class="other-info">
<view class="stock color-tip" v-if="goodsDetail.stock_show">
库存{{ goodsDetail.stock }}{{ goodsDetail.unit }}</view>
<view class="starting-num" v-if="parseFloat(goodsDetail.min_buy)">
起售{{ goodsDetail.min_buy }}件
</view>
{{ $lang('goods.detail.stock') }}{{ goodsDetail.stock }}{{ goodsDetail.unit }}</view>
<view class="starting-num" v-if="parseFloat(goodsDetail.min_buy)">
{{ $lang('goods.detail.startingNum', { num: goodsDetail.min_buy }) }}
</view>
</view>
</view>
</view>
@@ -43,7 +43,7 @@
<view class="footer">
<view class="sku-name font-size-goods-tag">
<template v-if="goodsDetail.sku_spec_format" class="color-tip">
已选择:
{{ $lang('goods.detail.selected') }}
<text class="color-tip" v-for="(item, index) in goodsDetail.sku_spec_format"
:key="index">{{ item.spec_value_name }}</text>
</template>
@@ -72,8 +72,8 @@
<view v-else-if="number == 0 && isLoad">
<view class="num-action">
<button type="primary" v-if="goodsDetail.stock && goodsDetail.stock != 0"
@click="confirm($event)">加入购物车</button>
<button type="primary" disabled="true" v-else>确定</button>
@click="confirm($event)">{{ $lang('goods.detail.joinCart') }}</button>
<button type="primary" disabled="true" v-else>{{ $lang('goods.detail.confirmBtn') }}</button>
<view class="click-event"></view>
</view>
</view>
@@ -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;

View File

@@ -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');

View File

@@ -26,18 +26,18 @@
</block>
</view>
<view class="stock" v-if="goodsDetail.stock_show">
库存{{ goodsDetail.stock }}{{ goodsDetail.unit }}</view>
{{ $lang('goods.detail.stock') }}{{ goodsDetail.stock }}{{ goodsDetail.unit }}</view>
</block>
<block v-else>
<view class="price-wrap">
<view class="price font-size-toolbar">{{ goodsDetail.name }}</view>
</view>
<view class="stock" style="height: auto;">
积分:
{{ $lang('goods.detail.pointLabel') }}
<text class="price-color">{{ goodsDetail.point }}</text>
</view>
<view class="stock">
库存:
{{ $lang('goods.detail.stockLabel') }}
<text class="color-base-text">{{ goodsDetail.stock }}{{ goodsDetail.unit }}</text>
</view>
</block>
@@ -48,13 +48,13 @@
<text class="price price-style large">{{ parseFloat(goodsDetail.presale_deposit).toFixed(2).split('.')[0] }}</text>
<text class="unit price-style small">.{{ parseFloat(goodsDetail.presale_deposit).toFixed(2).split('.')[1] }}</text>
<view class="balance" v-if="balance > 0">
<text>尾款</text>
<text>{{ $lang('goods.detail.balanceLabel') }}</text>
<text class="unit price-color font-size-tag price-font">¥</text>
<text class="price-color price-font">{{ balance }}</text>
</view>
</view>
<view class="stock presale-stock">
<block v-if="goodsDetail.stock_show">库存{{ goodsDetail.stock }}{{ goodsDetail.unit }}
<block v-if="goodsDetail.stock_show">{{ $lang('goods.detail.stock') }}{{ goodsDetail.stock }}{{ goodsDetail.unit }}
</block>
</view>
</block>
@@ -117,11 +117,11 @@
<text class="unit price-style small" v-else>.{{ parseFloat(goodsDetail.price).toFixed(2).split('.')[1] }}</text>
</block>
</view>
<view class="stock" v-if="goodsDetail.stock_show">库存{{ goodsDetail.stock }}{{ goodsDetail.unit }}</view>
<view class="stock" v-if="goodsDetail.stock_show">{{ $lang('goods.detail.stock') }}{{ goodsDetail.stock }}{{ goodsDetail.unit }}</view>
</block>
<view class="sku-name font-size-tag" v-if="goodsDetail.sku_spec_format">
<text class="color-tip">已选规格:</text>
<text class="color-tip">{{ $lang('goods.detail.selectedSpec') }}</text>
<text v-for="(item, index) in goodsDetail.sku_spec_format" :key="index" class="spec-value">{{ item.spec_value_name }}</text>
</view>
</view>
@@ -135,13 +135,13 @@
<view class="sku-list-wrap" v-if="type == 'pintuan' && goodsDetail.pintuan_type == 'ladder' && !goodsDetail.group_id">
<text class="title font-size-base">&nbsp;</text>
<view class="items" :class="{ selected: pintuan_num_field == 'pintuan_num' }" @click="pintuanChange('pintuan_num')">
<text>{{ goodsDetail.pintuan_num }}人团</text>
<text>{{ $lang('goods.detail.groupOfNum', { num: goodsDetail.pintuan_num }) }}</text>
</view>
<view class="items" v-if="goodsDetail.pintuan_num_2 > 0" :class="{ selected: pintuan_num_field == 'pintuan_num_2' }" @click="pintuanChange('pintuan_num_2')">
<text>{{ goodsDetail.pintuan_num_2 }}人团</text>
<text>{{ $lang('goods.detail.groupOfNum', { num: goodsDetail.pintuan_num_2 }) }}</text>
</view>
<view class="items" v-if="goodsDetail.pintuan_num_3 > 0" :class="{ selected: pintuan_num_field == 'pintuan_num_3' }" @click="pintuanChange('pintuan_num_3')">
<text>{{ goodsDetail.pintuan_num_3 }}人团</text>
<text>{{ $lang('goods.detail.groupOfNum', { num: goodsDetail.pintuan_num_3 }) }}</text>
</view>
</view>
@@ -158,14 +158,14 @@
<view class="number-wrap">
<view class="number-line">
<text class="title font-size-base" v-if="type == 'point'">兑换数量</text>
<text class="title font-size-base" v-else>购买数量</text>
<text class="limit-txt color-base-text" v-if="limitNumber > 0">(每人限购{{ limitNumber }}{{ goodsDetail.unit }})</text>
<text class="title font-size-base" v-if="type == 'point'">{{ $lang('goods.detail.exchangeCount') }}</text>
<text class="title font-size-base" v-else>{{ $lang('goods.detail.buyCount') }}</text>
<text class="limit-txt color-base-text" v-if="limitNumber > 0">({{ $lang('goods.detail.limitPerPerson', { count: limitNumber, unit: goodsDetail.unit }) }})</text>
<text v-if="maxBuy > 0 && minBuy > 1" class="limit-txt color-base-text">
({{ minBuy }}{{ goodsDetail.unit }}起售,限购{{ maxBuy }}{{ goodsDetail.unit }})
({{ $lang('goods.detail.limitBuyRange', { minBuy: minBuy, maxBuy: maxBuy, unit: goodsDetail.unit }) }})
</text>
<text v-else-if="maxBuy > 0" class="limit-txt color-base-text">(限购{{ maxBuy }}{{ goodsDetail.unit }})</text>
<text v-else-if="minBuy > 1" class="limit-txt color-base-text">({{ minBuy }}{{ goodsDetail.unit }}起售)</text>
<text v-else-if="maxBuy > 0" class="limit-txt color-base-text">({{ $lang('goods.detail.limitBuyMax', { maxBuy: maxBuy, unit: goodsDetail.unit }) }})</text>
<text v-else-if="minBuy > 1" class="limit-txt color-base-text">({{ $lang('goods.detail.minBuyStart', { minBuy: minBuy, unit: goodsDetail.unit }) }})</text>
<view class="number">
<button type="default" class="decrease color-line-border" :class="{ disabled: decreaseDisabled }" @click="changeNum('-')">-</button>
<input type="number" class="uni-input color-line-border font-size-goods-tag" @blur="blur" v-model="number" placeholder="0" @input="keyInput(false)" />
@@ -178,34 +178,34 @@
</scroll-view>
</view>
<view class="footer" @click="confirm()">
<button type="primary" v-if="goodsDetail.stock && goodsDetail.stock != 0 && goodsDetail.is_virtual == 0 && type == 'buy_now'" :style="{ background: themeStyle.goods_detail.goods_btn_color_shallow, color : '#fff' }" @click.stop="confirm(true)">加入购物车</button>
<button type="primary" v-if="goodsDetail.stock && goodsDetail.stock != 0 && goodsDetail.is_virtual == 0 && type == 'buy_now'" :style="{ background: themeStyle.goods_detail.goods_btn_color_shallow, color : '#fff' }" @click.stop="confirm(true)">{{ $lang('goods.detail.joinCart') }}</button>
<block v-if="type == 'point'">
<block v-if="goodsDetail.type == 1">
<!-- 兑换商品 -->
<button v-if="goodsDetail.stock && goodsDetail.stock != 0" type="primary">兑换</button>
<button type="primary" v-else disabled="true">库存不足</button>
<button v-if="goodsDetail.stock && goodsDetail.stock != 0" type="primary">{{ $lang('goods.detail.exchangeBtn') }}</button>
<button type="primary" v-else disabled="true">{{ $lang('goods.detail.stockInsufficient') }}</button>
</block>
<block v-else-if="goodsDetail.type == 2 || goodsDetail.type == 3">
<!-- 兑换优惠券、红包 -->
<button type="primary">兑换</button>
<button type="primary">{{ $lang('goods.detail.exchangeBtn') }}</button>
</block>
</block>
<block v-else-if="goodsDetail.goods_state == 1">
<button type="primary" v-if="goodsDetail.stock && goodsDetail.stock != 0 && type == 'join_cart'">加入购物车</button>
<button type="primary" v-else-if="goodsDetail.stock && goodsDetail.stock != 0 && type == 'buy_now'">立即购买</button>
<button type="primary" v-else-if="goodsDetail.stock && goodsDetail.stock != 0 && type == 'confirm'">确认</button>
<button type="primary" v-if="goodsDetail.stock && goodsDetail.stock != 0 && type == 'join_cart'">{{ $lang('goods.detail.joinCart') }}</button>
<button type="primary" v-else-if="goodsDetail.stock && goodsDetail.stock != 0 && type == 'buy_now'">{{ $lang('goods.detail.buynow') }}</button>
<button type="primary" v-else-if="goodsDetail.stock && goodsDetail.stock != 0 && type == 'confirm'">{{ $lang('goods.detail.confirmBtn') }}</button>
<template v-else-if="goodsDetail.stock && goodsDetail.stock != 0">
<template v-if="goodsDetail.buy_num">
<button type="primary" v-if="goodsDetail.buy_num <= goodsDetail.stock">立即抢购</button>
<button type="primary" v-else disabled="true">库存不足</button>
<button type="primary" v-if="goodsDetail.buy_num <= goodsDetail.stock">{{ $lang('goods.detail.rushBuy') }}</button>
<button type="primary" v-else disabled="true">{{ $lang('goods.detail.stockInsufficient') }}</button>
</template>
<template v-else>
<button type="primary">立即抢购</button>
<button type="primary">{{ $lang('goods.detail.rushBuy') }}</button>
</template>
</template>
<button type="primary" v-else disabled="true">库存不足</button>
<button type="primary" v-else disabled="true">{{ $lang('goods.detail.stockInsufficient') }}</button>
</block>
<button type="primary" v-else disabled="true">该商品已下架</button>
<button type="primary" v-else disabled="true">{{ $lang('goods.detail.offShelves') }}</button>
</view>
</view>
</uni-popup-sku>
@@ -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;

View File

@@ -7,35 +7,35 @@
<!-- #ifdef H5 -->
<template v-if="forceBindingMobileControl">
<view class="head">
<text class="title">检测到您还未绑定手机号</text>
<text class="color-tip tips">为了方便您接收订单等信息,需要绑定手机号</text>
<text class="title">{{ $lang('components.ns-login.bindMobileTitle') }}</text>
<text class="color-tip tips">{{ $lang('components.ns-login.bindMobileTip') }}</text>
<text class="iconfont icon-close color-tip" @click="cancelCompleteInfo"></text>
</view>
<view class="item-wrap">
<text class="label">手机号</text>
<input type="number" placeholder="请输入手机号" v-model="formData.mobile" maxlength="11" />
<text class="label">{{ $lang('components.ns-login.mobileLabel') }}</text>
<input type="number" :placeholder="$lang('components.ns-login.mobilePlaceholder')" v-model="formData.mobile" maxlength="11" />
</view>
<view class="item-wrap" v-if="isOpenCaptcha">
<text class="label">验证码</text>
<input type="number" placeholder="请输入验证码" v-model="formData.vercode" maxlength="4" />
<text class="label">{{ $lang('components.ns-login.captchaLabel') }}</text>
<input type="number" :placeholder="$lang('components.ns-login.captchaPlaceholder')" v-model="formData.vercode" maxlength="4" />
<image :src="captcha.img" class="captcha" @click="getCaptcha" show-menu-by-longpress></image>
</view>
<view class="item-wrap">
<text class="label">动态码</text>
<input type="number" placeholder="请输入动态码" v-model="formData.dynacode" maxlength="4" />
<text class="label">{{ $lang('components.ns-login.dynacodeLabel') }}</text>
<input type="number" :placeholder="$lang('components.ns-login.dynacodePlaceholder')" v-model="formData.dynacode" maxlength="4" />
<view class="send color-base-text" @click="sendMobileCode">{{ dynacodeData.codeText }}
</view>
</view>
</template>
<button type="default" class="save-btn" @click="saveH5" :disabled="isDisabled">保存</button>
<button type="default" class="save-btn" @click="saveH5" :disabled="isDisabled">{{ $lang('components.ns-login.save') }}</button>
<!-- #endif -->
<!-- #ifdef MP -->
<view class="head">
<text class="title">欢迎来到 {{ site_name }}</text>
<text class="title">{{ $lang('components.ns-login.welcomeTitle', { siteName: site_name }) }}</text>
<text class="color-tip tips">
<template>{{ forceBindingMobileControl ? '使用手机号登录,' : '注册登录,' }}</template>
获得订单、售后等服务。
<template>{{ forceBindingMobileControl ? $lang('components.ns-login.loginWithMobile') : $lang('components.ns-login.registerLogin') }}</template>
{{ $lang('components.ns-login.getServicesTip') }}
</text>
<text class="iconfont icon-close color-tip" @click="cancelCompleteInfo"></text>
</view>
@@ -46,11 +46,11 @@
:class="isAgree ? 'icon-fuxuankuang1 color-base-text' : 'icon-fuxuankuang2'"
@click="isAgree = !isAgree"></view>
<view style="text-align: left; margin-left: 10rpx; padding-top: 2rpx; font-size: 28rpx;">
我同意
{{ $lang('components.ns-login.agree') }}
<text style="color: #4395ff;"
@click="tourl('/pages_tool/agreement/contenr?type=0')">《隐私条款》</text>
@click="tourl('/pages_tool/agreement/contenr?type=0')">{{ $lang('components.ns-login.privacyPolicy') }}</text>
<text style="color: #4395ff;"
@click="tourl('/pages_tool/agreement/contenr?type=1')">《用户服务协议》</text>
@click="tourl('/pages_tool/agreement/contenr?type=1')">{{ $lang('components.ns-login.userServiceAgreement') }}</text>
</view>
</view>
@@ -58,25 +58,25 @@
<block v-if="isAgree">
<button class="auth-login save-btn border-0" style="border: none;" open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber">
<text style="color: #fff; font-size: 30rpx;">同意隐私协议并授权手机号</text>
<text style="color: #fff; font-size: 30rpx;">{{ $lang('components.ns-login.agreeAndAuthorizeMobile') }}</text>
</button>
</block>
<block v-else>
<button class="auth-login save-btn border-0" style="border: none;" @click="authno">
<text style="color: #fff; font-size: 30rpx;">授权手机号码</text>
<text style="color: #fff; font-size: 30rpx;">{{ $lang('components.ns-login.authorizeMobile') }}</text>
</button>
</block>
<view @click="closeLogin"
style="font-size: 30rpx; color: #888; text-align: center; padding-top: 10rpx;">
暂不登录
{{ $lang('components.ns-login.notNow') }}
</view>
<!-- 昵称和头像模式 -->
<template v-if="enableNickAndAvatar">
<!-- #ifdef MP-WEIXIN -->
<view class="item-wrap">
<text class="label">头像</text>
<text class="label">{{ $lang('components.ns-login.avatarLabel') }}</text>
<button open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<image :src="avatarUrl ? avatarUrl : $util.getDefaultImage().head"
@error="avatarUrl = $util.getDefaultImage().head" mode="aspectFill" show-menu-by-longpress/>
@@ -84,15 +84,15 @@
</button>
</view>
<view class="item-wrap">
<text class="label">昵称</text>
<input type="nickname" placeholder="请输入昵称" v-model="nickName" @blur="blurNickName"
<text class="label">{{ $lang('components.ns-login.nicknameLabel') }}</text>
<input type="nickname" :placeholder="$lang('components.ns-login.nicknamePlaceholder')" v-model="nickName" @blur="blurNickName"
maxlength="50" />
</view>
<!-- #endif -->
<!-- #ifdef MP-ALIPAY -->
<view class="item-wrap">
<text class="label">头像</text>
<text class="label">{{ $lang('components.ns-login.avatarLabel') }}</text>
<button open-type="getAuthorize" scope="userInfo" @getAuthorize="aliappGetUserinfo"
:plain="true" class="border-0">
<image :src="avatarUrl ? avatarUrl : $util.getDefaultImage().head"
@@ -101,21 +101,21 @@
</button>
</view>
<view class="item-wrap">
<text class="label">昵称</text>
<input type="nickname" placeholder="请输入昵称" v-model="nickName" @blur="blurNickName"
<text class="label">{{ $lang('components.ns-login.nicknameLabel') }}</text>
<input type="nickname" :placeholder="$lang('components.ns-login.nicknamePlaceholder')" v-model="nickName" @blur="blurNickName"
maxlength="50" />
</view>
<!-- #endif -->
<view class="item-wrap" v-if="forceBindingMobileControl">
<text class="label">手机号</text>
<text class="label">{{ $lang('components.ns-login.mobileLabel') }}</text>
<button open-type="getPhoneNumber" :plain="true" class="auth-login border-0"
@getphonenumber="getPhoneNumber">
<text class="mobile" v-if="formData.mobile">{{ formData.mobile }}</text>
<text class="color-base-text" v-else>获取手机号</text>
<text class="color-base-text" v-else>{{ $lang('components.ns-login.getMobile') }}</text>
</button>
</view>
<button type="default" class="save-btn" @click="saveMp" :disabled="isDisabled">保存</button>
<button type="default" class="save-btn" @click="saveMp" :disabled="isDisabled">{{ $lang('components.ns-login.save') }}</button>
</template>
<!-- #endif -->
</view>
@@ -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')
});
}
})

View File

@@ -11,7 +11,7 @@
<view :class="['box', 'align-left']" :style="item._boxAlignStyle">
<input
type="text"
:placeholder="item.value.placeholder || '请输入提示语'"
:placeholder="item.value.placeholder || $lang('components.ns-newform.inputPlaceholder')"
placeholder-class="placeholder color-tip"
v-model="item.val"
/>
@@ -28,7 +28,7 @@
</view>
<view :class="['box', 'align-left']" :style="item._boxAlignStyle">
<textarea
:placeholder="item.value.placeholder || '请输入提示语'"
:placeholder="item.value.placeholder || $lang('components.ns-newform.inputPlaceholder')"
placeholder-class="placeholder color-tip"
v-model="item.val"
></textarea>
@@ -50,7 +50,7 @@
</view>
<view :class="['box', 'box-flex', 'align-right']">
<text v-if="item.val != ''">{{ item.val }}</text>
<text v-else class="color-tip">{{ item.value.placeholder || '请选择' }}</text>
<text v-else class="color-tip">{{ item.value.placeholder || $lang('components.ns-newform.selectPlaceholder') }}</text>
<text class="iconfont icon-right"></text>
</view>
</view>
@@ -146,7 +146,7 @@
@change="bindDateChange($event, index)"
>
<view :class="['uni-input', !item.val ? 'color-tip' : '']">
{{ item.val ? item.val : (item.value.placeholder || '请选择日期') }}
{{ item.val ? item.val : (item.value.placeholder || $lang('components.ns-newform.datePlaceholder')) }}
</view>
</picker>
<text class="iconfont icon-right"></text>
@@ -170,7 +170,7 @@
>
<view class="picker-box">
<view :class="['uni-input', !item.start_date ? 'color-tip' : '']">
{{ 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')) }}
</view>
</view>
</picker>
@@ -184,7 +184,7 @@
>
<view class="picker-box">
<view :class="['uni-input', !item.end_date ? 'color-tip' : '']">
{{ 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')) }}
</view>
</view>
</picker>
@@ -207,7 +207,7 @@
@change="bindTimeChange($event, index)"
>
<view :class="['uni-input', !item.val ? 'color-tip' : '']">
{{ item.val ? item.val : (item.value.placeholder || '请选择时间') }}
{{ item.val ? item.val : (item.value.placeholder || $lang('components.ns-newform.timePlaceholder')) }}
</view>
</picker>
<text class="iconfont icon-right"></text>
@@ -231,7 +231,7 @@
>
<view class="picker-box">
<view :class="['uni-input', !item.start_time ? 'color-tip' : '']">
{{ 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')) }}
</view>
</view>
</picker>
@@ -245,7 +245,7 @@
>
<view class="picker-box">
<view :class="['uni-input', !item.end_time ? 'color-tip' : '']">
{{ 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')) }}
</view>
</view>
</picker>
@@ -268,7 +268,7 @@
@getRegions="handleGetRegions($event, index)"
>
<view :class="['select-address', !item.val ? 'empty' : '', !item.val ? 'color-tip' : '']">
{{ 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'))) }}
</view>
</pick-regions>
<text class="iconfont icon-right"></text>
@@ -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;
}

View File

@@ -20,7 +20,7 @@
</scroll-view>
<div class="appointed-day">
<uni-datetime-picker type="date" :start="pickerStartDay" :end="pickerEndDay" @change="change">
<text class="day-box">指定日期</text>
<text class="day-box">{{ $lang('components.yuyueDate.appointedDate') }}</text>
<text class="iconfont iconyoujiantou"></text>
</uni-datetime-picker>
</div>
@@ -46,7 +46,7 @@
<view class="item-box" :class="{ disable: item.disable || item.isInclude, active: item.time == timeQuanBegin || item.time == timeQuanEnd }" @click="handleSelectQuantum(_index, item)">
<!-- :style="{ color: item.time == timeQuanBegin || item.time == timeQuanEnd ? selectedItemColor : '#333' }" -->
<text>{{ item.time }}</text>
<text class="all">{{ item.disable ? disableText : undisableText }}</text>
<text class="all">{{ item.disable ? disableTextI18n : undisableTextI18n }}</text>
</view>
</view>
</block>
@@ -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;

View File

@@ -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',

View File

@@ -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',

View File

@@ -0,0 +1,4 @@
export const lang = {
viewMore: 'View More',
noArticles: 'No articles found',
}

View File

@@ -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',
}

View File

@@ -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',
}

View File

@@ -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',
}
}

View File

@@ -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',
}
}

View File

@@ -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',
}
}

View File

@@ -1,5 +1,55 @@
export const lang = {
//title为每个页面的标题
// title: 'Distributor Application'
title: ''
}
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',
}

View File

@@ -1,5 +1,70 @@
export const lang = {
//title为每个页面的标题
// title: 'Distribution Center',
title: ''
}
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',
}

View File

@@ -1,5 +1,49 @@
export const lang = {
//title为每个页面的标题
// title: 'Distributor Level',
title: ''
}
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}',
}

View File

@@ -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'
}
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})'
}

View File

@@ -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',
}

View File

@@ -1,4 +1,57 @@
export const lang = {
//title为每个页面的标题
title: 'Membership Card'
}
//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?',
}

View File

@@ -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"
}

View File

@@ -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"
}

View File

@@ -1,3 +1,56 @@
export const lang = {
// title is the page title
title: 'Invite Friends',
}
// 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',
}

View File

@@ -1,4 +1,108 @@
export const lang = {
//title为每个页面的标题
title: 'Order Details'
}
//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!'
}
}

View File

@@ -1,4 +1,151 @@
export const lang = {
//title为每个页面的标题
title: 'Pending Payment Order'
}
//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'
}
}

View File

@@ -1,4 +1,72 @@
export const lang = {
//title为每个页面的标题
//title is the page title
title: 'Refund Details',
}
// ====== 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'
}
}

View File

@@ -1,4 +1,45 @@
export const lang = {
//title为每个页面的标题
title: 'Exchange'
}
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'
}

View File

@@ -1,4 +1,57 @@
export const lang = {
//title为每个页面的标题
title: 'Point Mall'
}
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'
}

View File

@@ -1,4 +1,63 @@
export const lang = {
//title为每个页面的标题
title: 'Pending Payment Orders'
}
//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'
}
}

View File

@@ -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: '从相册选择',

View File

@@ -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: '去登录',

View File

@@ -0,0 +1,4 @@
export const lang = {
viewMore: '查看更多',
noArticles: '暂无相关文章',
}

View File

@@ -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: '领取成功',
}

View File

@@ -0,0 +1,22 @@
export const lang = {
// 授权提示文本
clickToAuthorizeAvatarNickname: '点击授权头像昵称',
clickToGetWechatAvatar: '点击获取微信头像',
// 完善资料弹窗
completeInfoTitle: '获取您的昵称、头像',
completeInfoTip: '获取用户头像、昵称完善个人资料,主要用于向用户提供具有辨识度的用户中心界面',
avatarLabel: '头像',
nicknameLabel: '昵称',
nicknamePlaceholder: '请输入昵称',
save: '保存',
// 弹窗提示
tip: '提示',
bindMobileTip: '使用会员码需先绑定手机号,是否绑定手机号?',
// Toast 提示
pleaseEnterNickname: '请输入昵称',
uploadFailed: '上传失败',
avatarPullFailed: '头像拉取失败',
}

View File

@@ -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: '头像拉取失败',
}
}

View File

@@ -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}张图片',
}
}

View File

@@ -0,0 +1,17 @@
export const lang = {
// ===== yuyue-date 组件 =====
'yuyueDate': {
// 指定日期按钮
appointedDate: '指定日期',
// 时间状态文本
fullyBooked: '已约满',
available: '可预约',
// 选中状态
noSelection: '暂无选择',
// Toast 提示
weekdayCannotBook: '{weekday}不可以预约',
}
}

View File

@@ -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: '请输入正确的手机号',
}

View File

@@ -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: '分销商的直属下级分销商人数',
}

View File

@@ -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}人',
}

View File

@@ -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})'
}

View File

@@ -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: '确定',
}

View File

@@ -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: '您有尚未过期的会员卡,再次购卡会覆盖掉之前的卡,是否继续?',
}

View File

@@ -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: "请输入详细地址"
}

View File

@@ -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: "请输入详细地址"
}

View File

@@ -1,3 +1,56 @@
export const lang = {
// title为每个页面的标题
title: '邀请好友',
}
// 活动头部
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: '保存失败,请稍后重试',
}

View File

@@ -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: '未获取到订单信息!'
}
}

View File

@@ -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: '请选择发票内容'
}
}

View File

@@ -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: '请输入物流单号'
}
}

View File

@@ -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}'
}

View File

@@ -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: '暂无相关活动'
}

View File

@@ -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}起送'
}
}

View File

@@ -5,7 +5,7 @@
:refresher-triggered="refresherTriggered" @refresherrefresh="onRefresh">
<block v-if="hasData">
<view class="cart-header" v-if="cartData.length">
<view class="num-wrap">共{{ cartData[0].cartList.length }}种商品</view>
<view class="num-wrap">{{ $lang('goods.cart.totalKinds', { count: cartData[0].cartList.length }) }}</view>
<view class="cart-action" @click="changeAction">
{{ isAction ? $lang('complete') : $lang('edit') }}
</view>
@@ -13,11 +13,11 @@
<view class="cart-wrap" v-for="(siteItem, siteIndex) in cartData" :key="siteIndex">
<view class="coupon-use-tips" v-if="discount.coupon_info">
<view>
<text class="title color-base-text">优惠券</text>
<text class="desc">领券结算最高可减{{ discount.coupon_info.coupon_money | moneyFormat }}元</text>
<text class="title color-base-text">{{ $lang('goods.cart.coupon') }}</text>
<text class="desc">{{ $lang('goods.cart.couponMaxDiscount', { money: discount.coupon_info.coupon_money | moneyFormat }) }}</text>
</view>
<view class="color-base-text" @click="$refs.couponPopup.open()">
点击{{ discount.coupon_info.receive_type == 'wait' ? '领取' : '查看' }}
{{ discount.coupon_info.receive_type == 'wait' ? $lang('goods.cart.clickToReceive') : $lang('goods.cart.clickToView') }}
<text class="iconfont icon-right"></text>
</view>
</view>
@@ -120,15 +120,14 @@
@limit="goodsLimit($event, { siteIndex, cartIndex })" />
</view>
<view class="discount-wrap" v-if="manjian && manjian['sku_' + item.sku_id]">
<text class="discount-tag">满减</text>
<scroll-view scroll-x="true" class="scroll-view">
<block v-for="(mitem, key) in manjian['sku_' + item.sku_id]" :key="key">
<text v-if="mitem.discount_money">{{ Number(mitem.limit) }}减{{
mitem.discount_money }}</text>
<text class="interval" v-if="mitem.discount_money"></text>
</block>
</scroll-view>
</view>
<text class="discount-tag">{{ $lang('goods.cart.fullReduction') }}</text>
<scroll-view scroll-x="true" class="scroll-view">
<block v-for="(mitem, key) in manjian['sku_' + item.sku_id]" :key="key">
<text v-if="mitem.discount_money">{{ $lang('goods.cart.fullReductionItem', { limit: Number(mitem.limit), discount: mitem.discount_money }) }}</text>
<text class="interval" v-if="mitem.discount_money"></text>
</block>
</scroll-view>
</view>
</view>
</view>
<view class="item-del color-base-bg" :class="{ show: item.edit }"
@@ -140,9 +139,9 @@
<view class="cart-wrap invalid" v-if="invalidGoods.length">
<view class="cart-header">
<view class="num-wrap">
<text class="font-size-base">失效商品{{ invalidGoods.length }}件</text>
<text class="font-size-base">{{ $lang('goods.cart.invalidGoods', { count: invalidGoods.length }) }}</text>
</view>
<view class="cart-action color-base-text" @click="clearInvalidGoods">清空</view>
<view class="cart-action color-base-text" @click="clearInvalidGoods">{{ $lang('goods.cart.clear') }}</view>
</view>
<block v-for="(goodsItem, goodsIndex) in invalidGoods" :key="goodsIndex">
<view class="cart-goods invalid-goods">
@@ -189,7 +188,7 @@
</template>
</text>
</view>
<text class="invalid-mark">已失效</text>
<text class="invalid-mark">{{ $lang('goods.cart.invalid') }}</text>
</view>
</view>
</view>
@@ -199,7 +198,7 @@
</block>
<block v-else>
<view class="cart-empty">
<ns-empty text="购物车为空" subText="赶紧去逛逛, 购买心仪的商品吧" :isIndex="Boolean(storeToken)"
<ns-empty :text="$lang('goods.cart.cartEmpty')" :subText="$lang('goods.cart.cartEmptySubText')" :isIndex="Boolean(storeToken)"
:emptyBtn="{ text: $lang('toGoodsCategoryPage'), url: '/pages_goods/category' }"></ns-empty>
<button type="primary" size="mini" class="button mini" v-if="!storeToken" @click="toLogin">{{
$lang('toLogin')
@@ -218,26 +217,26 @@
<uni-popup ref="discountPopup" custom-class="uni-popup-discount" type="bottom">
<view class="discount-popup popup" v-if="Object.keys(discount).length">
<view class="popup-header">
<text class="tit">优惠明细</text>
<text class="tit">{{ $lang('goods.cart.discountDetail') }}</text>
<text class="iconfont icon-close" @click="toggleDiscountPopup"></text>
</view>
<view class="popup-body" :class="{ 'safe-area': isIphoneX }" @click="toggleDiscountPopup">
<view class="detail-item">
<view class="title">商品总额</view>
<view class="money price-font">¥{{ discount.goods_money | moneyFormat }}</view>
<view class="title">{{ $lang('goods.cart.goodsTotal') }}</view>
<view class="money price-font">{{ $lang('common.currencySymbol') }}{{ discount.goods_money | moneyFormat }}</view>
</view>
<view class="detail-item" v-if="discount.coupon_money > 0">
<view class="title">优惠券</view>
<view class="money price-font reduce">-¥{{ discount.coupon_money | moneyFormat }}</view>
<view class="title">{{ $lang('goods.cart.coupon') }}</view>
<view class="money price-font reduce">-{{ $lang('common.currencySymbol') }}{{ discount.coupon_money | moneyFormat }}</view>
</view>
<view class="detail-item" v-if="discount.promotion_money > 0">
<view class="title">满减</view>
<view class="money reduce price-font">-¥{{ discount.promotion_money | moneyFormat }}
<view class="title">{{ $lang('goods.cart.fullReduction') }}</view>
<view class="money reduce price-font">-{{ $lang('common.currencySymbol') }}{{ discount.promotion_money | moneyFormat }}
</view>
</view>
<view class="detail-item total">
<view class="title">合计</view>
<view class="money price-font ">¥{{ discount.order_money | moneyFormat }}</view>
<view class="title">{{ $lang('total') }}</view>
<view class="money price-font ">{{ $lang('common.currencySymbol') }}{{ discount.order_money | moneyFormat }}</view>
</view>
</view>
<view :style="{ height: tabBarHeight }"></view>
@@ -247,7 +246,7 @@
<uni-popup ref="couponPopup" custom-class="uni-popup-discount" type="bottom" v-if="discount.coupon_info">
<view class="coupon-popup popup">
<view class="popup-header">
<text class="tit">优惠券</text>
<text class="tit">{{ $lang('goods.cart.coupon') }}</text>
<text class="iconfont icon-close" @click="$refs.couponPopup.close()"></text>
</view>
<view class="popup-body" :class="{ 'safe-area': isIphoneX }" @click="$refs.couponPopup.close()">
@@ -264,14 +263,14 @@
</template>
<template v-else-if="discount.coupon_info.type == 'discount'">
<text class="money">{{ parseFloat(discount.coupon_info.discount) }}</text>
<text class="unit">折</text>
<text class="unit">{{ $lang('goods.cart.discountLabel') }}</text>
</template>
<view class="at-least">
<template v-if="discount.coupon_info.at_least > 0">
满{{ discount.coupon_info.at_least }}可用
{{ $lang('goods.cart.minSpend', { amount: discount.coupon_info.at_least }) }}
</template>
<template v-else>
无门槛
{{ $lang('goods.cart.noThreshold') }}
</template>
</view>
</view>
@@ -281,23 +280,23 @@
<view
v-if="discount.coupon_info.type == 'discount' && discount.coupon_info.discount_limit > 0"
class="limit">
最多可抵¥{{ discount.coupon_info.discount_limit }}
{{ $lang('goods.cart.maxDiscount', { symbol: $lang('common.currencySymbol'), limit: discount.coupon_info.discount_limit }) }}
</view>
<view class="time font-size-goods-tag"
v-if="discount.coupon_info.validity_type == 0">
有效期:{{ $util.timeStampTurnTime(discount.coupon_info.end_time) }}
{{ $lang('goods.cart.validityPeriod') }}{{ $util.timeStampTurnTime(discount.coupon_info.end_time) }}
</view>
<view class="time font-size-goods-tag"
v-else-if="discount.coupon_info.validity_type == 1">
有效期:领取之日起{{ discount.coupon_info.fixed_term }}天内有效
{{ $lang('goods.cart.validityPeriod') }}{{ $lang('goods.cart.validFromReceive', { days: discount.coupon_info.fixed_term }) }}
</view>
<view class="time font-size-goods-tag" v-else>有效期:长期有效</view>
<view class="time font-size-goods-tag" v-else>{{ $lang('goods.cart.validityPeriod') }}{{ $lang('goods.cart.longTermValid') }}</view>
</view>
<button type="primary" v-if="discount.coupon_info.receive_type != 'wait'"
disabled>已领取</button>
disabled>{{ $lang('goods.cart.received') }}</button>
<button type="primary" v-else
@click.stop="receiveCoupon(discount.coupon_info.coupon_type_id)">领取</button>
@click.stop="receiveCoupon(discount.coupon_info.coupon_type_id)">{{ $lang('goods.cart.receive') }}</button>
</view>
</view>
</view>
@@ -329,7 +328,7 @@
</block>
</view>
<view class="detail" @click="toggleDiscountPopup" v-if="Object.keys(discount).length">
优惠明细
{{ $lang('goods.cart.discountDetail') }}
<text class="iconfont icon-unfold" :class="{ open: !discountPopupShow }"></text>
</view>
</view>
@@ -338,8 +337,7 @@
</view>
<view class="action-btn" v-else>
<button type="primary" size="mini" class="mini" @click="settlement" v-if="totalCount != 0">
{{ discount.coupon_info && discount.coupon_info.receive_type == 'wait' ? '领券' : '立即' }}结算({{
totalCount }})
{{ discount.coupon_info && discount.coupon_info.receive_type == 'wait' ? $lang('goods.cart.receiveCouponSettle', { count: totalCount }) : $lang('goods.cart.settleImmediately', { count: totalCount }) }}
</button>
<button type="primary" size="mini" class="mini" @click="settlement" disabled v-else>{{
$lang('settlement') }}({{

View File

@@ -14,13 +14,13 @@
<view class="price-info">
<view class="icon-box"><text class="iconfont icon-tutechan"></text></view>
<view class="price-box">
<view class="promotion-text">限时折扣</view>
<view class="sale-num" v-if="goodsSkuDetail.sale_show">已售{{ goodsSkuDetail.sale_num }}{{ goodsSkuDetail.unit }}</view>
<view class="promotion-text">{{ $lang('limitedTimeDiscount') }}</view>
<view class="sale-num" v-if="goodsSkuDetail.sale_show">{{ $lang('sold') }}{{ goodsSkuDetail.sale_num }}{{ goodsSkuDetail.unit }}</view>
</view>
</view>
<view class="countdown">
<view class="txt">距结束仅剩</view>
<view class="txt">{{ $lang('countdownEndsIn') }}</view>
<view class="clockrun">
<uni-count-down
:day="goodsSkuDetail.discountTimeMachine.d"
@@ -52,7 +52,7 @@
<image :src="$util.img('public/uniapp/goods/member_vip.png')" mode="aspectFit" show-menu-by-longpress/>
</view>
<view class="member-price-wrap" v-if="!goodsSkuDetail.market_price_show">
<text class="unit price-font">原价</text>
<text class="unit price-font">{{ $lang('originalPrice') }}</text>
<text class="unit price-font">{{ $lang('common.currencySymbol') }}</text>
<text class="money price-font">{{ goodsSkuDetail.price }}</text>
</view>
@@ -117,7 +117,7 @@
<view class="item">
<view>One {{$lang('commissiontext')}}</view>
<view class="price-color">
<text class="unit">¥</text>
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
<text class="money">{{ parseFloat(goodsSkuDetail.fenxiao_detail.commission_money).toFixed(2).split('.')[0] }}</text>
<text class="unit">.{{ parseFloat(goodsSkuDetail.fenxiao_detail.commission_money).toFixed(2).split('.')[1] }}</text>
</view>
@@ -217,7 +217,7 @@
<view class="group-wrap" @click="openBundlingPopup()">
<view class="goods-cell" @click="openBundlingPopup()">
<view class="box">
<text class="tit">组合套餐</text>
<text class="tit">{{ $lang('comboPackage') }}</text>
<text>{{ bundling[0].bl_name }}</text>
</view>
<text class="iconfont icon-right"></text>
@@ -257,7 +257,7 @@
<uni-popup ref="bundlingPopup" type="bottom">
<view class="bundling-popup-layer popup-layer">
<view class="head-wrap" @click="closeBundlingPopup()">
<text>组合套餐</text>
<text>{{ $lang('comboPackage') }}</text>
<text class="iconfont icon-close"></text>
</view>
<scroll-view scroll-y class="bundling-body">
@@ -297,10 +297,10 @@
</view>
</scroll-view>
<view class="bundling-price-wrap">
<text class="label">套餐价</text>
<text class="label">{{ $lang('comboPrice') }}</text>
<text class="unit price-color">{{ $lang('common.currencySymbol') }}</text>
<text class="price price-color">{{ item.bl_price }}</text>
<button type="primary" size="mini" class="mini" @click="toComoDetail(item.bl_id)">立即购买</button>
<button type="primary" size="mini" class="mini" @click="toComoDetail(item.bl_id)">{{ $lang('buynow') }}</button>
</view>
</view>
</block>
@@ -316,7 +316,7 @@
<uni-popup ref="couponPopup" type="bottom">
<view class="goods-coupon-popup-layer popup-layer">
<view class="head-wrap" @click="closeCouponPopup()">
<text>优惠券</text>
<text>{{ $lang('coupons') }}</text>
<text class="iconfont icon-close"></text>
</view>
<scroll-view class="coupon-body" scroll-y>
@@ -331,33 +331,33 @@
</template>
<template v-else-if="item.type == 'discount'">
<text class="money">{{ parseFloat(item.discount) }}</text>
<text class="unit">折</text>
<text class="unit">{{ $lang('discountOff') }}</text>
</template>
<view class="at-least">
<template v-if="item.at_least > 0">
满{{ item.at_least }}可用
{{ $lang('minSpendAvailable', { amount: item.at_least }) }}
</template>
<template v-else>
无门槛
{{ $lang('noThreshold') }}
</template>
</view>
</view>
</view>
<view class="desc-wrap">
<view class="coupon-name">{{ item.coupon_name }}</view>
<view v-if="item.type == 'discount' && item.discount_limit > 0" class="limit">最多可抵¥{{ item.discount_limit }}</view>
<view class="time font-size-goods-tag" v-if="item.validity_type == 0">有效期:{{ $util.timeStampTurnTime(item.end_time) }}</view>
<view class="time font-size-goods-tag" v-else-if="item.validity_type == 1">有效期:领取之日起{{ item.fixed_term }}天内有效</view>
<view class="time font-size-goods-tag" v-else>有效期:长期有效</view>
<view v-if="item.type == 'discount' && item.discount_limit > 0" class="limit">{{ $lang('maxDiscount', { symbol: $lang('common.currencySymbol'), amount: item.discount_limit }) }}</view>
<view class="time font-size-goods-tag" v-if="item.validity_type == 0">{{ $lang('validUntilDate', { date: $util.timeStampTurnTime(item.end_time) }) }}</view>
<view class="time font-size-goods-tag" v-else-if="item.validity_type == 1">{{ $lang('validForDays', { days: item.fixed_term }) }}</view>
<view class="time font-size-goods-tag" v-else>{{ $lang('validPermanent') }}</view>
</view>
<button type="primary" v-if="item.useState == 2" disabled>已抢光</button>
<button type="primary" v-else-if="item.useState == 1" disabled>已领取</button>
<button type="primary" v-else @click="receiveCoupon(item)">领取</button>
<button type="primary" v-if="item.useState == 2" disabled>{{ $lang('couponSoldOut') }}</button>
<button type="primary" v-else-if="item.useState == 1" disabled>{{ $lang('couponClaimed') }}</button>
<button type="primary" v-else @click="receiveCoupon(item)">{{ $lang('couponReceive') }}</button>
</view>
</view>
</scroll-view>
<view class="button-box"><button type="primary" @click="closeCouponPopup()">确定</button></view>
<view class="button-box"><button type="primary" @click="closeCouponPopup()">{{ $lang('confirm') }}</button></view>
</view>
</uni-popup>
</view>
@@ -367,24 +367,24 @@
<uni-popup ref="manjianPopup" type="bottom">
<view class="manjian-popup-layer popup-layer">
<view class="head-wrap" @click="closeManjianPopup()">
<text>促销</text>
<text>{{ $lang('promotion') }}</text>
<text class="iconfont icon-close"></text>
</view>
<scroll-view scroll-y class="manjian-body">
<view class="item" v-if="manjian.manjian != undefined" style="display: flex;">
<view class="free-tip color-base-text color-base-border">满减</view>
<view class="free-tip color-base-text color-base-border">{{ $lang('fullReduction') }}</view>
<text class="font-size-base">{{ manjian.manjian }}</text>
</view>
<view class="item" v-if="manjian.mansong != undefined">
<text class="free-tip color-base-text color-base-border">满送</text>
<text class="free-tip color-base-text color-base-border">{{ $lang('fullGift') }}</text>
<text class="font-size-base">{{ manjian.mansong }}</text>
</view>
<view class="item" v-if="manjian.free_shipping != undefined" style="display: flex;">
<view class="free-tip color-base-text color-base-border">包邮</view>
<view class="free-tip color-base-text color-base-border">{{ $lang('freeShipping') }}</view>
<text class="font-size-base">{{ manjian.free_shipping }}</text>
</view>
</scroll-view>
<view class="button-box"><button type="primary" @click="closeManjianPopup()">确定</button></view>
<view class="button-box"><button type="primary" @click="closeManjianPopup()">{{ $lang('confirm') }}</button></view>
</view>
</uni-popup>
</view>
@@ -393,7 +393,7 @@
<uni-popup ref="informationPopup" type="bottom">
<view class="manjian-popup-layer popup-layer" :style="{ height: FormHeight }">
<view class="head-wrap" @click="closeinformationPopup()">
<text>商品留言</text>
<text>{{ $lang('productMessage') }}</text>
<text class="iconfont icon-close"></text>
</view>
<scroll-view scroll-y class="manjian-body" >
@@ -414,7 +414,7 @@
<ns-form :data="informationform" ref="form"></ns-form>
</view>
</scroll-view>
<view class="button-box"><button type="primary" @click="saveubfirnation()">确定</button></view>
<view class="button-box"><button type="primary" @click="saveubfirnation()">{{ $lang('confirm') }}</button></view>
</view>
</uni-popup>
<!-- <uni-popup ref="informationPopup" type="bottom" class="sku-layer" @change="popclose">
@@ -463,7 +463,7 @@
<ns-goods-action-button v-if="goodsSkuDetail.isinformation == 1" class="goods-action-button active3" disabled-text="" backgroundColor="#54c952" @click="phoneClick(goodsSkuDetail.goods_mobile)" :text="$lang('make')" :disabled="false" />
<ns-goods-action-button v-if="goodsSkuDetail.isinformation == 2" class="goods-action-button active3" disabled-text="" backgroundColor="#54c952" @click="showinformation" :text="$lang('leave')" :disabled="false" />
<ns-goods-action-button v-if="goodsSkuDetail.isinformation == 3" class="goods-action-button active3" disabled-text="" backgroundColor="#54c952" @click="goToAIChat" text="智能客服" :disabled="false" />
<ns-goods-action-button v-if="goodsSkuDetail.isinformation == 3" class="goods-action-button active3" disabled-text="" backgroundColor="#54c952" @click="goToAIChat" :text="$lang('aiCustomerService')" :disabled="false" />
<!-- <ns-goods-action-button v-if="goodsSkuDetail.isinformation == 2" class="goods-action-button active3" disabled-text="" backgroundColor="#54c952" @click="buyNow" text="商品留言" :disabled="false" /> -->
</block>
@@ -520,11 +520,11 @@
<uni-popup ref="contactPopup" type="center">
<view class="contact-popup">
<view class="contact-content">
<text class="contact-text">可在手机端拨打 021-51815181</text>
<text class="contact-text">{{ $lang('dialOnMobile', { phone: '021-51815181' }) }}</text>
</view>
<view class="contact-buttons">
<button class="contact-btn cancel-btn" @click="closeContactPopup">取消</button>
<button class="contact-btn copy-btn" @click="copyPhoneNumber">复制到剪切板</button>
<button class="contact-btn cancel-btn" @click="closeContactPopup">{{ $lang('cancel') }}</button>
<button class="contact-btn copy-btn" @click="copyPhoneNumber">{{ $lang('copyToClipboard') }}</button>
</view>
</view>
</uni-popup>
@@ -588,7 +588,7 @@ export default {
data: '021-51815181',
success: () => {
uni.showToast({
title: '复制成功',
title: this.$lang('copySuccess'),
icon: 'success'
});
this.closeContactPopup();

View File

@@ -4,7 +4,7 @@
<view class="payment-navbar" :style="{ 'padding-top': menuButtonBounding.top + 'px', height: menuButtonBounding.height + 'px' }">
<view class="nav-wrap">
<text class="iconfont icon-back_light" @click="back"></text>
<view class="navbar-title">确认订单</view>
<view class="navbar-title">{{ $lang('payment.title') }}</view>
</view>
</view>
<view class="payment-navbar-block" :style="{ height: menuButtonBounding.bottom + 'px' }"></view>
@@ -18,14 +18,14 @@
<view class="mobile-wrap">
<view class="tips color-base-text">
<text class="iconfont icongantanhao"></text>
购买虚拟类商品需填写手机号,方便商家与您联系
{{ $lang('payment.virtual.tips') }}
</view>
<view class="form-group">
<text class="icon">
<image :src="$util.img('public/uniapp/order/icon-mobile.png')" mode="widthFix"></image>
</text>
<text class="text">手机号码</text>
<input type="number" maxlength="11" placeholder="请输入您的手机号码" placeholder-class="color-tip placeholder" class="input" v-model="orderCreateData.member_address.mobile" />
<text class="text">{{ $lang('payment.virtual.mobile') }}</text>
<input type="number" maxlength="11" :placeholder="$lang('payment.virtual.mobilePlaceholder')" placeholder-class="color-tip placeholder" class="input" v-model="orderCreateData.member_address.mobile" />
</view>
</view>
</template>
@@ -54,7 +54,7 @@
<text class="cell-more iconfont icon-right"></text>
</view>
<view class="empty-wrap" v-else @click="selectAddress">
<view class="info">请设置收货地址</view>
<view class="info">{{ $lang('payment.address.setAddress') }}</view>
<view class="cell-more">
<view class="iconfont icon-right"></view>
</view>
@@ -67,18 +67,18 @@
<block v-if="storeList && Object.keys(storeList).length > 1">
<view class="local-delivery-store" v-if="storeInfo" @click="openPopup('deliveryPopup')">
<view class="info">
由
{{ $lang('payment.localDelivery.providedBy') }}
<text class="store-name">{{ storeInfo.store_name }}</text>
提供配送
{{ $lang('payment.localDelivery.deliveredBy') }}
</view>
<view class="cell-more">
<text>点击切换</text>
<text>{{ $lang('payment.localDelivery.switchStore') }}</text>
<text class="iconfont icon-right"></text>
</view>
</view>
<view v-else class="local-delivery-store">
<view class="info">
<text class="store-name">您的附近没有可配送的门店,请选择其他配送方式</text>
<text class="store-name">{{ $lang('payment.localDelivery.noStoreNearby') }}</text>
</view>
</view>
</block>
@@ -97,16 +97,16 @@
</view>
<view class="local-box" v-if="calculateGoodsData.config.local && calculateGoodsData.delivery.local.info.time_is_open == 1">
<view class="pick-block" @click="localtime('')">
<view class="title font-size-base">送达时间</view>
<view class="title font-size-base">{{ $lang('payment.address.deliveryTime') }}</view>
<view class="time-picker">
<text :class="{ 'color-tip': !deliveryTime }">{{ deliveryTime ? deliveryTime : '请选择送达时间' }}</text>
<text :class="{ 'color-tip': !deliveryTime }">{{ deliveryTime ? deliveryTime : $lang('payment.address.selectDeliveryTime') }}</text>
<text class="iconfont icon-right cell-more"></text>
</view>
</view>
</view>
</view>
<view class="empty-wrap" v-else @click="selectAddress">
<view class="info">请设置收货地址</view>
<view class="info">{{ $lang('payment.address.setAddress') }}</view>
<view class="cell-more">
<view class="iconfont icon-right"></view>
</view>
@@ -125,7 +125,7 @@
<text>{{ storeInfo.store_name }}</text>
</view>
<view class="store-detail">
<view v-if="storeInfo.open_date">营业时间:{{ storeInfo.open_date }}</view>
<view v-if="storeInfo.open_date">{{ $lang('payment.store.businessHours') }}{{ storeInfo.open_date }}</view>
<view class="address">{{ storeInfo.full_address }} {{ storeInfo.address }}
</view>
</view>
@@ -135,25 +135,25 @@
</view>
<view class="mobile-wrap store-mobile" v-if="orderCreateData.member_address">
<view class="form-group">
<text class="text">姓名</text>
<text class="text">{{ $lang('payment.store.name') }}</text>
<input type="text" placeholder-class="color-tip placeholder" class="input" disabled v-model="orderCreateData.member_address.name" />
</view>
</view>
<view class="mobile-wrap store-mobile" v-if="orderCreateData.member_address">
<view class="form-group">
<text class="text">预留手机</text>
<input type="number" maxlength="11" placeholder="请输入您的手机号码" placeholder-class="color-tip placeholder" class="input" v-model="orderCreateData.member_address.mobile" />
<text class="text">{{ $lang('payment.store.reservedMobile') }}</text>
<input type="number" maxlength="11" :placeholder="$lang('payment.virtual.mobilePlaceholder')" placeholder-class="color-tip placeholder" class="input" v-model="orderCreateData.member_address.mobile" />
</view>
</view>
<view class="store-time" @click="storetime('')">
<view class="left">提货时间</view>
<view class="left">{{ $lang('payment.store.pickupTime') }}</view>
<view class="right">
{{ deliveryTime }}
<text class="iconfont icon-right"></text>
</view>
</view>
</block>
<view v-else class="empty">当前无自提门店,请选择其它配送方式</view>
<view v-else class="empty">{{ $lang('payment.store.noPickupStore') }}</view>
<image class="address-line" :src="$util.img('public/uniapp/order/address-line.png')" show-menu-by-longpress></image>
</view>
</template>
@@ -189,7 +189,7 @@
goodsItem.support_trade_type.indexOf(orderCreateData.delivery.delivery_type) == -1
">
<text class="iconfont icon-gantanhao"></text>
<text>该商品不支持{{ orderCreateData.delivery.delivery_type_name }}</text>
<text>{{ $lang('payment.goods.notSupportDeliveryType', { deliveryType: orderCreateData.delivery.delivery_type_name }) }}</text>
</view>
</block>
<view class="error-tips" v-if="goodsItem.error && goodsItem.error.message">
@@ -224,22 +224,22 @@
<view class="order-money" style="margin: 0;">
<view class="order-cell">
<text class="tit">买家留言</text>
<text class="tit">{{ $lang('payment.orderMoney.buyerMessage') }}</text>
<view class="box text-overflow " @click="openPopup('buyerMessagePopup')">
<text v-if="orderCreateData.buyer_message">{{ orderCreateData.buyer_message[calculateGoodsData.merch_id] }}</text>
<text class="color-sub" v-else>无留言</text>
<text class="color-sub" v-else>{{ $lang('payment.orderMoney.noMessage') }}</text>
</view>
<text class="iconfont icon-right"></text>
</view>
<view class="order-cell coupon" v-if="modules.indexOf('coupon') != -1">
<text class="tit">优惠券</text>
<text class="tit">{{ $lang('payment.orderMoney.coupon') }}</text>
<view class="box text-overflow"@click="openSiteCoupon(calculateGoodsData.merch_id)">
<template v-if="orderCreateData.coupon[calculateGoodsData.merch_id].coupon_id">
<text class="money price-font" style="max-width: 100%;">已选择1张优惠券</text>
<text class="money price-font" style="max-width: 100%;">{{ $lang('payment.orderMoney.couponSelected', { count: 1 }) }}</text>
<!-- <text class="unit price-font">优惠</text>
<text class="money price-font">{{ (calculateData && calculateData.coupon_money ? calculateData.coupon_money : 0) | moneyFormat }}</text> -->
</template>
<text v-else>不使用优惠券</text>
<text v-else>{{ $lang('payment.orderMoney.noCoupon') }}</text>
</view>
<text class="iconfont icon-right"></text>
</view>
@@ -247,8 +247,8 @@
<view class="site-wrap buyer-message">
<view class="order-cell">
<view class="box shop-item">
<text class="color-tip goods-num">共{{ calculateGoodsData.goods_num }}件</text>
<text class="font-size-base">小计:</text>
<text class="color-tip goods-num">{{ $lang('payment.orderMoney.totalItems', { count: calculateGoodsData.goods_num }) }}</text>
<text class="font-size-base">{{ $lang('payment.orderMoney.subtotal') }}</text>
<text class="color-base-text unit">{{ $lang('common.currencySymbol') }}</text>
<text class="color-base-text money">{{ calculateGoodsData.goods_money | moneyFormat }}</text>
</view>
@@ -312,10 +312,10 @@
<view class="head" @click="selectMemberCard">
<text class="iconfont icon-huiyuan"></text>
<view class="info">
开通{{ paymentData.recommend_member_card.level_name }}
<text>本单预计可省</text>
{{ $lang('payment.memberCard.activate') }}{{ paymentData.recommend_member_card.level_name }}
<text>{{ $lang('payment.memberCard.expectedSave') }}</text>
<text class="price-color">{{ paymentData.recommend_member_card.discount_money | moneyFormat }}</text>
<text>元</text>
<text>{{ $lang('payment.memberCard.yuan') }}</text>
</view>
<text class="iconfont" :class="orderCreateData.is_open_card == 1 ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'"></text>
</view>
@@ -332,14 +332,14 @@
<template v-if="calculateData">
<view class="order-money">
<view class="order-cell">
<text class="tit">商品金额</text>
<text class="tit">{{ $lang('payment.orderMoney.goodsAmount') }}</text>
<view class="box">
<text class="unit color-title price-font">{{ $lang('common.currencySymbol') }}</text>
<text class="money color-title price-font">{{ calculateData.goods_money | moneyFormat }}</text>
</view>
</view>
<view class="order-cell" v-if="calculateData.is_virtual == 0 && calculateData.delivery_money > 0">
<text class="tit">运费</text>
<text class="tit">{{ $lang('payment.orderMoney.shippingFee') }}</text>
<view class="box color-base-text">
<text class="operator">+</text>
<text class="unit price-font">{{ $lang('common.currencySymbol') }}</text>
@@ -366,7 +366,7 @@
</view>
</view> -->
<view class="order-cell" v-if="calculateData.promotion_money > 0">
<text class="tit">优惠</text>
<text class="tit">{{ $lang('payment.orderMoney.discount') }}</text>
<view class="box color-base-text">
<text class="operator">-</text>
<text class="unit price-font">{{ $lang('common.currencySymbol') }}</text>
@@ -374,7 +374,7 @@
</view>
</view>
<view class="order-cell" v-if="calculateData.coupon_money">
<text class="tit">优惠券</text>
<text class="tit">{{ $lang('payment.orderMoney.coupon') }}</text>
<view class="box color-base-text">
<text class="operator">-</text>
<text class="unit price-font">{{ $lang('common.currencySymbol') }}</text>
@@ -382,7 +382,7 @@
</view>
</view>
<view class="order-cell" v-if="calculateData.point_money > 0">
<text class="tit">积分抵扣</text>
<text class="tit">{{ $lang('payment.orderMoney.pointsDeduction') }}</text>
<view class="box color-base-text">
<text class="operator">-</text>
<text class="unit price-font">{{ $lang('common.currencySymbol') }}</text>
@@ -400,18 +400,18 @@
</view> -->
</view>
<view v-if="transactionAgreement.title && transactionAgreement.content" class="agreement">购买前请先阅读<text @click="$refs.agreementPopup.open()">《{{ transactionAgreement.title }}》</text>,下单即代表同意该协议</view>
<view v-if="transactionAgreement.title && transactionAgreement.content" class="agreement">{{ $lang('payment.agreement.tipPrefix') }}<text @click="$refs.agreementPopup.open()">《{{ transactionAgreement.title }}》</text>{{ $lang('payment.agreement.tipSuffix') }}</view>
<view class="order-submit bottom-safe-area">
<view class="order-settlement-info">
<text class="font-size-base color-tip margin-right">共{{ calculateData.goods_num }}件</text>
<text class="font-size-base">合计:</text>
<text class="font-size-base color-tip margin-right">{{ $lang('payment.settlement.totalItems', { count: calculateData.goods_num }) }}</text>
<text class="font-size-base">{{ $lang('payment.settlement.total') }}</text>
<text class=" unit price-font">{{ $lang('common.currencySymbol') }}</text>
<text class=" money price-font">{{ parseFloat(calculateData.pay_money).toFixed(2).split('.')[0] }}</text>
<text class=" unit price-font">.{{ parseFloat(calculateData.pay_money).toFixed(2).split('.')[1] }}</text>
</view>
<view class="submit-btn">
<button type="primary" class="mini" size="mini" @click="create()" v-if="!surplusStartMoney()">提交订单</button>
<button type="primary" class="mini" size="mini" @click="create()" v-if="!surplusStartMoney()">{{ $lang('payment.settlement.submitOrder') }}</button>
<!-- <button v-else class="no-submit mini" size="mini">差{{ surplusStartMoney() | moneyFormat }}起送</button> -->
</view>
</view>
@@ -425,7 +425,7 @@
<uni-popup ref="promotionPopup" type="bottom" v-if="promotionInfo">
<view class="promotion-popup popup">
<view class="popup-header">
<text class="tit">活动优惠</text>
<text class="tit">{{ $lang('payment.promotionPopup.title') }}</text>
<text class="iconfont icon-close" @click="closePopup('promotionPopup')"></text>
</view>
<scroll-view scroll-y="true" class="popup-body" :class="{ 'safe-area': isIphoneX }">
@@ -440,7 +440,7 @@
</view>
</scroll-view>
<view class="popup-footer" :class="{ 'bottom-safe-area': isIphoneX }">
<view class="confirm-btn color-base-bg" @click="closePopup('promotionPopup')">确定</view>
<view class="confirm-btn color-base-bg" @click="closePopup('promotionPopup')">{{ $lang('payment.promotionPopup.confirm') }}</view>
</view>
</view>
</uni-popup>
@@ -449,7 +449,7 @@
<uni-popup ref="deliveryPopup" type="bottom">
<view class="delivery-popup popup">
<view class="popup-header">
<text class="tit">已为您甄选出附近所有相关门店</text>
<text class="tit">{{ $lang('payment.storePopup.title') }}</text>
<text class="iconfont icon-close" @click="closePopup('deliveryPopup')"></text>
</view>
<view class="popup-body store-popup" :class="{ 'safe-area': isIphoneX }">
@@ -465,8 +465,8 @@
<text v-if="item.distance">({{ item.distance }}km)</text>
</view>
<view class="info">
<view :class="item.store_id == orderCreateData.delivery.store_id ? 'color-base-text' : ''" class="font-size-goods-tag">营业时间:{{ item.open_date }}</view>
<view :class="item.store_id == orderCreateData.delivery.store_id ? 'color-base-text' : ''" class="font-size-goods-tag">地址:{{ item.full_address }}{{ item.address }}</view>
<view :class="item.store_id == orderCreateData.delivery.store_id ? 'color-base-text' : ''" class="font-size-goods-tag">{{ $lang('payment.storePopup.businessHours') }}{{ item.open_date }}</view>
<view :class="item.store_id == orderCreateData.delivery.store_id ? 'color-base-text' : ''" class="font-size-goods-tag">{{ $lang('payment.storePopup.address') }}{{ item.full_address }}{{ item.address }}</view>
</view>
</view>
<view class="icon" v-if="item.store_id == orderCreateData.delivery.store_id">
@@ -475,7 +475,7 @@
</view>
</block>
<view v-else class="empty-wrap">
<ns-empty text="所选择收货地址附近没有可以自提的门店" :isIndex="false"></ns-empty>
<ns-empty :text="$lang('payment.storePopup.noStoreNearby')" :isIndex="false"></ns-empty>
</view>
</view>
@@ -490,20 +490,20 @@
<uni-popup ref="buyerMessagePopup" type="bottom">
<view style="height: auto;" class="buyermessag-popup popup" @touchmove.prevent.stop>
<view class="popup-header">
<text class="tit">买家留言</text>
<text class="tit">{{ $lang('payment.buyerMessagePopup.title') }}</text>
<text class="iconfont icon-close" @click="closePopup('buyerMessagePopup')"></text>
</view>
<scroll-view scroll-y="true" class="popup-body" :class="{ 'safe-area': isIphoneX }">
<view>
<view class="buyermessag-cell">
<view class="buyermessag-form-group">
<textarea type="text" maxlength="100" placeholder="留言前建议先与商家协调一致" placeholder-class="color-tip" v-model="orderCreateData.buyer_message"/>
<textarea type="text" maxlength="100" :placeholder="$lang('payment.buyerMessagePopup.placeholder')" placeholder-class="color-tip" v-model="orderCreateData.buyer_message"/>
</view>
</view>
</view>
</scroll-view>
<view class="popup-footer" @click="saveBuyerMessage" :class="{ 'bottom-safe-area': isIphoneX }">
<view class="confirm-btn color-base-bg">确定</view>
<view class="confirm-btn color-base-bg">{{ $lang('payment.buyerMessagePopup.confirm') }}</view>
</view>
</view>
</uni-popup>
@@ -512,7 +512,7 @@
<uni-popup ref="couponPopup" type="bottom" :mask-click="false">
<view class="coupon-popup popup" @touchmove.prevent.stop>
<view class="popup-header">
<text class="tit">优惠券</text>
<text class="tit">{{ $lang('payment.couponPopup.title') }}</text>
<text class="iconfont icon-close" @click="closePopup('couponPopup')"></text>
</view>
@@ -533,32 +533,32 @@
</template>
<template v-else-if="couponItem.type == 'discount'">
<text class="money">{{ parseFloat(couponItem.discount) }}</text>
<text class="unit">折</text>
<text class="unit">{{ $lang('payment.couponPopup.discount') }}</text>
</template>
<view class="at-least">
<template v-if="couponItem.at_least > 0">
满{{ couponItem.at_least }}可用
{{ $lang('payment.couponPopup.minSpend', { amount: couponItem.at_least }) }}
</template>
<template v-else>
无门槛
{{ $lang('payment.couponPopup.noThreshold') }}
</template>
</view>
</view>
</view>
<view class="desc-wrap">
<view class="coupon-name">{{ couponItem.coupon_name }}</view>
<view v-if="couponItem.type == 'discount' && couponItem.discount_limit > 0" class="limit">最多可抵¥{{ couponItem.discount_limit }}</view>
<view class="time font-size-goods-tag">有效期:{{ couponItem.end_time ? $util.timeStampTurnTime(couponItem.end_time) : '长期有效' }}</view>
<view v-if="couponItem.type == 'discount' && couponItem.discount_limit > 0" class="limit">{{ $lang('payment.couponPopup.maxDiscount', { amount: couponItem.discount_limit }) }}</view>
<view class="time font-size-goods-tag">{{ $lang('payment.couponPopup.validPeriod') }}{{ couponItem.end_time ? $util.timeStampTurnTime(couponItem.end_time) : $lang('payment.couponPopup.permanentValid') }}</view>
</view>
<view class="iconfont" :class="selectCouponId == couponItem.coupon_id ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'"></view>
</view>
</view>
</view>
<view v-else class="coupon-empty">暂无可用的优惠券</view>
<view v-else class="coupon-empty">{{ $lang('payment.couponPopup.noAvailableCoupon') }}</view>
</scroll-view>
<view class="popup-footer" :class="{ 'bottom-safe-area': isIphoneX }">
<view class="confirm-btn color-base-bg" @click="useCpopon">确定</view>
<view class="confirm-btn color-base-bg" @click="useCpopon">{{ $lang('payment.couponPopup.confirm') }}</view>
</view>
</view>
</uni-popup>
@@ -584,14 +584,14 @@
<uni-popup ref="editFormPopup" type="bottom">
<view style="height: auto;" class="form-popup popup" @touchmove.prevent.stop>
<view class="popup-header">
<text class="tit">买家信息</text>
<text class="tit">{{ $lang('payment.formPopup.title') }}</text>
<text class="iconfont icon-close" @click="$refs.editFormPopup.close()"></text>
</view>
<scroll-view scroll-y="true" class="popup-body" :class="{ 'safe-area': isIphoneX }">
<ns-form v-if="tempFormData" :data="tempFormData.json_data" ref="tempForm"></ns-form>
</scroll-view>
<view class="popup-footer" @click="saveForm" :class="{ 'bottom-safe-area': isIphoneX }">
<view class="confirm-btn color-base-bg">确定</view>
<view class="confirm-btn color-base-bg">{{ $lang('payment.formPopup.confirm') }}</view>
</view>
</view>
</uni-popup>
@@ -599,7 +599,7 @@
<uni-popup ref="memberGoodsCardPopup" type="bottom">
<view class="member-card-popup popup" @touchmove.prevent.stop>
<view class="popup-header">
<text class="tit">选择次卡</text>
<text class="tit">{{ $lang('payment.memberCardPopup.title') }}</text>
<text class="iconfont icon-close" @click="$refs.memberGoodsCardPopup.close()"></text>
</view>
<scroll-view scroll-y="true" class="popup-body" :class="{ 'safe-area': isIphoneX }">
@@ -607,18 +607,18 @@
<view class="content">
<view class="title">{{ isEnEnv ? item.en_goods_name : item.goods_name }}</view>
<view class="info">
<text v-if="item.card_type == 'timecard'">不限次数</text>
<text v-if="item.card_type == 'oncecard'">剩余{{ item.num - item.use_num }}次</text>
<text v-if="item.card_type == 'commoncard'">剩余{{ item.total_num - item.total_use_num }}次</text>
<text v-if="item.card_type == 'timecard'">{{ $lang('payment.memberCardPopup.unlimited') }}</text>
<text v-if="item.card_type == 'oncecard'">{{ $lang('payment.memberCardPopup.remaining', { count: item.num - item.use_num }) }}</text>
<text v-if="item.card_type == 'commoncard'">{{ $lang('payment.memberCardPopup.remaining', { count: item.total_num - item.total_use_num }) }}</text>
<text>|</text>
<text>{{ item.end_time ? $util.timeStampTurnTime(item.end_time) : '长期有效' }}</text>
<text>{{ item.end_time ? $util.timeStampTurnTime(item.end_time) : $lang('payment.memberCardPopup.permanentValid') }}</text>
</view>
</view>
<view class="iconfont" :class="selectGoodsCard.itemId == item.item_id ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'"></view>
</view>
</scroll-view>
<view class="popup-footer" @click="saveMemberGoodsCard" :class="{ 'bottom-safe-area': isIphoneX }">
<view class="confirm-btn color-base-bg">确定</view>
<view class="confirm-btn color-base-bg">{{ $lang('payment.memberCardPopup.confirm') }}</view>
</view>
</view>
</uni-popup>

View File

@@ -131,32 +131,32 @@ export default {
charge_rule_arr.push({
'key': key,
'value': charge_rule[key],
'title': '周卡',
unit: '周'
'title': this.$lang('payment.memberCard.weekCard'),
unit: this.$lang('payment.memberCard.week')
});
break;
case 'month':
charge_rule_arr.push({
'key': key,
'value': charge_rule[key],
'title': '月卡',
unit: '月'
'title': this.$lang('payment.memberCard.monthCard'),
unit: this.$lang('payment.memberCard.month')
});
break;
case 'quarter':
charge_rule_arr.push({
'key': key,
'value': charge_rule[key],
'title': '季卡',
unit: '季'
'title': this.$lang('payment.memberCard.quarterCard'),
unit: this.$lang('payment.memberCard.quarter')
});
break;
case 'year':
charge_rule_arr.push({
'key': key,
'value': charge_rule[key],
'title': '年卡',
unit: '年'
'title': this.$lang('payment.memberCard.yearCard'),
unit: this.$lang('payment.memberCard.year')
});
break;
}
@@ -484,20 +484,20 @@ export default {
if (this.paymentData.is_virtual == 1) {
if (!this.orderCreateData.member_address.mobile) {
this.$util.showToast({
title: '请输入预留手机'
title: this.$lang('payment.toast.enterReservedMobile')
});
return false;
}
if (!this.$util.verifyMobile(this.orderCreateData.member_address.mobile)) {
this.$util.showToast({
title: '请输入正确的手机号'
title: this.$lang('payment.toast.enterValidMobile')
});
return false;
}
} else {
if (!this.orderCreateData.delivery || !this.orderCreateData.delivery.delivery_type) {
this.$util.showToast({
title: '商家未设置配送方式'
title: this.$lang('payment.toast.noDeliveryMethod')
});
return false;
}
@@ -506,7 +506,7 @@ export default {
(this.orderCreateData.delivery.delivery_type == 'local' && !this.localMemberAddress)
) {
this.$util.showToast({
title: '请先选择您的收货地址'
title: this.$lang('payment.toast.selectAddressFirst')
});
return false;
}
@@ -514,25 +514,25 @@ export default {
if (this.orderCreateData.delivery.delivery_type == 'store') {
if (!this.orderCreateData.delivery.store_id) {
this.$util.showToast({
title: '没有可提货的门店,请选择其他配送方式'
title: this.$lang('payment.toast.noPickupStore')
});
return false;
}
if (!this.orderCreateData.member_address.mobile) {
this.$util.showToast({
title: '请输入预留手机'
title: this.$lang('payment.toast.enterReservedMobile')
});
return false;
}
if (!this.$util.verifyMobile(this.orderCreateData.member_address.mobile)) {
this.$util.showToast({
title: '请输入正确的手机号'
title: this.$lang('payment.toast.enterValidMobile')
});
return false;
}
if (!this.deliveryTime) {
this.$util.showToast({
title: '请选择提货时间'
title: this.$lang('payment.toast.selectPickupTime')
});
return false;
}
@@ -541,13 +541,13 @@ export default {
if (this.orderCreateData.delivery.delivery_type == 'local') {
if (!this.orderCreateData.delivery.store_id) {
this.$util.showToast({
title: '没有可配送的门店,请选择其他配送方式'
title: this.$lang('payment.toast.noDeliveryStore')
});
return false;
}
if (this.calculateGoodsData.config.local.is_use && this.calculateGoodsData.delivery.local.info.time_is_open == 1 && !this.deliveryTime) {
this.$util.showToast({
title: '请选择送达时间'
title: this.$lang('payment.toast.selectDeliveryTime')
});
return false;
}
@@ -837,25 +837,25 @@ export default {
invoiceVerify() {
if (!this.orderCreateData.invoice_title) {
this.$util.showToast({
title: '请填写发票抬头'
title: this.$lang('payment.toast.enterInvoiceTitle')
});
return false;
}
if (!this.orderCreateData.taxpayer_number && this.orderCreateData.invoice_title_type == 2) {
this.$util.showToast({
title: '请填写纳税人识别号'
title: this.$lang('payment.toast.enterTaxpayerNumber')
});
return false;
}
if (this.orderCreateData.invoice_type == 1 && !this.orderCreateData.invoice_full_address && this.paymentData.is_virtual == 1) {
this.$util.showToast({
title: '请填写发票邮寄地址'
title: this.$lang('payment.toast.enterInvoiceAddress')
});
return false;
}
if (this.orderCreateData.invoice_type == 2 && !this.orderCreateData.invoice_email) {
this.$util.showToast({
title: '请填写邮箱'
title: this.$lang('payment.toast.enterEmail')
});
return false;
}
@@ -863,14 +863,14 @@ export default {
var reg = /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/;
if (!reg.test(this.orderCreateData.invoice_email)) {
this.$util.showToast({
title: '请填写正确的邮箱'
title: this.$lang('payment.toast.enterValidEmail')
});
return false;
}
}
if (!this.orderCreateData.invoice_content) {
this.$util.showToast({
title: '请选择发票内容'
title: this.$lang('payment.toast.selectInvoiceContent')
});
return false;
}

View File

@@ -11,13 +11,13 @@
<text v-if="orderData.promotion_status_name">({{ orderData.promotion_status_name }})</text>
</view>
<view class="desc" v-if="orderData.promotion_type == 'presale' && orderData.order_status == 1">
预计{{ $util.timeStampTurnTime(orderData.predict_delivery_time, true) }}日后发货
{{ $lang('status.estimatedDelivery', { days: $util.timeStampTurnTime(orderData.predict_delivery_time, true) }) }}
</view>
<view class="desc" v-if="orderData.close_cause">订单关闭原因:{{ orderData.close_cause }}</view>
<view class="desc" v-if="orderData.close_cause">{{ $lang('status.orderCloseReason') }}{{ orderData.close_cause }}</view>
</view>
</view>
<view class="order-time" v-if="orderData.order_status == 0" id="action-date">
剩余时间:
{{ $lang('status.remainingTime') }}
<uni-count-down :day="orderData.closeTimeMachine.d" :hour="orderData.closeTimeMachine.h"
:minute="orderData.closeTimeMachine.i" :second="orderData.closeTimeMachine.s" color="#fff"
splitorColor="#fff" />
@@ -34,21 +34,21 @@
<text class="font-size-base">{{ orderData.name }}&nbsp;{{ orderData.mobile }}</text>
</view>
<view class="detail">
<text class="font-size-base">收货地址:{{ orderData.full_address }} {{ orderData.address }}</text>
<text class="font-size-base">{{ $lang('address.receivingAddress') }}{{ orderData.full_address }} {{ orderData.address }}</text>
</view>
</view>
<template v-if="orderData.order_type == 3">
<view class="pick-block first-pick-block">
<view class="font-size-base">送达时间:</view>
<view class="font-size-base">{{ $lang('address.deliveryTime') }}</view>
<view class="last-child">{{ orderData.buyer_ask_delivery_time }}</view>
</view>
<block v-if="orderData.package_list">
<view class="pick-block">
<view>配送员:</view>
<view>{{ $lang('address.deliverer') }}</view>
<view class="last-child">{{ orderData.package_list.deliverer }}</view>
</view>
<view class="pick-block">
<view>外卖电话:</view>
<view>{{ $lang('address.delivererMobile') }}</view>
<view class="last-child">{{ orderData.package_list.deliverer_mobile }}</view>
</view>
</block>
@@ -74,27 +74,27 @@
</view>
<view class="detail store-detail">
<view class="color-tip" v-if="orderData.delivery_store_info.open_date">
营业时间:{{ orderData.delivery_store_info.open_date }}</view>
<view class="color-tip">地址:{{ orderData.delivery_store_info.full_address }}</view>
{{ $lang('store.businessHours') }}{{ orderData.delivery_store_info.open_date }}</view>
<view class="color-tip">{{ $lang('store.address') }}{{ orderData.delivery_store_info.full_address }}</view>
</view>
</view>
</view>
<view v-else>
<view class="address-empty">
<view class="color-base-text">当前无自提门店</view>
<view class="color-base-text">{{ $lang('store.noPickupStore') }}</view>
</view>
</view>
</view>
<view class="pick-block first-pick-block">
<view class="font-size-base">姓名</view>
<view class="font-size-base">{{ $lang('store.pickupName') }}</view>
<input class="last-child" type="text" disabled :value="orderData.name" />
</view>
<view class="pick-block first-pick-block">
<view class="font-size-base">预留手机</view>
<view class="font-size-base">{{ $lang('store.reservedMobile') }}</view>
<input class="last-child" type="number" disabled :value="orderData.mobile" />
</view>
<view class="pick-block first-pick-block">
<view class="font-size-base">提货时间</view>
<view class="font-size-base">{{ $lang('store.pickupTime') }}</view>
<input class="last-child" disabled :value="orderData.buyer_ask_delivery_time" />
</view>
</view>
@@ -103,7 +103,7 @@
<view class="pickup-code-info">
<view class="info">
<text class="font-size-base">
<text class="color-tip font-size-base">提货码:</text>
<text class="color-tip font-size-base">{{ $lang('store.pickupCode') }}</text>
{{ orderData.delivery_code }}
</text>
<text class="copy" @click="$util.copy(orderData.delivery_code)">复制</text>
@@ -156,7 +156,7 @@
</view>
</view>
<view v-if="goodsItem.card_item_id" class="goods-card">
次卡抵扣
{{ $lang('goods.cardDeduction') }}
<text class="goods-price ">
<text class="unit price-style small">-{{ $lang('common.currencySymbol') }}</text>
<text class="price-style large">{{
@@ -189,13 +189,13 @@
<view @click="goRefund(goodsItem.order_goods_id)"
v-if="orderData.order_scene == 'online' && (goodsItem.refund_status == 0 || goodsItem.refund_status == -1)">
<view class="order-box-btn" v-if="orderData.promotion_type != 'blindbox'">
{{ orderData.order_status == 10 ? '申请售后' : '申请退款' }}
{{ orderData.order_status == 10 ? $lang('goods.applyAfterSales') : $lang('goods.applyRefund') }}
</view>
</view>
</block>
<view @click="goRefundDetail(goodsItem.order_goods_id)"
v-if="goodsItem.refund_status != 0 && goodsItem.refund_status != -1">
<view class="order-box-btn">{{ orderData.order_status == 10 ? '查看售后' : '查看退款' }}</view>
<view class="order-box-btn">{{ orderData.order_status == 10 ? $lang('goods.viewAfterSales') : $lang('goods.viewRefund') }}</view>
</view>
</view>
</view>
@@ -205,32 +205,32 @@
<!-- 订单概况 -->
<view class="order-summary">
<view class="order-cell">
<text class="tit">订单类型:</text>
<text class="tit">{{ $lang('orderInfo.orderType') }}</text>
<view class="box">
<text class="color-title">{{ orderData.order_type_name }}</text>
</view>
</view>
<view class="order-cell">
<text class="tit">订单编号:</text>
<text class="tit">{{ $lang('orderInfo.orderNo') }}</text>
<view class="box">
<text class="color-title">{{ orderData.order_no }}</text>
<view class="copy" @click="$util.copy(orderData.order_no)">复制</view>
</view>
</view>
<view class="order-cell">
<text class="tit">订单交易号:</text>
<text class="tit">{{ $lang('orderInfo.outTradeNo') }}</text>
<view class="box">
<text class="color-title">{{ orderData.out_trade_no }}</text>
</view>
</view>
<view class="order-cell">
<text class="tit">创建时间:</text>
<text class="tit">{{ $lang('orderInfo.createTime') }}</text>
<view class="box">
<text class="color-title">{{ $util.timeStampTurnTime(orderData.create_time) }}</text>
</view>
</view>
<view class="order-cell" v-if="orderData.close_time > 0">
<text class="tit">关闭时间:</text>
<text class="tit">{{ $lang('orderInfo.closeTime') }}</text>
<view class="box">
<text class="color-title">{{ $util.timeStampTurnTime(orderData.close_time) }}</text>
</view>
@@ -238,32 +238,32 @@
<block v-if="orderData.pay_status > 0">
<view class="hr"></view>
<view class="order-cell">
<text class="tit">支付方式:</text>
<text class="tit">{{ $lang('orderInfo.payType') }}</text>
<view class="box">
<text class="color-title">{{ orderData.pay_type_name }}</text>
</view>
</view>
<view class="order-cell">
<text class="tit">支付时间:</text>
<text class="tit">{{ $lang('orderInfo.payTime') }}</text>
<view class="box">
<text class="color-title">{{ $util.timeStampTurnTime(orderData.pay_time) }}</text>
</view>
</view>
</block>
<view class="order-cell" v-if="orderData.delivery_type_name">
<text class="tit">配送方式:</text>
<text class="tit">{{ $lang('orderInfo.deliveryType') }}</text>
<view class="box">
<text class="color-title">{{ orderData.delivery_type_name }}</text>
</view>
</view>
<view class="order-cell" v-if="orderData.buyer_message != ''">
<text class="tit">买家留言:</text>
<text class="tit">{{ $lang('orderInfo.buyerMessage') }}</text>
<view class="box">
<text class="color-title">{{ orderData.buyer_message }}</text>
</view>
</view>
<view class="order-cell" v-if="orderData.promotion_type_name != ''">
<text class="tit">活动优惠:</text>
<text class="tit">{{ $lang('orderInfo.promotionDiscount') }}</text>
<view class="box">
<text class="color-title">{{ orderData.promotion_type_name }}</text>
</view>
@@ -271,38 +271,38 @@
<block v-if="orderData.is_invoice > 0">
<view class="hr"></view>
<view class="order-cell">
<text class="tit">发票类型:</text>
<text class="tit">{{ $lang('orderInfo.invoiceType') }}</text>
<view class="box">
<text class="color-title">{{ orderData.invoice_type == 1 ? '纸质发票' : '电子发票' }}</text>
<text class="color-title">{{ orderData.invoice_type == 1 ? $lang('orderInfo.invoiceTypePaper') : $lang('orderInfo.invoiceTypeElectronic') }}</text>
</view>
</view>
<view class="order-cell">
<text class="tit">发票抬头类型:</text>
<text class="tit">{{ $lang('orderInfo.invoiceTitleType') }}</text>
<view class="box">
<text class="color-title">{{ orderData.invoice_title_type == 1 ? '个人' : '企业' }}</text>
<text class="color-title">{{ orderData.invoice_title_type == 1 ? $lang('orderInfo.invoiceTitlePersonal') : $lang('orderInfo.invoiceTitleCompany') }}</text>
</view>
</view>
<view class="order-cell">
<text class="tit">发票抬头:</text>
<text class="tit">{{ $lang('orderInfo.invoiceTitle') }}</text>
<view class="box">
<text class="color-title">{{ orderData.invoice_title }}</text>
</view>
</view>
<view class="order-cell">
<text class="tit">发票内容:</text>
<text class="tit">{{ $lang('orderInfo.invoiceContent') }}</text>
<view class="box">
<text class="color-title">{{ orderData.invoice_content }}</text>
</view>
</view>
<view class="order-cell" v-if="orderData.invoice_type == 1">
<text class="tit">发票邮寄地址:</text>
<text class="tit">{{ $lang('orderInfo.invoiceMailAddress') }}</text>
<view class="box">
<text class="color-title">{{ orderData.invoice_full_address }}</text>
</view>
</view>
<view class="order-cell" v-else>
<text class="tit">发票接收邮件:</text>
<text class="tit">{{ $lang('orderInfo.invoiceEmail') }}</text>
<view class="box">
<text class="color-title">{{ orderData.invoice_email }}</text>
</view>
@@ -326,9 +326,9 @@
<block v-if="orderData.goods_class == 5">
<view class="order-cell">
<text class="tit">我的卡包:</text>
<text class="tit">{{ $lang('orderInfo.myCardPack') }}</text>
<view class="box"><text class="color-base-text"
@click="$util.redirectTo('/pages_promotion/cardservice/card/my_card')">查看</text></view>
@click="$util.redirectTo('/pages_promotion/cardservice/card/my_card')">{{ $lang('orderInfo.view') }}</text></view>
</view>
</block>
<!-- 联系客服 -->
@@ -347,7 +347,7 @@
<view class="code">
<image :src="$util.img(orderData.virtualgoods_barcode)" class="barcode" mode="widthFix" show-menu-by-longpress></image>
<image :src="$util.img(orderData.virtualgoods)" class="qrcode" mode="widthFix" show-menu-by-longpress></image>
<text>请将条形码或二维码出示给核销员</text>
<text>{{ $lang('virtualGoods.showCodeToVerifier') }}</text>
</view>
<view class="hr"></view>
<view class="wrap">
@@ -357,63 +357,61 @@
</view>
<view class="verify-info-wrap">
<view class="head">核销信息</view>
<view class="head">{{ $lang('virtualGoods.verifyInfo') }}</view>
<view class="order-cell">
<text class="tit">核销次数</text>
<text class="tit">{{ $lang('virtualGoods.verifyCount') }}</text>
<view class="box align-right">
<text class="color-title">
剩余{{ orderData.virtual_goods.verify_total_count - orderData.virtual_goods.verify_use_num
}}次/共{{
orderData.virtual_goods.verify_total_count }}次
{{ $lang('virtualGoods.verifyCountText', { remaining: orderData.virtual_goods.verify_total_count - orderData.virtual_goods.verify_use_num, total: orderData.virtual_goods.verify_total_count }) }}
</text>
</view>
</view>
<view class="order-cell">
<text class="tit">有效期</text>
<text class="tit">{{ $lang('virtualGoods.validPeriod') }}</text>
<view class="box align-right">
<text class="color-title" v-if="orderData.virtual_goods.expire_time > 0">{{
$util.timeStampTurnTime(orderData.virtual_goods.expire_time) }}</text>
<text v-else>永久有效</text>
<text v-else>{{ $lang('virtualGoods.permanentValid') }}</text>
</view>
</view>
</view>
<view class="verify-info-wrap">
<view class="head">核销记录</view>
<view class="head">{{ $lang('virtualGoods.verifyRecord') }}</view>
<view v-if="orderData.virtual_goods.verify_record.length">
<view v-for="(item, index) in orderData.virtual_goods.verify_record" :key="index"
class="record-item">
<view class="order-cell">
<text class="tit">核销人</text>
<text class="tit">{{ $lang('virtualGoods.verifier') }}</text>
<view class="box align-right">
<text class="color-title">{{ item.verifier_name }}</text>
</view>
</view>
<view class="order-cell">
<text class="tit">核销时间</text>
<text class="tit">{{ $lang('virtualGoods.verifyTime') }}</text>
<view class="box align-right">
<text class="color-title">{{ $util.timeStampTurnTime(item.verify_time) }}</text>
</view>
</view>
</view>
</view>
<view class="record-empty" v-else>暂无核销记录</view>
<view class="record-empty" v-else>{{ $lang('virtualGoods.noVerifyRecord') }}</view>
</view>
</block>
<block v-if="orderData.virtual_goods && orderData.goods_class == 3">
<view class="verify-info-wrap carmichael">
<view class="head">卡密信息</view>
<view class="head">{{ $lang('virtualGoods.cardInfo') }}</view>
<view v-for="(item, index) in orderData.virtual_goods" :key="index" class="record-item">
<view class="order-cell">
<text class="tit">卡号:</text>
<text class="tit">{{ $lang('virtualGoods.cardNo') }}</text>
<view class="box">
<text class="color-title">{{ item.card_info.cardno }}</text>
<view class="copy" @click="$util.copy(item.card_info.cardno)">复制</view>
</view>
</view>
<view class="order-cell">
<text class="tit">密码:</text>
<text class="tit">{{ $lang('virtualGoods.cardPassword') }}</text>
<view class="box">
<text class="color-title">{{ item.card_info.password }}</text>
<view class="copy" @click="$util.copy(item.card_info.password)">复制</view>
@@ -428,7 +426,7 @@
<view class="code">
<image :src="$util.img(orderData.virtualgoods_barcode)" class="barcode" mode="widthFix" show-menu-by-longpress></image>
<image :src="$util.img(orderData.virtualgoods)" class="qrcode" mode="widthFix" show-menu-by-longpress></image>
<text>请将条形码或二维码出示给核销员</text>
<text>{{ $lang('virtualGoods.showCodeToVerifier') }}</text>
</view>
<view class="hr"></view>
<view class="wrap">
@@ -438,53 +436,51 @@
</view>
<view class="verify-info-wrap">
<view class="head">核销信息</view>
<view class="head">{{ $lang('virtualGoods.verifyInfo') }}</view>
<view class="order-cell">
<text class="tit">核销次数</text>
<text class="tit">{{ $lang('virtualGoods.verifyCount') }}</text>
<view class="box align-right">
<text class="color-title">
剩余{{ orderData.virtual_goods.verify_total_count - orderData.virtual_goods.verify_use_num
}}次/共{{
orderData.virtual_goods.verify_total_count }}次
{{ $lang('virtualGoods.verifyCountText', { remaining: orderData.virtual_goods.verify_total_count - orderData.virtual_goods.verify_use_num, total: orderData.virtual_goods.verify_total_count }) }}
</text>
</view>
</view>
<view class="order-cell">
<text class="tit">有效期</text>
<text class="tit">{{ $lang('virtualGoods.validPeriod') }}</text>
<view class="box align-right">
<text class="color-title" v-if="orderData.virtual_goods.expire_time > 0">{{
$util.timeStampTurnTime(orderData.virtual_goods.expire_time) }}</text>
<text v-else>永久有效</text>
<text v-else>{{ $lang('virtualGoods.permanentValid') }}</text>
</view>
</view>
</view>
<view class="verify-info-wrap">
<view class="head">核销记录</view>
<view class="head">{{ $lang('virtualGoods.verifyRecord') }}</view>
<view v-if="orderData.virtual_goods.verify_record.length">
<view v-for="(item, index) in orderData.virtual_goods.verify_record" :key="index"
class="record-item">
<view class="order-cell">
<text class="tit">核销人</text>
<text class="tit">{{ $lang('virtualGoods.verifier') }}</text>
<view class="box align-right">
<text class="color-title">{{ item.verifier_name }}</text>
</view>
</view>
<view class="order-cell">
<text class="tit">核销时间</text>
<text class="tit">{{ $lang('virtualGoods.verifyTime') }}</text>
<view class="box align-right">
<text class="color-title">{{ $util.timeStampTurnTime(item.verify_time) }}</text>
</view>
</view>
</view>
</view>
<view class="record-empty" v-else>暂无核销记录</view>
<view class="record-empty" v-else>{{ $lang('virtualGoods.noVerifyRecord') }}</view>
</view>
</block>
<!-- 订单金额 -->
<view class="order-money">
<view class="order-cell">
<text class="tit">商品金额</text>
<text class="tit">{{ $lang('amount.goodsMoney') }}</text>
<view class="box align-right">
<text class="color-title price-font">
<text class="font-size-goods-tag">{{ $lang('common.currencySymbol') }}</text>
@@ -493,7 +489,7 @@
</view>
</view>
<view class="order-cell" v-if="orderData.order_type != 4">
<text class="tit">运费</text>
<text class="tit">{{ $lang('amount.deliveryFee') }}</text>
<view class="box align-right">
<text class="color-base-text price-font">
<text class="font-size-goods-tag">{{ $lang('common.currencySymbol') }}</text>
@@ -502,7 +498,7 @@
</view>
</view>
<view class="order-cell" v-if="orderData.member_card_money > 0">
<text class="tit">会员卡</text>
<text class="tit">{{ $lang('amount.memberCard') }}</text>
<view class="box align-right">
<text class="color-base-text price-font">
<text class="font-size-goods-tag">{{ $lang('common.currencySymbol') }}</text>
@@ -512,7 +508,7 @@
</view>
<view class="order-cell" v-if="orderData.invoice_money > 0">
<text class="tit">
税费
{{ $lang('amount.taxFee') }}
<text class="color-base-text">({{ orderData.invoice_rate }}%)</text>
</text>
<view class="box align-right">
@@ -524,7 +520,7 @@
</view>
</view>
<view class="order-cell" v-if="orderData.invoice_delivery_money > 0">
<text class="tit">发票邮寄费</text>
<text class="tit">{{ $lang('amount.invoiceDeliveryFee') }}</text>
<view class="box align-right">
<text class="color-base-text price-font">
<text class="operator">+</text>
@@ -534,7 +530,7 @@
</view>
</view>
<view class="order-cell" v-if="orderData.adjust_money != 0">
<text class="tit">订单调整</text>
<text class="tit">{{ $lang('amount.orderAdjust') }}</text>
<view class="box align-right">
<text class="color-base-text price-font">
<text class="operator" v-if="orderData.adjust_money < 0">-</text>
@@ -545,7 +541,7 @@
</view>
</view>
<view class="order-cell" v-if="orderData.promotion_money > 0">
<text class="tit">优惠</text>
<text class="tit">{{ $lang('amount.promotionDiscount') }}</text>
<view class="box align-right">
<text class="color-base-text price-font">
<text class="operator">-</text>
@@ -555,7 +551,7 @@
</view>
</view>
<view class="order-cell" v-if="orderData.coupon_money > 0">
<text class="tit">优惠券</text>
<text class="tit">{{ $lang('amount.coupon') }}</text>
<view class="box align-right">
<text class="color-base-text price-font">
<text class="operator">-</text>
@@ -565,7 +561,7 @@
</view>
</view>
<view class="order-cell" v-if="orderData.balance_money > 0">
<text class="tit">使用余额</text>
<text class="tit">{{ $lang('amount.balanceUsed') }}</text>
<view class="box align-right">
<text class="color-base-text price-font">
<text class="operator">-</text>
@@ -575,7 +571,7 @@
</view>
</view>
<view class="order-cell" v-if="orderData.point_money > 0">
<text class="tit">积分抵扣</text>
<text class="tit">{{ $lang('amount.pointDeduction') }}</text>
<view class="box align-right">
<text class="color-base-text price-font">
<text class="operator">-</text>
@@ -586,7 +582,7 @@
</view>
<view class="order-cell">
<view class="box align-right">
<text>实付金额:</text>
<text>{{ $lang('amount.totalPayable') }}</text>
<text class="color-base-text price-font">
<text class="font-size-goods-tag">{{ $lang('common.currencySymbol') }}</text>
<text class="font-size-base">{{ orderData.order_money }}</text>
@@ -598,8 +594,8 @@
<view class="order-box-btn white"
v-if="evaluateConfig.evaluate_status == 1 && orderData.is_evaluate == 1"
@click="operation('memberOrderEvaluation')">
<text v-if="orderData.evaluate_status == 0">评价</text>
<text v-else-if="orderData.evaluate_status == 1">追评</text>
<text v-if="orderData.evaluate_status == 0">{{ $lang('button.evaluate') }}</text>
<text v-else-if="orderData.evaluate_status == 1">{{ $lang('button.additionalEvaluate') }}</text>
</view>
<block v-if="orderData.order_scene == 'online'">
<view class="order-box-btn"
@@ -614,8 +610,8 @@
<view class="order-action fixed-bottom bottom-safe-area"
v-else-if="orderData.action.length == 0 && orderData.is_evaluate == 1 && evaluateConfig.evaluate_status == 1">
<view class="order-box-btn white" @click="operation('memberOrderEvaluation')">
<text v-if="orderData.evaluate_status == 0">评价</text>
<text v-else-if="orderData.evaluate_status == 1">追评</text>
<text v-if="orderData.evaluate_status == 0">{{ $lang('button.evaluate') }}</text>
<text v-else-if="orderData.evaluate_status == 1">{{ $lang('button.additionalEvaluate') }}</text>
</view>
</view>
</view>
@@ -734,7 +730,7 @@ export default {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
} else {
this.$util.showToast({
title: '未获取到订单信息!'
title: this.$lang('toast.orderInfoNotFound')
});
setTimeout(() => {
this.$util.redirectTo('/pages_order/list');

View File

@@ -13,7 +13,7 @@
<view class="image" :class="fenXiaoAgreement.agreement.img ? '' : 'color-base-bg'">
<image v-if="fenXiaoAgreement.agreement.img" class="apply-adv" :src="$util.img(fenXiaoAgreement.agreement.img)" mode="widthFix" style="width: 100%;" show-menu-by-longpress/>
<view class="bg ns-gradient-otherpages-fenxiao-apply-apply-bg" v-else>
<view class="bg-title"><text>请填写申请信息</text></view>
<view class="bg-title"><text>{{ $lang('pleaseFillApplyInfo') }}</text></view>
<view class="bg-img">
<image :src="$util.img('public/uniapp/fenxiao/apply/edit.png')" mode="scaleToFill" show-menu-by-longpress></image>
</view>
@@ -24,44 +24,44 @@
<view class="app-info">
<view class="info">
<view class="apply-item">
<view class="title">邀请人</view>
<text class="shuru">{{ sourceMemberInfo.fenxiao_name }}</text>
<view class="title">{{ $lang('inviter') }}</view>
<text class="shuru">{{ sourceMemberInfo.fenxiao_name || $lang('none') }}</text>
</view>
<view class="apply-item">
<view class="title">{{ fenxiaoWords.fenxiao_name }}名称</view>
<input class="input" type="text" maxlength="30" :placeholder="'请输入' + fenxiaoWords.fenxiao_name + '名称'" v-model="formData.fenXiaoName" placeholder-class="pla-cla" />
<view class="title">{{ fenxiaoWords.fenxiao_name }}{{ $lang('nameLabel') }}</view>
<input class="input" type="text" maxlength="30" :placeholder="$lang('namePlaceholder', { name: fenxiaoWords.fenxiao_name })" v-model="formData.fenXiaoName" placeholder-class="pla-cla" />
</view>
<view class="apply-item">
<view class="title">手机号</view>
<input class="input" type="number" placeholder="请输入手机号" maxlength="11" v-model="formData.mobile" placeholder-class="pla-cla" />
<view class="title">{{ $lang('mobile') }}</view>
<input class="input" type="number" :placeholder="$lang('mobilePlaceholder')" maxlength="11" v-model="formData.mobile" placeholder-class="pla-cla" />
</view>
<view class="apply-xy" v-if="isAgreement" @click="ckeckedRuler()">
<view class="iconfont" :class="isChecked ? 'icon-yuan_checked color-base-text' : 'icon-yuan_checkbox'">
</view>
我已阅读并了解
<text class="color-base-text" @click.stop="openPopup">【{{ fenxiaoWords.fenxiao_name }}申请协议】</text>
{{ $lang('haveReadAndUnderstand') }}
<text class="color-base-text" @click.stop="openPopup">{{ $lang('applyAgreement', { name: fenxiaoWords.fenxiao_name }) }}</text>
</view>
<view class="apply-btn">
<button @click="applyFenXiao" class="color-base-bg">申请成为{{ fenxiaoWords.fenxiao_name }}</button>
<button @click="applyFenXiao" class="color-base-bg">{{ $lang('applyBecome', { name: fenxiaoWords.fenxiao_name }) }}</button>
</view>
</view>
</view>
<view class="apply-message-wrap" v-if="fenxiaoConfig.fenxiao_condition == 2 || fenxiaoConfig.fenxiao_condition == 3">
<view class="apply-message">
<view class="apply-message-title color-base-bg-before">分销商申请条件</view>
<view class="apply-message-title color-base-bg-before">{{ $lang('applyConditionTitle') }}</view>
<text class="apply-message-info font-size-goods-tag" v-if="fenxiaoConfig.fenxiao_condition == 2">
申请成为{{ fenxiaoWords.fenxiao_name }},需要您的消费次数需要达到{{ fenxiaoConfig.consume_count }}次
{{ $lang('conditionConsumeCount', { name: fenxiaoWords.fenxiao_name, count: fenxiaoConfig.consume_count }) }}
</text>
<text class="apply-message-info font-size-goods-tag" v-if="fenxiaoConfig.fenxiao_condition == 3">
申请成为{{ fenxiaoWords.fenxiao_name }},需要您的消费金额需要达到{{ fenxiaoConfig.consume_money }}元
{{ $lang('conditionConsumeMoney', { name: fenxiaoWords.fenxiao_name, money: fenxiaoConfig.consume_money }) }}
</text>
</view>
</view>
<view class="app-info-list" v-if="fenxiaoConfig.fenxiao_condition == 4">
<view class="apply-message">
<view class="apply-message-title color-base-bg-before">分销商申请条件</view>
<text class="apply-message-info font-size-goods-tag">申请成为{{ fenxiaoWords.fenxiao_name }},需要购买以下指定商品(任选其一)</text>
<view class="apply-message-title color-base-bg-before">{{ $lang('applyConditionTitle') }}</view>
<text class="apply-message-info font-size-goods-tag">{{ $lang('conditionBuyGoods', { name: fenxiaoWords.fenxiao_name }) }}</text>
</view>
<view class="goods-list" v-for="(item, index) in goodsList" :key="index" @click="toDetail(item)">
<view class="goods-img">
@@ -79,7 +79,7 @@
</view>
</view>
<view class="content-lists" v-if="isShow" @click="onOpen()">
{{ isOpen ? '展开更多' : '收起' }}
{{ isOpen ? $lang('expandMore') : $lang('collapse') }}
<text class="iconfont icon-unfold" style="font-weight: bold;" v-if="isOpen"></text>
<text class="iconfont icon-fold" v-else></text>
</view>
@@ -89,16 +89,16 @@
<view class="empty" v-else-if="basicsConfig.is_apply == 0" style="margin-top:40rpx;">
<block v-if="fenxiaoConfig.fenxiao_condition == 2 || fenxiaoConfig.fenxiao_condition == 3">
<image :src="$util.img('public/uniapp/fenxiao/index/no-fenxiao.png')" mode="widthFix" show-menu-by-longpress></image>
<text v-if="fenxiaoConfig.fenxiao_condition == 2">申请成为{{ fenxiaoWords.fenxiao_name }},需要您的消费次数需要达到{{ fenxiaoConfig.consume_count }}次</text>
<text v-if="fenxiaoConfig.fenxiao_condition == 2">{{ $lang('conditionConsumeCount', { name: fenxiaoWords.fenxiao_name, count: fenxiaoConfig.consume_count }) }}</text>
<text v-if="fenxiaoConfig.fenxiao_condition == 3">
申请成为{{ fenxiaoWords.fenxiao_name }},需要您的消费金额需要达到{{ fenxiaoConfig.consume_money | moneyFormat }}元
{{ $lang('conditionConsumeMoney', { name: fenxiaoWords.fenxiao_name, money: fenxiaoConfig.consume_money | moneyFormat }) }}
</text>
</block>
<view class="apply-wrap" v-if="fenxiaoConfig.fenxiao_condition == 4">
<view class="app-info-list">
<view class="apply-message">
<view class="apply-message-title color-base-bg-before">成为分销商的条件</view>
<text class="apply-message-info font-size-goods-tag">成为{{ fenxiaoWords.fenxiao_name }},需要购买以下指定商品(任选其一)</text>
<view class="apply-message-title color-base-bg-before">{{ $lang('becomeConditionTitle') }}</view>
<text class="apply-message-info font-size-goods-tag">{{ $lang('becomeConditionBuyGoods', { name: fenxiaoWords.fenxiao_name }) }}</text>
</view>
<view class="goods-list" v-for="(item, index) in goodsList" :key="index" @click="toDetail(item)">
<view class="goods-img">
@@ -114,7 +114,7 @@
</view>
</view>
<view class="content-lists" v-if="isShow" @click="onOpen()">
{{ isOpen ? '展开更多' : '收起' }}
{{ isOpen ? $lang('expandMore') : $lang('collapse') }}
<text class="iconfont icon-unfold" style="font-weight: bold;" v-if="isOpen"></text>
<text class="iconfont icon-fold" v-else></text>
</view>
@@ -123,15 +123,15 @@
</view>
<view class="empty" v-else>
<image :src="$util.img('public/uniapp/fenxiao/index/no-fenxiao.png')" mode="widthFix" show-menu-by-longpress></image>
<text>您还不是分销商</text>
<text>{{ $lang('notFenxiao') }}</text>
</view>
</view>
<view class="empty" v-else>
<image :src="$util.img('public/uniapp/fenxiao/index/no-fenxiao.png')" mode="widthFix" show-menu-by-longpress></image>
<text v-if="status == 1">您已提交{{ fenxiaoWords.fenxiao_name }}申请,等待平台审核</text>
<text v-if="status == 1">{{ $lang('applyPending', { name: fenxiaoWords.fenxiao_name }) }}</text>
<block v-else-if="status == -1">
<text>您提交的{{ fenxiaoWords.fenxiao_name }}申请,已被拒绝,请再接再厉</text>
<view class="again-btn color-base-bg" @click="againApply">重新申请</view>
<text>{{ $lang('applyRejected', { name: fenxiaoWords.fenxiao_name }) }}</text>
<view class="again-btn color-base-bg" @click="againApply">{{ $lang('reapply') }}</view>
</block>
</view>
<view @touchmove.prevent v-if="fenXiaoAgreement.document">
@@ -162,8 +162,8 @@
isShow: true,
isIphoneX: false,
// 推荐人信息
sourceMemberInfo: {
fenxiao_name: '无'
sourceMemberInfo: {
fenxiao_name: ''
},
formData: {
fenXiaoName: '',
@@ -191,7 +191,7 @@
setTimeout( () => {
if (!this.addonIsExist.fenxiao) {
this.$util.showToast({
title: '商家未开启分销',
title: this.$lang('merchantNotOpenFenxiao'),
mask: true,
duration: 2000
});
@@ -207,7 +207,7 @@
async onShow() {
this.isIphoneX = this.$util.uniappIsIPhoneX();
if (this.fenxiaoWords && this.fenxiaoWords.fenxiao_name) this.$langConfig.title(this.fenxiaoWords.fenxiao_name + '申请');
if (this.fenxiaoWords && this.fenxiaoWords.fenxiao_name) this.$langConfig.title(this.fenxiaoWords.fenxiao_name + this.$lang('applySuffix'));
if (this.storeToken) {
this.applyStatus();
@@ -275,7 +275,7 @@
if (!this.fenXiaoValidata()) return;
if (this.isAgreement && !this.isChecked) {
this.$util.showToast({
title: '请仔细阅读协议,并勾选'
title: this.$lang('pleaseReadAndCheckAgreement')
});
return;
}
@@ -326,22 +326,22 @@
closePopup() {
this.$refs.applyPopup.close();
},
fenXiaoValidata() {
let rule = [{
name: 'fenXiaoName',
checkType: 'required',
errorMsg: '请输入' + this.fenxiaoWords.fenxiao_name + '名称'
},
{
name: 'mobile',
checkType: 'required',
errorMsg: '请输入手机号'
},
{
name: 'mobile',
checkType: 'phoneno',
errorMsg: '请输入正确的手机号'
}
fenXiaoValidata() {
let rule = [{
name: 'fenXiaoName',
checkType: 'required',
errorMsg: this.$lang('pleaseEnterName', { name: this.fenxiaoWords.fenxiao_name })
},
{
name: 'mobile',
checkType: 'required',
errorMsg: this.$lang('pleaseEnterMobile')
},
{
name: 'mobile',
checkType: 'phoneno',
errorMsg: this.$lang('pleaseEnterValidMobile')
}
];
var checkRes = validate.check(this.formData, rule);
if (checkRes) {

View File

@@ -18,9 +18,9 @@
:src="$util.img('public/uniapp/fenxiao/index/commissionFission-level.png')"
alt="" class="level-icon">{{ info.level_name }}</p>
</view>
<view class="recommend">上级代理商:{{ info.parent_name ? info.parent_name : '总店' }}</view>
<view class="recommend">已邀请成功:{{ teamNum.num }}人<text class="iconfont icon-right"
style="font-size: 24rpx;"></text></view>
<view class="recommend">{{ $lang('superiorAgent') }}:{{ info.parent_name ? info.parent_name : $lang('headquarters') }}</view>
<view class="recommend">{{ $lang('invitedSuccess', { count: teamNum.num }) }}<text class="iconfont icon-right"
style="font-size: 24rpx;"></text></view>
</view>
<!-- <view class="promote-rules font-size-tag" @click="$util.redirectTo('/pages_promotion/fenxiao/promote')">
<text class="iconfont icon-wenhao font-size-tag"></text>
@@ -40,10 +40,10 @@
<view class="fenxiao-index-allmoney">
<view class="allmoney-top-money">
<view class="allmoney-top">
<view class="font-size-sub">可{{ fenxiaoWords.withdraw }}(元)</view>
<view class="font-size-sub">{{ $lang('withdrawable', { withdraw: fenxiaoWords.withdraw }) }}</view>
<view class="withdrawal-record"
@click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_list')">
提现明细
{{ $lang('withdrawDetail') }}
<text class="iconfont icon-right"></text>
</view>
</view>
@@ -61,18 +61,18 @@
</view> -->
<view class="allmoney-all-wrap"
@click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_list')">
<view class="title">提现中(元)<text class="iconfont icon-right"
<view class="title">{{ $lang('withdrawing') }}<text class="iconfont icon-right"
style="font-size: 24rpx;"></text></view>
<view class="money price-font">{{ info.account_withdraw_apply | moneyFormat }}</view>
</view>
<view class="allmoney-all-wrap"
@click="$util.redirectTo('/pages_promotion/fenxiao/order', { type: 1 })">
<view class="title">待入账(元)<text class="iconfont icon-right"
<view class="title">{{ $lang('pendingDeposit') }}<text class="iconfont icon-right"
style="font-size: 24rpx;"></text></view>
<view class="money price-font">{{ info.in_progress_money | moneyFormat }}</view>
</view>
</view>
<view class="withdraw-btn" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_apply')">提现
<view class="withdraw-btn" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_apply')">{{ $lang('withdraw') }}
</view>
</view>
@@ -90,8 +90,8 @@
</image>
</view>
<view class="info">
<view class="title">我的粉丝</view>
<view class="desc">邀请的用户</view>
<view class="title">{{ $lang('myFans') }}</view>
<view class="desc">{{ $lang('invitedUsers') }}</view>
</view>
</view>
<view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/withdraw_list')">
@@ -100,8 +100,8 @@
</image>
</view>
<view class="info">
<view class="title">{{ fenxiaoWords.withdraw }}明细</view>
<view class="desc">累计{{ fenxiaoWords.account }}¥{{ info.total_commission | moneyFormat }}
<view class="title">{{ fenxiaoWords.withdraw + $lang('detail') }}</view>
<view class="desc">{{ $lang('totalAccumulated', { account: fenxiaoWords.account, symbol: $lang('common.currencySymbol'), amount: info.total_commission | moneyFormat }) }}
</view>
</view>
</view>
@@ -111,8 +111,8 @@
</image>
</view>
<view class="info">
<view class="title">{{ fenxiaoWords.concept + '订单' }}</view>
<view class="desc">{{ fenxiaoWords.concept + '订单' }}明细</view>
<view class="title">{{ fenxiaoWords.concept + $lang('order') }}</view>
<view class="desc">{{ fenxiaoWords.concept + $lang('orderDetail') }}</view>
</view>
</view>
@@ -121,8 +121,8 @@
<image :src="$util.img('public/uniapp/fenxiao/index/friend.png')" mode="widthFix" show-menu-by-longpress></image>
</view>
<view class="info">
<view class="title">我的邀请码</view>
<view class="desc">邀好友赚好礼</view>
<view class="title">{{ $lang('myInviteCode') }}</view>
<view class="desc">{{ $lang('inviteFriendsEarnRewards') }}</view>
</view>
</view>
<!-- <view class="menu-item" @click="$util.redirectTo('/pages_promotion/fenxiao/promote')">
@@ -211,8 +211,8 @@
<ns-copyright></ns-copyright>
<view class="empty" v-if="!info.fenxiao_id > 0 && showEmpty">
<image :src="$util.img('public/uniapp/fenxiao/index/no-fenxiao.png')" mode="widthFix" show-menu-by-longpress></image>
<text>您还不是{{ fenxiaoWords.fenxiao_name }},请先提交申请</text>
<view @click="$util.redirectTo('/pages_promotion/fenxiao/apply')" class="color-base-bg">立即加入</view>
<text>{{ $lang('notFenxiaoYet', { name: fenxiaoWords.fenxiao_name }) }}</text>
<view @click="$util.redirectTo('/pages_promotion/fenxiao/apply')" class="color-base-bg">{{ $lang('joinNow') }}</view>
</view>
<loading-cover ref="loadingCover"></loading-cover>
<ns-login ref="login"></ns-login>
@@ -220,7 +220,7 @@
<uni-popup ref="taskPopup" type="bottom">
<view class="task-popup popup-layer" v-if="levelInfo">
<view class="head-wrap">
<text>快速升级技巧</text>
<text>{{ $lang('quickUpgradeTips') }}</text>
<text class="iconfont icon-close" @click="$refs.taskPopup.close()"></text>
</view>
<view class="body-wrap">
@@ -228,7 +228,7 @@
<text class="subordinate-consumption">
{{ item.title }}
<text class="iconfont icon-wenhao" @click="openTips(item)"></text>
<text class="incomplete">{{ item.progress == 100 ? '已完成' : '未完成' }}</text>
<text class="incomplete">{{ item.progress == 100 ? $lang('completed') : $lang('incomplete') }}</text>
</text>
<view class="circle">
<progress :percent="item.progress" activeColor="#E7B667" stroke-width="4" />
@@ -236,7 +236,7 @@
<text class="zero">{{ item.value }}</text>
<text>/{{ item.condition }}</text>
<text class="to-complete-box" @click="$util.redirectTo('/pages_promotion/fenxiao/promote')">
<text class="to-complete">{{ item.progress == 100 ? '已完成' : '去完成' }}</text>
<text class="to-complete">{{ item.progress == 100 ? $lang('completed') : $lang('goComplete') }}</text>
</text>
</view>
</view>
@@ -246,12 +246,12 @@
<uni-popup type="bottom" ref="tips">
<view class="popup">
<view class="popup-header">
<text class="tit">提示</text>
<text class="tit">{{ $lang('tip') }}</text>
<text class="iconfont icon-close" @click="$refs.tips.close()"></text>
</view>
<view class="popup-body">
<view>{{ tips }}</view>
<view v-if="levelInfo">{{ levelInfo.upgrade_type == 1 ? '满足任意一条件即可升级' : '满足全部条件才能进行升级' }}</view>
<view v-if="levelInfo">{{ levelInfo.upgrade_type == 1 ? $lang('anyConditionUpgrade') : $lang('allConditionsUpgrade') }}</view>
</view>
</view>
</uni-popup>
@@ -290,7 +290,7 @@ export default {
},
mixins: [fenxiaoWords],
onShow() {
if (this.fenxiaoWords && this.fenxiaoWords.concept) this.$langConfig.title(this.fenxiaoWords.concept + '中心');
if (this.fenxiaoWords && this.fenxiaoWords.concept) this.$langConfig.title(this.fenxiaoWords.concept + this.$lang('center'));
if (this.storeToken) {
this.checkFenxiaoIsStart();
@@ -307,7 +307,7 @@ export default {
setTimeout(() => {
if (!this.addonIsExist.fenxiao) {
this.$util.showToast({
title: '商家未开启分销',
title: this.$lang('merchantNotOpenFenxiao'),
mask: true,
duration: 2000
});
@@ -348,7 +348,7 @@ export default {
this.getFenxiaoDetail();
} else {
this.$util.showToast({
title: '商家未开启分销',
title: this.$lang('merchantNotOpenFenxiao'),
mask: true,
duration: 2000
});
@@ -368,7 +368,7 @@ export default {
if (res.data) {
if (res.data.status == -1) {
this.$util.showToast({
title: '当前分销商已冻结'
title: this.$lang('fenxiaoFrozen')
});
setTimeout(() => {
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
@@ -480,9 +480,9 @@ export default {
if (level.one_fenxiao_order_num > 0) {
let task = {
title: '下级消费',
desc: '下级消费单数满' + level.one_fenxiao_order_num + '单',
tips: '分销商自己购买和自己推荐的直属会员购买的订单次数',
title: this.$lang('subordinateConsumption'),
desc: this.$lang('subordinateOrderCount', { count: level.one_fenxiao_order_num }),
tips: this.$lang('subordinateOrderCountTip'),
condition: level.one_fenxiao_order_num,
value: this.info.one_fenxiao_order_num,
progress: parseFloat(this.info.one_fenxiao_order_num) > parseFloat(level.one_fenxiao_order_num) ?
@@ -494,9 +494,9 @@ export default {
}
if (level.one_fenxiao_total_order > 0) {
let task = {
title: '下级消费',
desc: '下级消费金额满' + this.moneyFormat(level.one_fenxiao_total_order) + '元',
tips: '分销商自己购买和推荐的直属会员购买的订单的总额',
title: this.$lang('subordinateConsumption'),
desc: this.$lang('subordinateOrderAmount', { amount: this.moneyFormat(level.one_fenxiao_total_order) }),
tips: this.$lang('subordinateOrderAmountTip'),
condition: this.moneyFormat(level.one_fenxiao_total_order),
value: this.info.one_fenxiao_total_order,
progress: parseFloat(this.info.one_fenxiao_total_order) > parseFloat(level.one_fenxiao_total_order) ?
@@ -508,10 +508,9 @@ export default {
}
if (level.one_fenxiao_order_money > 0) {
let task = {
title: '下级消费',
desc: '下级消费产生' + this.fenxiaoWords.account + '总额满' + this.moneyFormat(level
.one_fenxiao_order_money) + '元',
tips: '分销商自己购买和自己推荐的直属会员购买的订单' + this.fenxiaoWords.account + '总额',
title: this.$lang('subordinateConsumption'),
desc: this.$lang('subordinateCommissionAmount', { account: this.fenxiaoWords.account, amount: this.moneyFormat(level.one_fenxiao_order_money) }),
tips: this.$lang('subordinateCommissionAmountTip', { account: this.fenxiaoWords.account }),
condition: this.moneyFormat(level.one_fenxiao_order_money),
value: this.info.one_fenxiao_order_money,
progress: parseFloat(this.info.one_fenxiao_order_money) > parseFloat(level.one_fenxiao_order_money) ?
@@ -523,9 +522,9 @@ export default {
}
if (level.order_num > 0) {
let task = {
title: '自身消费',
desc: '自身消费单数满' + level.order_num + '单',
tips: '分销商自己购买的订单次数',
title: this.$lang('selfConsumption'),
desc: this.$lang('selfOrderCount', { count: level.order_num }),
tips: this.$lang('selfOrderCountTip'),
condition: level.order_num,
value: this.info.order_num,
progress: parseFloat(this.info.order_num) > parseFloat(level.order_num) ? 100 : ((parseFloat(this.info.order_num) / parseFloat(level.order_num)) * 100).toFixed(2)
@@ -535,9 +534,9 @@ export default {
}
if (level.order_money > 0) {
let task = {
title: '自身消费',
desc: '自身消费金额满' + this.moneyFormat(level.order_money) + '元',
tips: '分销商自己购买的订单总额',
title: this.$lang('selfConsumption'),
desc: this.$lang('selfOrderAmount', { amount: this.moneyFormat(level.order_money) }),
tips: this.$lang('selfOrderAmountTip'),
condition: this.moneyFormat(level.order_money),
value: this.info.order_money,
progress: parseFloat(this.info.order_money) > parseFloat(level.order_money) ?
@@ -549,9 +548,9 @@ export default {
}
if (level.one_child_num > 0) {
let task = {
title: '邀请好友',
desc: '邀请好友人数达到' + level.one_child_num + '人',
tips: '分销商的直属下级会员人数(包含已经申请成为分销商的)',
title: this.$lang('inviteFriends'),
desc: this.$lang('inviteFriendCount', { count: level.one_child_num }),
tips: this.$lang('inviteFriendCountTip'),
condition: level.one_child_num,
value: this.info.one_child_num,
progress: parseFloat(this.info.one_child_num) > parseFloat(level.one_child_num) ?
@@ -563,9 +562,9 @@ export default {
}
if (level.one_child_fenxiao_num > 0) {
let task = {
title: '邀请好友',
desc: '邀请好友成为分销商人数达到' + level.one_child_fenxiao_num + '人',
tips: '分销商的直属下级分销商人数',
title: this.$lang('inviteFriends'),
desc: this.$lang('inviteFenxiaoCount', { count: level.one_child_fenxiao_num }),
tips: this.$lang('inviteFenxiaoCountTip'),
condition: level.one_child_fenxiao_num,
value: this.info.one_child_fenxiao_num,
progress: parseFloat(this.info.one_child_fenxiao_num) > parseFloat(level.one_child_fenxiao_num) ?

View File

@@ -17,15 +17,15 @@
</view>
<view class="level-rate">
<view class="rate-item" v-if="config.level > 0">
<view class="title">一级分佣比率</view>
<view class="title">{{ $lang('firstLevelCommissionRate') }}</view>
<view class="rate">{{ item.one_rate }}<text class="percentage">%</text></view>
</view>
<view class="rate-item" v-if="config.level > 1">
<view class="title">二级分佣比率</view>
<view class="title">{{ $lang('secondLevelCommissionRate') }}</view>
<view class="rate">{{ item.two_rate }}<text class="percentage">%</text></view>
</view>
<view class="rate-item" v-if="config.level > 2">
<view class="title">三级分佣比率</view>
<view class="title">{{ $lang('thirdLevelCommissionRate') }}</view>
<view class="rate">{{ item.three_rate }}<text class="percentage">%</text></view>
</view>
</view>
@@ -40,7 +40,7 @@
<view class="level-condition" v-if="levelInfo">
<view class="condition-title">
<view class="title">快速升级技巧</view>
<view class="title">{{ $lang('quickUpgradeTips') }}</view>
<view class="rate price-font">
<text class="complete">{{ levelInfo.complete > levelInfo.task_num ? levelInfo.task_num : levelInfo.complete }}</text>
<text class="num">/{{ levelInfo.task_num }}</text>
@@ -54,7 +54,7 @@
<text class="iconfont icon-wenxiao" @click="openTips(item)"></text>
</view>
<view class="status" :class="{'complete': item.progress == 100}">
{{ item.progress == 100 ? '已完成' : '未完成' }}</view>
{{ item.progress == 100 ? $lang('completed') : $lang('incomplete') }}</view>
</view>
<view class="progress">
<progress :percent="item.progress" activeColor="#E7B667" stroke-width="4" />
@@ -73,12 +73,12 @@
<uni-popup type="bottom" ref="tips">
<view class="popup">
<view class="popup-header">
<text class="tit">提示</text>
<text class="tit">{{ $lang('tip') }}</text>
<text class="iconfont icon-close" @click="$refs.tips.close()"></text>
</view>
<view class="popup-body">
<view>{{ tips }}</view>
<view v-if="levelInfo">{{ levelInfo.upgrade_type == 1 ? '满足任意一条件即可升级' : '满足全部条件才能进行升级' }}</view>
<view v-if="levelInfo">{{ levelInfo.upgrade_type == 1 ? $lang('anyConditionUpgrade') : $lang('allConditionsUpgrade') }}</view>
</view>
</view>
</uni-popup>
@@ -114,9 +114,9 @@
if (level.one_fenxiao_order_num > 0) {
let task = {
title: '下级消费',
desc: '下级消费单数满' + level.one_fenxiao_order_num + '单',
tips: '分销商自己购买和自己推荐的直属会员购买的订单次数达到'+ level.one_fenxiao_order_num + '单',
title: this.$lang('subordinateConsumption'),
desc: this.$lang('subordinateOrderCount', { count: level.one_fenxiao_order_num }),
tips: this.$lang('subordinateOrderCountTip', { count: level.one_fenxiao_order_num }),
condition: level.one_fenxiao_order_num,
value: this.fenxiaoInfo.one_fenxiao_order_num,
progress: parseFloat(this.fenxiaoInfo.one_fenxiao_order_num) > parseFloat(level.one_fenxiao_order_num) ? 100 : (parseFloat(this.fenxiaoInfo.one_fenxiao_order_num) / parseFloat(level.one_fenxiao_order_num) * 100).toFixed(2)
@@ -126,9 +126,9 @@
}
if (level.one_fenxiao_total_order > 0) {
let task = {
title: '下级消费',
desc: '下级消费金额满' + this.moneyFormat(level.one_fenxiao_total_order) + '元',
tips: '分销商自己购买和推荐的直属会员购买的订单的总额达到'+ this.moneyFormat(level.one_fenxiao_total_order) + '元',
title: this.$lang('subordinateConsumption'),
desc: this.$lang('subordinateOrderAmount', { amount: this.moneyFormat(level.one_fenxiao_total_order) }),
tips: this.$lang('subordinateOrderAmountTip', { amount: this.moneyFormat(level.one_fenxiao_total_order) }),
condition: this.moneyFormat(level.one_fenxiao_total_order),
value: this.fenxiaoInfo.one_fenxiao_total_order,
progress: parseFloat(this.fenxiaoInfo.one_fenxiao_total_order) > parseFloat(level.one_fenxiao_total_order) ? 100 : (parseFloat(this.fenxiaoInfo.one_fenxiao_total_order) / parseFloat(level.one_fenxiao_total_order) * 100)
@@ -139,9 +139,9 @@
}
if (level.one_fenxiao_order_money > 0) {
let task = {
title: '下级消费',
desc: '下级消费产生佣金总额满' + this.moneyFormat(level.one_fenxiao_order_money) + '元',
tips: '分销商自己购买和自己推荐的直属会员购买的订单佣金总额达到'+ this.moneyFormat(level.one_fenxiao_order_money) + '元',
title: this.$lang('subordinateConsumption'),
desc: this.$lang('subordinateCommissionAmount', { amount: this.moneyFormat(level.one_fenxiao_order_money) }),
tips: this.$lang('subordinateCommissionAmountTip', { amount: this.moneyFormat(level.one_fenxiao_order_money) }),
condition: this.moneyFormat(level.one_fenxiao_order_money),
value: this.fenxiaoInfo.one_fenxiao_order_money,
progress: parseFloat(this.fenxiaoInfo.one_fenxiao_order_money) > parseFloat(level.one_fenxiao_order_money) ? 100 : (parseFloat(this.fenxiaoInfo.one_fenxiao_order_money) / parseFloat(level.one_fenxiao_order_money) * 100)
@@ -152,9 +152,9 @@
}
if (level.order_num > 0) {
let task = {
title: '自身消费',
desc: '自身消费单数满' + level.order_num + '单',
tips: '分销商自己购买的订单次数达到'+ level.order_num + '单',
title: this.$lang('selfConsumption'),
desc: this.$lang('selfOrderCount', { count: level.order_num }),
tips: this.$lang('selfOrderCountTip', { count: level.order_num }),
condition: level.order_num,
value: this.fenxiaoInfo.order_num,
progress: parseFloat(this.fenxiaoInfo.order_num) > parseFloat(level.order_num) ? 100 : (parseFloat(this.fenxiaoInfo.order_num) / parseFloat(level.order_num) * 100).toFixed(2)
@@ -164,9 +164,9 @@
}
if (level.order_money > 0) {
let task = {
title: '自身消费',
desc: '自身消费金额满' + this.moneyFormat(level.order_money) + '元',
tips: '分销商自己购买的订单总额满足'+ this.moneyFormat(level.order_money) + '元',
title: this.$lang('selfConsumption'),
desc: this.$lang('selfOrderAmount', { amount: this.moneyFormat(level.order_money) }),
tips: this.$lang('selfOrderAmountTip', { amount: this.moneyFormat(level.order_money) }),
condition: this.moneyFormat(level.order_money),
value: this.fenxiaoInfo.order_money,
progress: parseFloat(this.fenxiaoInfo.order_money) > parseFloat(level.order_money) ? 100 : (parseFloat(this.fenxiaoInfo.order_money) / parseFloat(level.order_money) * 100).toFixed(2)
@@ -176,9 +176,9 @@
}
if (level.one_child_num > 0) {
let task = {
title: '邀请好友',
desc: '邀请好友人数达到' + level.one_child_num + '人',
tips: '分销商的直属下级会员人数达到'+level.one_child_num+'人(包含已经申请成为分销商的)',
title: this.$lang('inviteFriends'),
desc: this.$lang('inviteFriendCount', { count: level.one_child_num }),
tips: this.$lang('inviteFriendCountTip', { count: level.one_child_num }),
condition: level.one_child_num,
value: this.fenxiaoInfo.one_child_num,
progress: parseFloat(this.fenxiaoInfo.one_child_num) > parseFloat(level.one_child_num) ? 100 : (parseFloat(this.fenxiaoInfo.one_child_num) / parseFloat(level.one_child_num) * 100).toFixed(2)
@@ -188,9 +188,9 @@
}
if (level.one_child_fenxiao_num > 0) {
let task = {
title: '邀请好友',
desc: '邀请好友成为分销商人数达到' + level.one_child_fenxiao_num + '人',
tips: '分销商的直属下级分销商人数达到'+ level.one_child_fenxiao_num + '人',
title: this.$lang('inviteFriends'),
desc: this.$lang('inviteFenxiaoCount', { count: level.one_child_fenxiao_num }),
tips: this.$lang('inviteFenxiaoCountTip', { count: level.one_child_fenxiao_num }),
condition: level.one_child_fenxiao_num,
value: this.fenxiaoInfo.one_child_fenxiao_num,
progress: parseFloat(this.fenxiaoInfo.one_child_fenxiao_num) > parseFloat(level.one_child_fenxiao_num) ? 100 : (parseFloat(this.fenxiaoInfo.one_child_fenxiao_num) / parseFloat(level.one_child_fenxiao_num) * 100).toFixed(2)
@@ -208,7 +208,7 @@
setTimeout( () => {
if (!this.addonIsExist.fenxiao) {
this.$util.showToast({
title: '商家未开启分销',
title: this.$lang('merchantNotOpenFenxiao'),
mask: true,
duration: 2000
});
@@ -218,7 +218,7 @@
}
},1000);
if (this.fenxiaoWords && this.fenxiaoWords.fenxiao_name) this.$langConfig.title(this.fenxiaoWords.fenxiao_name + '等级');
if (this.fenxiaoWords && this.fenxiaoWords.fenxiao_name) this.$langConfig.title(this.fenxiaoWords.fenxiao_name + this.$lang('levelSuffix'));
if (this.storeToken) {
this.getFenxiaoInfo();

View File

@@ -35,7 +35,7 @@
</view>
<view class="group-wrap padding-top">
<view class="goods-module-wrap">
<text class="price-symbol ">{{ pointInfo.point }}积分</text>
<text class="price-symbol ">{{ pointInfo.point }}{{ $lang('detail.pointsSuffix') }}</text>
<template v-if="pointInfo.exchange_price != '0.00' && pointInfo.pay_type > 0">
<text class="price-symbol ">+{{ $lang('common.currencySymbol') }}{{ pointInfo.exchange_price
}}</text>
@@ -48,10 +48,10 @@
<view class="follow-and-share"
v-if="pointInfo.stock_show == 1 || pointInfo.stock_show == undefined">
<text class="color-tip" v-if="pointInfo.pointCoupon != 1">库存:{{ pointInfo.stock }}{{
<text class="color-tip" v-if="pointInfo.pointCoupon != 1">{{ $lang('detail.stockLabel') }}{{ pointInfo.stock }}{{
pointInfo.stock >= 0 ?
pointInfo.unit : '' }}</text>
<text class="color-tip" v-else>库存:无限{{ pointInfo.stock >= 0 ? pointInfo.unit : '' }}</text>
<text class="color-tip" v-else>{{ $lang('detail.stockLabel') }}{{ $lang('detail.unlimitedStock') }}{{ pointInfo.stock >= 0 ? pointInfo.unit : '' }}</text>
</view>
</view>
<view class="goods-module-wrap info">
@@ -61,21 +61,17 @@
<text class="sku-name-wrap" v-else>{{ pointInfo.name }}</text>
</view>
<view class="coupon-desc">
<view v-if="pointInfo.balance && pointInfo.balance > 0" class="color-tip">内含{{ pointInfo.balance
}}元</view>
<view v-if="pointInfo.coupon_type == 'random'" class="color-tip">无门槛优惠券</view>
<view v-if="pointInfo.coupon_type == 'reward'" class="color-tip">{{ '满' + pointInfo.at_least +
'减' + pointInfo.money
}}</view>
<view v-if="pointInfo.balance && pointInfo.balance > 0" class="color-tip">{{ $lang('detail.containsBalance', { balance: pointInfo.balance }) }}</view>
<view v-if="pointInfo.coupon_type == 'random'" class="color-tip">{{ $lang('detail.noThresholdCoupon') }}</view>
<view v-if="pointInfo.coupon_type == 'reward'" class="color-tip">{{ $lang('detail.fullReduction', { atLeast: pointInfo.at_least, money: pointInfo.money }) }}</view>
<view v-if="pointInfo.coupon_type == 'discount'" class="color-tip">
满{{ pointInfo.at_least }}元
<text>{{ pointInfo.discount }}折</text>
{{ $lang('detail.fullAmount', { atLeast: pointInfo.at_least }) }}
<text>{{ pointInfo.discount }}{{ $lang('detail.discountSuffix') }}</text>
</view>
<view v-if="pointInfo.coupon_type == 'discount'" class="color-tip">最多优惠{{
pointInfo.discount_limit }}元</view>
<view v-if="pointInfo.coupon_type == 'discount'" class="color-tip">{{ $lang('detail.maxDiscount', { limit: pointInfo.discount_limit }) }}</view>
<view class="time color-tip" v-if="pointInfo.coupon_type">
{{ pointInfo.validity_type == 1 ? '领取之日起' + pointInfo.fixed_term + '天内有效' :
$util.timeStampTurnTime(pointInfo.end_time) + '到期' }}
{{ pointInfo.validity_type == 1 ? $lang('detail.validFromReceive', { days: pointInfo.fixed_term }) :
$lang('detail.validUntil', { time: $util.timeStampTurnTime(pointInfo.end_time) }) }}
</view>
</view>
</view>
@@ -88,7 +84,7 @@
<view class="community-txt">{{ pointInfo.qr_data.community_describe }}</view>
</view>
</view>
<view class="community-btn" @click="onCommunity()">添加</view>
<view class="community-btn" @click="onCommunity()">{{ $lang('detail.addCommunity') }}</view>
</view>
<!-- 促销 -->
@@ -96,7 +92,7 @@
v-show="isCommunity">
<view class="community-model-content" @click.stop>
<view class="community-model-content-radius">
<view>添加社群</view>
<view>{{ $lang('detail.addCommunityTitle') }}</view>
</view>
<view class="community-model-content-draw" v-if="pointInfo.qr_data && pointInfo.qr_data.qr_img">
<image :src="pointInfo.qr_data.qr_img != '' && pointInfo.qr_data.qr_state == 1
@@ -104,7 +100,7 @@
: $util.img('public/uniapp/goods/detail_erweiImage.png')
" mode="aspectFill" show-menu-by-longpress />
</view>
<view class="community-model-content-text">长按识别二维码,添加社群</view>
<view class="community-model-content-text">{{ $lang('detail.addCommunityTip') }}</view>
</view>
<view class="community-model-close" @click.stop="onCloseCommunity()"><text
class="iconfont icon-close"></text>
@@ -115,7 +111,7 @@
<view class="newdetail margin-bottom">
<!-- 已选规格 -->
<view class="item selected-sku-spec" v-if="pointInfo.sku_spec_format" @click="exchange">
<view class="label">选择</view>
<view class="label">{{ $lang('detail.selectSpec') }}</view>
<view class="box">
<text v-for="(item, index) in pointInfo.sku_spec_format" :key="index">{{ item.spec_name
}}/{{
@@ -126,7 +122,7 @@
<view class="item goods-attribute" @click="openAttributePopup()"
v-if="pointInfo.goods_attr_format && pointInfo.goods_attr_format.length > 0">
<view class="label">属性</view>
<view class="label">{{ $lang('detail.attribute') }}</view>
<view class="box">
<text v-for="(item, index) in pointInfo.goods_attr_format" :key="index"
v-if="index < 2">{{
@@ -141,7 +137,7 @@
<uni-popup ref="attributePopup" type="bottom">
<view class="goods-attribute-popup-layer popup-layer">
<view class="head-wrap" @click="closeAttributePopup()">
<text>商品属性</text>
<text>{{ $lang('detail.goodsAttribute') }}</text>
<text class="iconfont icon-close"></text>
</view>
<scroll-view scroll-y class="goods-attribute-body">
@@ -152,7 +148,7 @@
</view>
</scroll-view>
<view class="button-box"><button type="primary"
@click="closeAttributePopup()">确定</button></view>
@click="closeAttributePopup()">{{ $lang('detail.confirm') }}</button></view>
</view>
</uni-popup>
</view>
@@ -161,7 +157,7 @@
<uni-popup ref="merchantsServicePopup" type="bottom">
<view class="goods-merchants-service-popup-layer popup-layer">
<view class="head-wrap" @click="closeMerchantsServicePopup()">
<text>商品服务</text>
<text>{{ $lang('detail.goodsService') }}</text>
<text class="iconfont icon-close"></text>
</view>
<scroll-view scroll-y>
@@ -175,7 +171,7 @@
</view>
</scroll-view>
<view class="button-box"><button type="primary"
@click="closeMerchantsServicePopup()">确定</button></view>
@click="closeMerchantsServicePopup()">{{ $lang('detail.confirm') }}</button></view>
</view>
</uni-popup>
</view>
@@ -184,7 +180,7 @@
<!-- 详情 -->
<view class="goods-detail-tab">
<view class="detail-tab">
<view class="tab-item">兑换详情</view>
<view class="tab-item">{{ $lang('detail.exchangeDetail') }}</view>
</view>
<view class="detail-content">
@@ -192,7 +188,7 @@
<view class="goods-details" v-if="pointInfo.content"><rich-text
:nodes="pointInfo.content"></rich-text>
</view>
<view class="goods-details active" v-else>暂无兑换详情!</view>
<view class="goods-details active" v-else>{{ $lang('detail.noExchangeDetail') }}</view>
</view>
</view>
</view>
@@ -205,14 +201,14 @@
</view>
<view class="detail-swap" @click="exchange()" :class="{ 'position-bottom': isIphoneX }" v-if="!isLogin"><button
type="primary">登录之后方可兑换</button></view>
type="primary">{{ $lang('detail.loginToExchange') }}</button></view>
<block v-else>
<view class="detail-swap" :class="{ 'position-bottom': isIphoneX }" v-if="pointInfo.stock == 0"><button
disabled>库存不足</button></view>
disabled>{{ $lang('detail.insufficientStock') }}</button></view>
<view class="detail-swap" :class="{ 'position-bottom': isIphoneX }" v-else-if="enough"><button
disabled>积分不足</button></view>
disabled>{{ $lang('detail.insufficientPoints') }}</button></view>
<view class="detail-swap" @click="exchange()" :class="{ 'position-bottom': isIphoneX }" v-else><button
type="primary" hover-class="none">兑换</button></view>
type="primary" hover-class="none">{{ $lang('detail.exchange') }}</button></view>
</block>
<loading-cover ref="loadingCover"></loading-cover>
@@ -293,7 +289,7 @@ export default {
imageUrl = this.pointInfo.image;
break;
}
title = '仅需' + this.pointInfo.point + '积分即可兑换' + title;
title = this.$lang('detail.shareTitle', { point: this.pointInfo.point, title: title });
imageUrl = this.$util.img(imageUrl);
var route = this.$util.getCurrentShareRoute(this.memberInfo ? this.memberInfo.member_id : 0);
var path = route.path;
@@ -322,7 +318,7 @@ export default {
imageUrl = this.pointInfo.image;
break;
}
title = '仅需' + this.pointInfo.point + '积分即可兑换' + title;
title = this.$lang('detail.shareTitle', { point: this.pointInfo.point, title: title });
imageUrl = this.$util.img(imageUrl);
var route = this.$util.getCurrentShareRoute(this.memberInfo ? this.memberInfo.member_id : 0);
var query = route.query;
@@ -424,7 +420,7 @@ export default {
if (this.pointInfo.goods_spec_format) this.pointInfo.goods_spec_format = JSON.parse(this.pointInfo.goods_spec_format);
}
this.pointInfo.unit = this.pointInfo.unit || '件';
this.pointInfo.unit = this.pointInfo.unit || this.$lang('detail.unitPiece');
// 商品详情
if (this.pointInfo.content) this.pointInfo.content = htmlParser(this.pointInfo.content);
@@ -458,7 +454,7 @@ export default {
*/
refreshGoodsSkuDetail(pointInfo) {
Object.assign(this.pointInfo, pointInfo);
this.pointInfo.unit = this.pointInfo.unit || '件';
this.pointInfo.unit = this.pointInfo.unit || this.$lang('detail.unitPiece');
},
//服务
openMerchantsServicePopup() {

View File

@@ -10,7 +10,7 @@
</view>
<view class="search" @click="$util.redirectTo('/pages_tool/goods/search')">
<text class="iconfont icon-sousuo3"></text>
<text class="tips">搜索商品</text>
<text class="tips">{{ $lang('searchPlaceholder') }}</text>
</view>
<view class="sign"
:style="{ width: menuButtonBounding.height + 'px', height: menuButtonBounding.height + 'px' }"
@@ -28,17 +28,17 @@
<view class="account-content">
<view class="left">
<image :src="$util.img('public/uniapp/point/point-icon.png')" mode="widthFix"></image>
<view>我的积分</view>
<view>{{ $lang('myPoints') }}</view>
</view>
<view class="right">
<text class="point price-font">{{ point }}</text>
<text class="text">积分</text>
<text class="text">{{ $lang('points') }}</text>
<!-- <text class="iconfont icon-right"></text> -->
</view>
</view>
<view class="remark">
<view class="label">提醒</view>
<view class="text">积分兑好礼,每日上新换不停!</view>
<view class="label">{{ $lang('reminder') }}</view>
<view class="text">{{ $lang('remarkText') }}</view>
</view>
</view>
@@ -81,9 +81,9 @@
<view class="recharge-list-wrap" @click="redirect('/pages_tool/recharge/list')"
v-if="rechargeList.length">
<view class="item-wrap" v-for="(item, index) in rechargeList.slice(0, 4)" :key="index">
<view class="recharge">储值{{ parseFloat(item.buy_price) }}元</view>
<view class="point">可得{{ item.point }}积分</view>
<view class="btn">去储值</view>
<view class="recharge">{{ $lang('rechargeAmount', { price: parseFloat(item.buy_price) }) }}</view>
<view class="point">{{ $lang('earnPoints', { point: item.point }) }}</view>
<view class="btn">{{ $lang('goRecharge') }}</view>
</view>
</view>
@@ -91,7 +91,7 @@
<view class="point-exchange-wrap exchange-coupon" v-if="couponList.length > 0">
<view class="card-category-title">
<text class="before-line"></text>
<text>积分换券</text>
<text>{{ $lang('exchangeCoupon') }}</text>
<text class="after-line"></text>
</view>
@@ -110,30 +110,29 @@
<view class="coupon_left color-line-border">
<view class="price price-font">
<block v-if="couponItem.coupon_type == 'reward'">
<text>¥</text>
<text>{{ $lang('common.currencySymbol') }}</text>
{{ parseFloat(couponItem.money) }}
</block>
<block v-if="couponItem.coupon_type == 'discount'">
<block v-if="couponItem.coupon_type == 'discount'">
{{ parseFloat(couponItem.discount) }}<text>折</text>
{{ parseFloat(couponItem.discount) }}<text>{{ $lang('discountSuffix') }}</text>
</block>
</block>
</view>
<view class="coupon-info">
<view class="coupon_condition font-size-activity-tag">
{{ couponItem.at_least == 0 ? '无门槛优惠券' : '满' +
parseFloat(couponItem.at_least).toFixed(0) + '可用' }}
{{ couponItem.at_least == 0 ? $lang('noThresholdCoupon') : $lang('minSpendAvailable', { amount: parseFloat(couponItem.at_least).toFixed(0) }) }}
</view>
<view class="coupon_type font-size-activity-tag"
v-if="couponItem.goods_type == 1">全场券</view>
v-if="couponItem.goods_type == 1">{{ $lang('allStoreCoupon') }}</view>
<view class="coupon_type font-size-activity-tag"
v-else-if="couponItem.goods_type == 2 || couponItem.goods_type == 3">
指定券</view>
{{ $lang('designatedCoupon') }}</view>
</view>
</view>
<view class="coupon_right">
<view class="coupon_num font-size-tag">{{ couponItem.point }}积分</view>
<view class="coupon_btn">兑换</view>
<view class="coupon_num font-size-tag">{{ couponItem.point }}{{ $lang('points') }}</view>
<view class="coupon_btn">{{ $lang('exchange') }}</view>
</view>
</view>
</view>
@@ -145,7 +144,7 @@
<view class="point-exchange-wrap exchange-hongbao" v-if="hongbaoList.length > 0">
<view class="card-category-title">
<text class="before-line"></text>
<text>积分换红包</text>
<text>{{ $lang('exchangeHongbao') }}</text>
<text class="after-line"></text>
</view>
@@ -160,14 +159,14 @@
<view class="coupon hongbao">
<view class="coupon_left">
<view class="price price-font">
<text>¥</text>
<text>{{ $lang('common.currencySymbol') }}</text>
{{ parseFloat(hongbaoItem.balance).toFixed(0) }}
</view>
<!-- <view class="coupon_condition font-size-activity-tag">{{ hongbaoItem.name }}</view> -->
</view>
<view class="coupon_right">
<view class="coupon_num font-size-tag">{{ hongbaoItem.point }}积分</view>
<view class="coupon_btn">兑换</view>
<view class="coupon_num font-size-tag">{{ hongbaoItem.point }}{{ $lang('points') }}</view>
<view class="coupon_btn">{{ $lang('exchange') }}</view>
</view>
</view>
</view>
@@ -178,7 +177,7 @@
<view class="point-exchange-wrap" v-if="goodsList.length > 0">
<view class="card-category-title">
<text class="before-line"></text>
<text>积分换礼品</text>
<text>{{ $lang('exchangeGift') }}</text>
<text class="after-line"></text>
</view>
@@ -196,7 +195,7 @@
<view class="discount-price">
<view>
<text class="unit price-font point">{{ item.point }}</text>
<text class="unit font-size-tag ">积分</text>
<text class="unit font-size-tag ">{{ $lang('points') }}</text>
</view>
<block v-if="item.price > 0 && item.pay_type > 0">
<text class="unit font-size-tag">+</text>
@@ -204,17 +203,17 @@
<text class="font-size-tag">{{
parseFloat(item.price).toFixed(2).split(".")[0] }}</text>
<text class="unit font-size-tag">.{{
parseFloat(item.price).toFixed(2).split(".")[1] }}元</text>
parseFloat(item.price).toFixed(2).split(".")[1] }}{{ $lang('yuan') }}</text>
</view>
</block>
</view>
<view class="btn" @click="toDetail(item)">兑换</view>
<view class="btn" @click="toDetail(item)">{{ $lang('exchange') }}</view>
</view>
<view class="pro-info" v-if="item.stock_show || item.sale_show">
<view class="font-size-activity-tag color-tip" v-if="item.stock_show">
库存:{{ isNaN(parseInt(item.stock)) ? 0 : parseInt(item.stock) }}</view>
{{ $lang('stock') }}{{ isNaN(parseInt(item.stock)) ? 0 : parseInt(item.stock) }}</view>
<view class="font-size-activity-tag color-tip sale" v-if="item.sale_show">
已兑:{{ isNaN(parseInt(item.sale_num)) ? 0 : parseInt(item.sale_num) }}
{{ $lang('exchanged') }}{{ isNaN(parseInt(item.sale_num)) ? 0 : parseInt(item.sale_num) }}
</view>
</view>
</view>
@@ -231,20 +230,20 @@
<uni-popup ref="pointPopup" type="bottom">
<view class="tips-layer">
<view class="head" @click="closePointPopup()">
<view class="title">{{ isEnEnv ? 'Integral Description' : '积分说明' }}</view>
<view class="title">{{ $lang('pointDescription') }}</view>
<text class="iconfont icon-close"></text>
</view>
<view class="body">
<view class="detail margin-bottom">
<view class="tip">{{ isEnEnv ? 'Integral Acquisition' : '积分的获取' }}</view>
<view class="font-size-base">1、积分可在注册、签到、分享、消费、充值时获得。</view>
<view class="font-size-base">2、在购买部分商品时可获得积分。</view>
<view class="tip">{{ isEnEnv ? 'Integral Use' : '积分的使用' }}</view>
<view class="font-size-base">1、积分可用于兑换积分中心的商品。</view>
<view class="font-size-base">2、积分可在参与某些活动时使用。</view>
<view class="font-size-base">3、积分不得转让,出售,不设有效期。</view>
<view class="tip">{{ isEnEnv ? 'Integral Query' : '积分的查询' }}</view>
<view class="font-size-base">1、积分可在会员中心中查询具体数额以及明细。</view>
<view class="tip">{{ $lang('pointAcquisition') }}</view>
<view class="font-size-base">{{ $lang('acquisitionItem1') }}</view>
<view class="font-size-base">{{ $lang('acquisitionItem2') }}</view>
<view class="tip">{{ $lang('pointUsage') }}</view>
<view class="font-size-base">{{ $lang('usageItem1') }}</view>
<view class="font-size-base">{{ $lang('usageItem2') }}</view>
<view class="font-size-base">{{ $lang('usageItem3') }}</view>
<view class="tip">{{ $lang('pointQuery') }}</view>
<view class="font-size-base">{{ $lang('queryItem1') }}</view>
</view>
</view>
</view>
@@ -302,7 +301,7 @@ export default {
setTimeout(() => {
if (!this.addonIsExist.pointexchange) {
this.$util.showToast({
title: '商家未开启积分商城',
title: this.$lang('merchantNotEnabled'),
mask: true,
duration: 2000
});
@@ -580,7 +579,7 @@ export default {
}
} else {
this.$util.showToast({
title: '暂无相关活动'
title: this.$lang('noActivity')
});
}
}

View File

@@ -7,7 +7,7 @@
}">
<view class="nav-wrap">
<text class="iconfont icon-back_light" @click="back"></text>
<view class="navbar-title">确认订单</view>
<view class="navbar-title">{{ $lang('payment.title') }}</view>
</view>
</view>
<view class="payment-navbar-block" :style="{ height: menuButtonBounding.bottom + 'px' }"></view>
@@ -36,19 +36,19 @@
:class="{ 'not-delivery-type': orderPaymentData.delivery.express_type.length <= 1 }"
v-if="orderPaymentData.delivery.delivery_type != 'store'">
<block v-if="storeInfo.storeList.length > 1 && orderPaymentData.delivery.delivery_type == 'local'">
<view class="local-delivery-store" v-if="Object.keys(storeInfo.currStore).length"
@click="$refs.deliveryPopup.open()">
<view class="info">
由 <text class="store-name">{{ storeInfo.currStore.store_name }}</text> 提供配送
</view>
<view class="cell-more">
<text>点击切换</text>
<text class="iconfont icon-right"></text>
</view>
<view class="local-delivery-store" v-if="Object.keys(storeInfo.currStore).length"
@click="$refs.deliveryPopup.open()">
<view class="info">
{{ $lang('payment.localDelivery.providedBy') }}<text class="store-name">{{ storeInfo.currStore.store_name }}</text>{{ $lang('payment.localDelivery.deliveredBy') }}
</view>
<view class="cell-more">
<text>{{ $lang('payment.localDelivery.switchStore') }}</text>
<text class="iconfont icon-right"></text>
</view>
</view>
<view v-else class="local-delivery-store">
<view class="info">
<text class="store-name">您的附近没有可配送的门店,请选择其他配送方式</text>
<text class="store-name">{{ $lang('payment.localDelivery.noStoreNearby') }}</text>
</view>
</view>
</block>
@@ -69,7 +69,7 @@
</view>
</view>
<view class="empty-wrap" v-else @click="selectAddress">
<view class="info">请设置收货地址</view>
<view class="info">{{ $lang('payment.address.setAddress') }}</view>
<view class="cell-more">
<view class="iconfont icon-right"></view>
</view>
@@ -80,11 +80,11 @@
<view class="local-box"
v-if="orderPaymentData.config.local.is_use && orderPaymentData.delivery.local.info && orderPaymentData.delivery.local.info.time_is_open == 1">
<view class="pick-block" @click="localtime">
<view class="font-size-base">送达时间</view>
<view class="font-size-base">{{ $lang('payment.address.deliveryTime') }}</view>
<view class="time-picker">
<text :class="{ 'color-tip': !orderCreateData.buyer_ask_delivery_title }">{{
orderCreateData.buyer_ask_delivery_title ?
orderCreateData.buyer_ask_delivery_title : '请选择送达时间' }}</text>
orderCreateData.buyer_ask_delivery_title : $lang('payment.address.selectDeliveryTime') }}</text>
<text class="iconfont icon-right cell-more"></text>
</view>
</view>
@@ -106,8 +106,8 @@
</view>
<view class="store-detail">
<view v-if="storeInfo.currStore.open_date">
营业时间:{{ storeInfo.currStore.open_date }}</view>
<view>地址:{{ storeInfo.currStore.full_address }}
{{ $lang('payment.store.businessHours') }}{{ storeInfo.currStore.open_date }}</view>
<view>{{ $lang('payment.store.address') }}{{ storeInfo.currStore.full_address }}
{{ storeInfo.currStore.address }}
</view>
</view>
@@ -116,28 +116,28 @@
</view>
<view class="mobile-wrap store-mobile">
<view class="form-group">
<text class="text">姓名</text>
<text class="text">{{ $lang('payment.store.name') }}</text>
<input type="text" placeholder-class="color-tip placeholder" class="input"
v-model="member_address.name" disabled />
</view>
</view>
<view class="mobile-wrap store-mobile">
<view class="form-group">
<text class="text">预留手机</text>
<input type="number" maxlength="11" placeholder="请输入您的手机号码"
<text class="text">{{ $lang('payment.store.reservedMobile') }}</text>
<input type="number" maxlength="11" :placeholder="$lang('payment.store.mobilePlaceholder')"
placeholder-class="color-tip placeholder" class="input"
v-model="member_address.mobile" />
</view>
</view>
<view class="store-time">
<view class="left">自提时间</view>
<view class="left">{{ $lang('payment.store.pickupTime') }}</view>
<view class="right" @click="storetime">
{{ orderCreateData.buyer_ask_delivery_title }}
<text class="iconfont icon-right"></text>
</view>
</view>
</block>
<view v-else class="empty">当前无自提门店,请选择其它配送方式</view>
<view v-else class="empty">{{ $lang('payment.store.noPickupStore') }}</view>
<image class="address-line" :src="$util.img('public/uniapp/order/address-line.png')" show-menu-by-longpress></image>
</view>
@@ -147,12 +147,12 @@
<view class="mobile-wrap" v-if="orderPaymentData.is_virtual == 1 && orderCreateData.member_address">
<view class="tips color-base-text">
<text class="iconfont icon-gantanhao"></text>
购买虚拟类商品需填写手机号,方便商家与您联系
{{ $lang('payment.virtual.tips') }}
</view>
<view class="form-group">
<text class="iconfont icon-dianhua2"></text>
<text class="text">手机号码</text>
<input type="number" maxlength="11" placeholder="请输入您的手机号码"
<text class="text">{{ $lang('payment.virtual.mobile') }}</text>
<input type="number" maxlength="11" :placeholder="$lang('payment.virtual.mobilePlaceholder')"
placeholder-class="color-tip placeholder" class="input"
v-model="orderCreateData.member_address.mobile" />
</view>
@@ -185,10 +185,10 @@
</block>
<view class="goods-info">
<view class="goods-name">{{ orderPaymentData.exchange_info.name }}</view>
<view class="goods-sub-section">
<view v-if="orderPaymentData.exchange_info.pay_type == 1" class="color-base-text">
<text class="goods-price">{{ orderPaymentData.exchange_info.point }}</text>
<text class="unit">积分</text>
<view class="goods-sub-section">
<view v-if="orderPaymentData.exchange_info.pay_type == 1" class="color-base-text">
<text class="goods-price">{{ orderPaymentData.exchange_info.point }}</text>
<text class="unit">{{ $lang('payment.orderMoney.pointsSuffix') }}</text>
<template v-if="orderPaymentData.exchange_info.price != '0.00'">
<text class="unit">+{{ $lang('common.currencySymbol') }}</text>
<text class="goods-price">{{ orderPaymentData.exchange_info.price }}</text>
@@ -204,8 +204,8 @@
</view>
<view class="site-footer">
<view class="order-cell">
<text class="tit">买家留言</text>
<view class="box"><input type="text" placeholder="留言前建议先与商家协调一致" placeholder-class="color-tip"
<text class="tit">{{ $lang('payment.orderMoney.buyerMessage') }}</text>
<view class="box"><input type="text" :placeholder="$lang('payment.orderMoney.buyerMessagePlaceholder')" placeholder-class="color-tip"
v-model="orderCreateData.buyer_message" /></view>
</view>
</view>
@@ -214,15 +214,15 @@
<!-- 金额 -->
<view class="order-money">
<view class="order-cell">
<text class="tit">所需积分</text>
<text class="tit">{{ $lang('payment.orderMoney.pointsRequired') }}</text>
<view class="box">
<text class="money">{{ orderPaymentData.point }}</text>
<text class="unit">积分</text>
<text class="unit">{{ $lang('payment.orderMoney.pointsSuffix') }}</text>
</view>
</view>
<view class="order-cell"
v-if="orderPaymentData.exchange_info.type == 1 && orderPaymentData.delivery_money > 0">
<text class="tit">运费</text>
<text class="tit">{{ $lang('payment.orderMoney.shippingFee') }}</text>
<view class="box">
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
<text class="money">{{ orderPaymentData.delivery_money | moneyFormat }}</text>
@@ -237,10 +237,10 @@
</view>
<view class="order-submit" :class="{ 'bottom-safe-area': isIphoneX }">
<view class="order-settlement-info">
<text class="font-size-base color-tip margin-right">共{{ orderPaymentData.goods_num }}件</text>
<text class="font-size-base">合计:</text>
<text class="font-size-base color-tip margin-right">{{ $lang('payment.settlement.totalItems', { count: orderPaymentData.goods_num }) }}</text>
<text class="font-size-base">{{ $lang('payment.settlement.total') }}</text>
<text class="color-base-text money">{{ orderPaymentData.point }}</text>
<text class="color-base-text unit">积分</text>
<text class="color-base-text unit">{{ $lang('payment.settlement.pointsSuffix') }}</text>
<template v-if="orderPaymentData.exchange_info.type == 1 && orderPaymentData.order_money > 0">
<text class="color-base-text unit">+{{ $lang('common.currencySymbol') }}</text>
<text class="color-base-text money">{{ orderPaymentData.order_money | moneyFormat }}</text>
@@ -248,13 +248,13 @@
</view>
<view class="submit-btn">
<button v-if="createBtn()" type="primary" class="mini" size="mini"
@click="openChoosePayment()">提交订单</button>
@click="openChoosePayment()">{{ $lang('payment.settlement.submitOrder') }}</button>
<button v-else class="no-submit mini" size="mini">
<block
v-if="orderPaymentData.delivery && orderPaymentData.delivery.delivery_type == 'local' && orderPaymentData.delivery && orderPaymentData.delivery.error && orderPaymentData.delivery.start_money > orderPaymentData.price">
差{{ orderPaymentData.delivery.start_money - orderPaymentData.price | moneyFormat }}起送
{{ $lang('payment.settlement.shortByForMinimum', { amount: orderPaymentData.delivery.start_money - orderPaymentData.price | moneyFormat }) }}
</block>
<block v-else>提交订单</block>
<block v-else>{{ $lang('payment.settlement.submitOrder') }}</block>
</button>
</view>
</view>
@@ -264,7 +264,7 @@
<uni-popup ref="deliveryPopup" type="bottom">
<view class="delivery-popup popup">
<view class="popup-header">
<text class="tit">已为您甄选出附近所有相关门店</text>
<text class="tit">{{ $lang('payment.storePopup.title') }}</text>
<text class="iconfont icon-close" @click="closePopup('deliveryPopup')"></text>
</view>
<view class="popup-body store-popup" :class="{ 'safe-area': isIphoneX }">
@@ -281,19 +281,19 @@
<view
:class="item.store_id == orderPaymentData.delivery.store_id ? 'color-base-text' : ''"
class="font-size-goods-tag">
营业时间:{{ item.open_date }}
{{ $lang('payment.storePopup.businessHours') }}{{ item.open_date }}
</view>
<view
:class="item.store_id == orderPaymentData.delivery.store_id ? 'color-base-text' : ''"
class="font-size-goods-tag">
地址:{{ item.full_address }}{{ item.address }}
{{ $lang('payment.storePopup.address') }}{{ item.full_address }}{{ item.address }}
</view>
</view>
</view>
<view class="icon" v-if="item.store_id == orderPaymentData.delivery.store_id"><text
class="iconfont icon-yuan_checked color-base-text"></text></view>
</view>
<view v-if="!storeInfo.storeList" class="empty">所选择收货地址附近没有可以自提的门店</view>
<view v-if="!storeInfo.storeList" class="empty">{{ $lang('payment.storePopup.noStoreNearby') }}</view>
</view>
</view>
</view>

View File

@@ -1097,10 +1097,10 @@ _handleStreamError(msg) {
// 加载状态文字轮换 - 让AI看起来在处理不同阶段
_startLoadingTextRotation(loadingMsg) {
const statusTexts = [
'AI正在思考',
'AI正在分析',
'AI正在检索',
'AI正在生成'
this.$lang('aiThinkingStatus1'),
this.$lang('aiThinkingStatus2'),
this.$lang('aiThinkingStatus3'),
this.$lang('aiThinkingStatus4')
]
loadingMsg._rotationTimer = setInterval(() => {
loadingMsg._loadingIndex = (loadingMsg._loadingIndex + 1) % statusTexts.length
@@ -1426,7 +1426,7 @@ _handleStreamError(msg) {
}
this.isFetchingHistory = true;
this.isLoadingHistory = true;
this.loadingText = '加载历史消息中...';
this.loadingText = this.$lang('loadingHistory');
try {
const response = await aiService.getConversationHistory({
@@ -1480,7 +1480,7 @@ _handleStreamError(msg) {
} finally {
this.isLoadingHistory = false;
this.isFetchingHistory = false;
this.loadingText = '加载更多历史消息';
this.loadingText = this.$lang('loadMoreHistory');
}
},
// 显示更多工具
@@ -1688,7 +1688,7 @@ _handleStreamError(msg) {
try {
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(finalText).then(() => {
uni.showToast({ title: selectedText ? '已复制选中内容' : '已复制', icon: 'success' })
uni.showToast({ title: selectedText ? this.$lang('copySelected') : this.$lang('copySuccess'), icon: 'success' })
}).catch(() => {
this._fallbackCopyH5(finalText)
})

View File

@@ -388,29 +388,10 @@ export default {
id: Date.now(),
role: 'ai',
type: 'markdown',
content: `# 使用帮助
## 基本功能
- **发送消息**: 在输入框中输入文字后发送
- **语音输入**: 点击麦克风图标进行语音输入
- **附件发送**: 点击+号可以发送图片、文件、位置
## 消息类型
- **文本消息**: 普通文字对话
- **Markdown**: 支持格式化的文档内容
- **文件**: 支持各种文件格式预览
- **音频**: 支持语音消息播放
- **视频**: 支持视频播放
- **链接**: 支持网页链接跳转
- **商品**: 支持商品卡片展示
## 操作功能
- **点赞/踩**: 对AI回复进行评价
- **复制**: 长按消息可复制内容
- **转发**: 支持消息转发功能`,
content: this.$lang('helpContent'),
timestamp: Date.now()
};
this. $refs.chat.addMessage(helpMessage);
this.$refs.chat.addMessage(helpMessage);
},
onMessageSent(message) {
@@ -421,11 +402,11 @@ export default {
generateAIResponse(userMessage) {
const responses = [
'我理解您的需求,让我为您详细解答。',
'感谢您的提问,这是一个很好的问题。',
'根据您的问题,我建议您可以考虑以下几个方面:',
'这个问题很常见,让我为您提供一些解决方案。',
'我明白您的困惑,让我帮您分析一下。'
this.$lang('aiResponseTemplate1'),
this.$lang('aiResponseTemplate2'),
this.$lang('aiResponseTemplate3'),
this.$lang('aiResponseTemplate4'),
this.$lang('aiResponseTemplate5')
];
const randomResponse = responses[Math.floor(Math.random() * responses.length)];
@@ -434,7 +415,7 @@ export default {
id: Date.now(),
role: 'ai',
type: 'text',
content: ` $ {randomResponse}\n\n您的问题" $ {userMessage.content}"我已经收到,正在为您处理中...`,
content: `${randomResponse}\n\n${this.$lang('aiProcessingMessage', { question: userMessage.content })}`,
timestamp: Date.now(),
actions: [
{ type: 'like', count: 0 },
@@ -442,8 +423,8 @@ export default {
]
};
this. $refs.chat.addMessage(aiMessage);
this. $emit('ai-response', aiMessage);
this.$refs.chat.addMessage(aiMessage);
this.$emit('ai-response', aiMessage);
},
onActionClick({ action, message }) {
@@ -482,7 +463,11 @@ export default {
return
}
const productContent = `我想了解以下商品的详细信息:\n商品名称:${product.goods_name}\n价格:¥${product.price}\n商品ID:${product.goods_id}`
const productContent = this.$lang('productInquiryTemplate', {
name: product.goods_name,
price: product.price,
id: product.goods_id
})
// 使用sendMessageWithContent方法发送商品信息
this.$refs.chat.sendMessageWithContent(productContent)

View File

@@ -12,7 +12,7 @@
<view class="member-desc">
<view class="font-size-toolbar">{{ memberInfo.nickname }}</view>
<view class="font-size-tag expire-time" v-if="memberInfo.level_expire_time > 0">
有效期至:{{ $util.timeStampTurnTime(memberInfo.level_expire_time, true) }}
{{ $lang('validUntil') }}{{ $util.timeStampTurnTime(memberInfo.level_expire_time, true) }}
</view>
</view>
</view>
@@ -60,9 +60,9 @@
<view class="level-detail" :style="{ color: levelList[curIndex]['level_text_color'] }">
{{ levelList[curIndex].level_name }}</view>
<view class="growr-name" :style="{ color: levelList[curIndex]['level_text_color'] }">{{
levelList[curIndex].level_name }}可享受消费折扣和</view>
levelList[curIndex].level_name }}{{ $lang('enjoyDiscountAnd') }}</view>
<view class="growr-value" :style="{ color: levelList[curIndex]['level_text_color'] }">
会员大礼包等权益</view>
{{ $lang('memberGiftBenefits') }}</view>
<view class="growth-rules font-size-tag" @click="openExplainPopup"
v-if="levelList[curIndex].remark != ''">
<text class="iconfont icon-wenhao font-size-tag"></text>
@@ -78,7 +78,7 @@
<view class="line-box">
<view class="line right"></view>
</view>
<view class="card-content-title">卡种选择</view>
<view class="card-content-title">{{ $lang('cardTypeSelection') }}</view>
<view class="line-box">
<view class="line"></view>
</view>
@@ -107,7 +107,7 @@
<view class="line-box">
<view class="line right"></view>
</view>
<view class="card-content-title">会员权益</view>
<view class="card-content-title">{{ $lang('memberBenefits') }}</view>
<view class="line-box">
<view class="line"></view>
</view>
@@ -118,18 +118,18 @@
<view class="card-privilege-icon">
<text class="iconfont icon-tedianquanchangbaoyou"></text>
</view>
<view class="card-privilege-name">全场包邮</view>
<view class="card-privilege-text">享受商品包邮服务</view>
<view class="card-privilege-name">{{ $lang('freeShipping') }}</view>
<view class="card-privilege-text">{{ $lang('enjoyFreeShipping') }}</view>
</view>
<view class="card-privilege-item" v-if="currCard.consume_discount < 100">
<view class="card-privilege-icon"><text class="iconfont icon-zhekou"></text></view>
<view class="card-privilege-name">消费折扣</view>
<view class="card-privilege-text">部分商品下单可享{{ currCard.consume_discount / 10 }}折优惠</view>
<view class="card-privilege-name">{{ $lang('consumptionDiscount') }}</view>
<view class="card-privilege-text">{{ $lang('enjoyDiscountOnSomeProducts', { discount: currCard.consume_discount / 10 }) }}</view>
</view>
<view class="card-privilege-item" v-if="currCard.point_feedback > 0">
<view class="card-privilege-icon"><text class="iconfont icon-jifen2 f32"></text></view>
<view class="card-privilege-name">积分回馈</view>
<view class="card-privilege-text">下单享{{ parseFloat(currCard.point_feedback) }}倍积分回馈</view>
<view class="card-privilege-name">{{ $lang('pointsReward') }}</view>
<view class="card-privilege-text">{{ $lang('earnPointsMultiplier', { multiplier: parseFloat(currCard.point_feedback) }) }}</view>
</view>
</view>
@@ -138,7 +138,7 @@
<view class="line-box">
<view class="line right"></view>
</view>
<view class="card-content-title">开卡礼包</view>
<view class="card-content-title">{{ $lang('welcomeGift') }}</view>
<view class="line-box">
<view class="line"></view>
</view>
@@ -147,18 +147,18 @@
<view class="card-privilege-list">
<view class="card-privilege-item" v-if="currCard.send_point > 0">
<view class="card-privilege-icon"><text class="iconfont icon-jifen3"></text></view>
<view class="card-privilege-name">积分礼包</view>
<view class="card-privilege-text">赠送{{ currCard.send_point }}积分</view>
<view class="card-privilege-name">{{ $lang('pointsGift') }}</view>
<view class="card-privilege-text">{{ $lang('giftPoints', { points: currCard.send_point }) }}</view>
</view>
<view class="card-privilege-item" v-if="currCard.send_balance > 0">
<view class="card-privilege-icon"><text class="iconfont icon-hongbao"></text></view>
<view class="card-privilege-name">红包礼包</view>
<view class="card-privilege-text">赠送{{ parseFloat(currCard.send_balance) }}元红包</view>
<view class="card-privilege-name">{{ $lang('redPacketGift') }}</view>
<view class="card-privilege-text">{{ $lang('giftRedPacket', { amount: parseFloat(currCard.send_balance) }) }}</view>
</view>
<view class="card-privilege-item" v-if="currCard.send_coupon != ''">
<view class="card-privilege-icon"><text class="iconfont icon-youhuiquan1"></text></view>
<view class="card-privilege-name">优惠券礼包</view>
<view class="card-privilege-text">赠送{{ currCard.send_coupon.split(',').length }}张优惠券
<view class="card-privilege-name">{{ $lang('couponGift') }}</view>
<view class="card-privilege-text">{{ $lang('giftCoupons', { count: currCard.send_coupon.split(',').length }) }}
</view>
</view>
</view>
@@ -170,17 +170,17 @@
</view>
<view class="action" :class="{ 'bottom-safe-area': isIphoneX, 'have-agreement': agreement }">
<view class="action-btn" @click="create">
<block v-if="currCard.level_id == levelId"><text class="bold title">立即续费</text></block>
<block v-if="currCard.level_id == levelId"><text class="bold title">{{ $lang('renewNow') }}</text></block>
<block v-else>
<text class="bold title" v-if="currCard.charge_type == 1">充值开通</text>
<text class="bold title" v-else>立即开通</text>
<text class="bold title" v-if="currCard.charge_type == 1">{{ $lang('rechargeToActivate') }}</text>
<text class="bold title" v-else>{{ $lang('activateNow') }}</text>
</block>
<text class="font-size-tag">{{ $lang('common.currencySymbol') }}</text>
<text class="bold">{{ currCard.charge_rule_arr[choiceIndex].value }}</text>
<text>/{{ cardType[currCard.charge_rule_arr[choiceIndex].key].unit }}</text>
</view>
<view class="agreement" v-if="agreement">
购买既视为同意
{{ $lang('purchaseAgreement') }}
<text @click="$util.redirectTo('/pages_tool/member/card_agreement')">《{{ agreement.title
}}》</text>
</view>
@@ -193,13 +193,13 @@
<uni-popup ref="explainPopup" type="bottom">
<view class="tips-layer">
<view class="head" @click="closeExplainPopup()">
<view class="title">会员卡说明</view>
<view class="title">{{ $lang('cardDescription') }}</view>
<text class="iconfont icon-close"></text>
</view>
<view class="body">
<view class="detail margin-bottom">
<block v-if="currCard.remark != ''">
<view class="tip">会员卡说明</view>
<view class="tip">{{ $lang('cardDescription') }}</view>
<view class="font-size-base">{{ currCard.remark }}</view>
</block>
</view>
@@ -211,7 +211,7 @@
<ns-payment ref="choosePaymentPopup" :payMoney="currCard.charge_rule_arr[choiceIndex].value"
@confirm="toPay" v-if="currCard.charge_rule_arr.length"></ns-payment>
</block>
<block v-else><ns-empty text="暂无可开会员卡" :isIndex="false"></ns-empty></block>
<block v-else><ns-empty :text="$lang('noCardsAvailable')" :isIndex="false"></ns-empty></block>
<ns-login ref="login"></ns-login>
<loading-cover ref="loadingCover"></loading-cover>
@@ -246,24 +246,6 @@ export default {
},
levelList: [],
levelId: 0,
cardType: {
week: {
name: '周卡',
unit: '周'
},
month: {
name: '月卡',
unit: '月'
},
quarter: {
name: '季卡',
unit: '季'
},
year: {
name: '年卡',
unit: '年'
}
},
choiceIndex: 0,
outTradeNo: '',
agreement: null
@@ -273,6 +255,26 @@ export default {
listLen() {
return this.levelList.length;
},
cardType() {
return {
week: {
name: this.$lang('weekCardName'),
unit: this.$lang('weekCardUnit')
},
month: {
name: this.$lang('monthCardName'),
unit: this.$lang('monthCardUnit')
},
quarter: {
name: this.$lang('quarterCardName'),
unit: this.$lang('quarterCardUnit')
},
year: {
name: this.$lang('yearCardName'),
unit: this.$lang('yearCardUnit')
}
};
},
currCard() {
if (this.levelList[this.curIndex]) {
let card = this.levelList[this.curIndex];
@@ -349,8 +351,8 @@ export default {
create() {
if (this.memberInfo.member_level_type && this.memberInfo.member_level != this.currCard.level_id) {
uni.showModal({
title: '提示',
content: '您有尚未过期的会员卡,再次购卡会覆盖掉之前的卡,是否继续?',
title: this.$lang('common.tip'),
content: this.$lang('cardOverrideConfirm'),
success: res => {
if (res.confirm) {
this.$refs.choosePaymentPopup.open();

View File

@@ -4,38 +4,38 @@
<!-- 修改用户名 -->
<view v-if="indent == 'username'" class="edit-info">
<view class="edit-info-box">
<text class="info-name">用户名</text>
<input class="uni-input info-content input-len" type="text" maxlength="30" placeholder="请输入" v-model="formData.username" />
<text class="info-name">{{ $lang('username') }}</text>
<input class="uni-input info-content input-len" type="text" maxlength="30" :placeholder="$lang('pleaseInput')" v-model="formData.username" />
</view>
<view class="color-tip font-size-goods-tag set-pass-tips">用户名仅可修改一次,请谨慎设置</view>
<view class="color-tip font-size-goods-tag set-pass-tips">{{ $lang('usernameModifyTip') }}</view>
<view class="save-item" @click="save('username')">
<button type="primary">保存</button>
<button type="primary">{{ $lang('save') }}</button>
</view>
</view>
<!-- 修改昵称 -->
<view v-if="indent == 'name'" class="edit-info">
<view class="edit-info-box">
<text class="info-name">昵称</text>
<input class="uni-input info-content input-len" type="text" maxlength="30" placeholder="请输入" v-model="formData.nickName" />
<text class="info-name">{{ $lang('nickname') }}</text>
<input class="uni-input info-content input-len" type="text" maxlength="30" :placeholder="$lang('pleaseInput')" v-model="formData.nickName" />
</view>
<view class="save-item" @click="save('name')">
<button type="primary">保存</button>
<button type="primary">{{ $lang('save') }}</button>
</view>
</view>
<!-- 修改真实姓名 -->
<view v-if="indent == 'realName'" class="edit-info">
<view class="edit-info-box">
<text class="info-name">姓名</text>
<input class="uni-input info-content input-len" type="text" maxlength="30" placeholder="请输入" v-model="formData.realName" />
<text class="info-name">{{ $lang('realName') }}</text>
<input class="uni-input info-content input-len" type="text" maxlength="30" :placeholder="$lang('pleaseInput')" v-model="formData.realName" />
</view>
<view class="save-item" @click="save('realName')">
<button type="primary">保存</button>
<button type="primary">{{ $lang('save') }}</button>
</view>
</view>
<!-- 修改性别 -->
<view v-if="indent == 'sex'" class="edit-info">
<view class="edit-info-box">
<text class="info-name">性别</text>
<text class="info-name">{{ $lang('sex') }}</text>
<radio-group @change="radioChange" class="edit-sex-list">
<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">
<view>
@@ -46,19 +46,19 @@
</radio-group>
</view>
<view class="save-item" @click="save('sex')">
<button type="primary">保存</button>
<button type="primary">{{ $lang('save') }}</button>
</view>
</view>
<!-- 修改生日 -->
<view v-if="indent == 'birthday'" class="edit-info edit-birthday-list">
<view class="edit-info-box">
<text class="info-name">生日</text>
<text class="info-name">{{ $lang('birthday') }}</text>
<picker mode="date" :value="formData.birthday" :start="startDate" :end="endDate" @change="bindDateChange">
<view class="uni-input">{{ formData.birthday ? formData.birthday : '请选择生日' }}</view>
<view class="uni-input">{{ formData.birthday ? formData.birthday : $lang('pleaseSelectBirthday') }}</view>
</picker>
</view>
<view class="save-item" @click="save('birthday')">
<button type="primary">保存</button>
<button type="primary">{{ $lang('save') }}</button>
</view>
</view>
<!-- 修改密码 -->
@@ -68,87 +68,87 @@
<view class="empty_img">
<image :src="$util.img('public/uniapp/common/common-empty.png')" mode="aspectFit" show-menu-by-longpress></image>
</view>
<view class="color-tip margin-top margin-bottom">请先绑定手机再执行该操作</view>
<button type="primary" size="mini" class="mini button color-base-bg" @click="modifyInfo('mobile')">立即绑定</button>
<view class="color-tip margin-top margin-bottom">{{ $lang('bindMobileFirstTip') }}</view>
<button type="primary" size="mini" class="mini button color-base-bg" @click="modifyInfo('mobile')">{{ $lang('bindNow') }}</button>
</view>
</block>
<block v-else>
<view class="edit-info-box" v-if="memberInfo.password">
<text class="info-name">原密码</text>
<input class="uni-input info-content input-len" type="password" maxlength="30" placeholder="请输入" v-model="formData.currentPassword" />
<text class="info-name">{{ $lang('nowPassword') }}</text>
<input class="uni-input info-content input-len" type="password" maxlength="30" :placeholder="$lang('pleaseInput')" v-model="formData.currentPassword" />
</view>
<block v-else>
<view class="edit-info-box">
<text class="info-name">新密码</text>
<input class="uni-input info-content" type="number" maxlength="4" placeholder="请输入" v-model="formData.mobileVercode" />
<text class="info-name">{{ $lang('newPassword') }}</text>
<input class="uni-input info-content" type="number" maxlength="4" :placeholder="$lang('pleaseInput')" v-model="formData.mobileVercode" />
<image :src="captcha.img" class="captcha" @click="getCaptcha" show-menu-by-longpress></image>
</view>
<view class="edit-info-box">
<text class="info-name">再次输入</text>
<input class="uni-input info-content" type="number" maxlength="6" placeholder="请输入" v-model="formData.mobileDynacode" />
<text class="info-name">{{ $lang('confirmPassword') }}</text>
<input class="uni-input info-content" type="number" maxlength="6" :placeholder="$lang('pleaseInput')" v-model="formData.mobileDynacode" />
<button type="primary" class="dynacode" @click="passwordMoblieCode()">{{ formData.mobileCodeText }}</button>
</view>
<view class="color-tip font-size-goods-tag set-pass-tips">
点击“获取动态码”,将会向您已绑定的手机号{{ memberInfoformData.mobile | mobile }}发送验证码</view>
{{ $lang('sendCodeTip', { mobile: memberInfoformData.mobile | mobile }) }}</view>
</block>
<view class="edit-info-box">
<text class="info-name">新密码</text>
<input class="uni-input info-content input-len" type="password" maxlength="30" placeholder="请输入" v-model="formData.newPassword" />
<text class="info-name">{{ $lang('newPassword') }}</text>
<input class="uni-input info-content input-len" type="password" maxlength="30" :placeholder="$lang('pleaseInput')" v-model="formData.newPassword" />
</view>
<view class="edit-info-box">
<text class="info-name">再次输入</text>
<input class="uni-input info-content input-len" type="password" maxlength="30" placeholder="请输入" v-model="formData.confirmPassword" />
<text class="info-name">{{ $lang('confirmPassword') }}</text>
<input class="uni-input info-content input-len" type="password" maxlength="30" :placeholder="$lang('pleaseInput')" v-model="formData.confirmPassword" />
</view>
<view class="save-item" @click="save('password')">
<button type="primary">保存</button>
<button type="primary">{{ $lang('save') }}</button>
</view>
</block>
</view>
<!-- 修改手机号 -->
<view v-if="indent == 'mobile'" class="edit-info">
<view class="edit-info-box">
<text class="info-name">手机号</text>
<input class="uni-input info-content" type="number" maxlength="11" placeholder="请输入" v-model="formData.mobile" />
<text class="info-name">{{ $lang('phoneNumber') }}</text>
<input class="uni-input info-content" type="number" maxlength="11" :placeholder="$lang('pleaseInput')" v-model="formData.mobile" />
</view>
<view class="edit-info-box">
<text class="info-name">验证码</text>
<input class="uni-input info-content" type="number" maxlength="4" placeholder="请输入" v-model="formData.mobileVercode" />
<text class="info-name">{{ $lang('confirmCode') }}</text>
<input class="uni-input info-content" type="number" maxlength="4" :placeholder="$lang('pleaseInput')" v-model="formData.mobileVercode" />
<image :src="captcha.img" class="captcha" @click="getCaptcha" show-menu-by-longpress></image>
</view>
<view class="edit-info-box">
<text class="info-name">短信验证码</text>
<input class="uni-input info-content" type="number" maxlength="6" placeholder="请输入" v-model="formData.mobileDynacode" />
<text class="info-name">{{ $lang('smsCode') }}</text>
<input class="uni-input info-content" type="number" maxlength="6" :placeholder="$lang('pleaseInput')" v-model="formData.mobileDynacode" />
<button type="primary" class="dynacode" @click="bindMoblieCode()">{{ formData.mobileCodeText }}</button>
</view>
<view class="save-item" @click="save('mobile')">
<button type="primary">保存</button>
<button type="primary">{{ $lang('save') }}</button>
</view>
</view>
<!-- 绑定手机号 -->
<view v-if="indent == 'bind_mobile'" class="edit-info">
<view class="save-item bind-mobile">
<button type="primary" open-type="getPhoneNumber" @getphonenumber="mobileAuth">一键授权绑定</button>
<button type="primary" open-type="getPhoneNumber" @getphonenumber="mobileAuth">{{ $lang('oneClickAuthBind') }}</button>
</view>
<view class="save-item bind-mobile">
<button type="primary" @click="manualBinding">手动绑定</button>
<button type="primary" @click="manualBinding">{{ $lang('manualBind') }}</button>
</view>
</view>
<view v-if="indent == 'address'" class="edit-info">
<view class="edit-info-box">
<text class="info-name">所在地区</text>
<text class="info-name">{{ $lang('region') }}</text>
<pick-regions :default-regions="defaultRegions" select-arr="3" @getRegions="handleGetRegions">
<text class="select-address " :class="{'color-tip': !formData.fullAddress }">
{{ formData.fullAddress ? formData.fullAddress : '请选择省市区县' }}
{{ formData.fullAddress ? formData.fullAddress : $lang('pleaseSelectRegion') }}
</text>
</pick-regions>
</view>
<view class="edit-info-box">
<text class="info-name">详细地址</text>
<input class="uni-input info-content" type="text" placeholder="详细地址" v-model="formData.address" />
<text class="info-name">{{ $lang('detailAddress') }}</text>
<input class="uni-input info-content" type="text" :placeholder="$lang('detailAddress')" v-model="formData.address" />
</view>
<view class="save-item" @click="save('address')">
<button type="primary">保存</button>
<button type="primary">{{ $lang('save') }}</button>
</view>
</view>
</template>

View File

@@ -7,17 +7,17 @@
<view class="desc" @click="openRulePopup" v-if="info.remark != ''">
<text class="iconfont icon-bangzhu"></text>
活动说明
{{ $lang('activityDescription') }}
</view>
<image class="font" :src="$util.img('public/uniapp/member/invite/top_font.png')" mode="widthFix" show-menu-by-longpress />
<view class="time">
活动时间:{{ $util.timeStampTurnTime(info.start_time, 1) }}至{{ $util.timeStampTurnTime(info.end_time, 1) }}
{{ $lang('activityTime', { startTime: $util.timeStampTurnTime(info.start_time, 1), endTime: $util.timeStampTurnTime(info.end_time, 1) }) }}
</view>
<view class="btn" :style="{ 'background-image': 'url(' + $util.img('public/uniapp/member/invite/top_btn.png') + ')' }" @click="openSharePopup">立即邀请</view>
<view class="btn" :style="{ 'background-image': 'url(' + $util.img('public/uniapp/member/invite/top_btn.png') + ')' }" @click="openSharePopup">{{ $lang('inviteNow') }}</view>
</view>
<view class="content invite-list">
<view class="title">我的好友</view>
<view class="title">{{ $lang('myFriends') }}</view>
<block v-if="inviteList.length > 0">
<view class="invitelist_block">
<view class="invitelist">
@@ -33,32 +33,32 @@
</view>
</view>
<view class="prize color-base-text font-size-activity-tag">
<block v-if="item.balance > 0">{{ item.balance }}元现金红包</block>
<block v-if="(item.point > 0 || item.coupon_num) && item.balance > 0">+</block>
<block v-if="item.point > 0">{{ parseInt(item.point) }}积分</block>
<block v-if="item.point > 0 && item.balance > 0 && item.coupon_num > 0">+
</block>
<block v-if="item.coupon_num > 0">{{ item.coupon_num }}张优惠券</block>
</view>
<block v-if="item.balance > 0">{{ $lang('cashRedPacketAmount', { amount: item.balance }) }}</block>
<block v-if="(item.point > 0 || item.coupon_num) && item.balance > 0">+</block>
<block v-if="item.point > 0">{{ $lang('pointsAmount', { amount: parseInt(item.point) }) }}</block>
<block v-if="item.point > 0 && item.balance > 0 && item.coupon_num > 0">+
</block>
<block v-if="item.coupon_num > 0">{{ $lang('couponsAmount', { count: item.coupon_num }) }}</block>
</view>
</view>
</view>
</view>
<view class="more_invite color-tip font-size-tag " @click="moreList" v-if="isClick && total_num > page">
查看更多
{{ $lang('viewMore') }}
<text class="iconfont icon-iconangledown"></text>
</view>
<view class="more_invite color-tip font-size-tag " @click="moreList" v-if="!isClick && inviteList.length > 5 && total_num <= page">没有更多数据了</view>
<view class="more_invite color-tip font-size-tag " @click="moreList" v-if="!isClick && inviteList.length > 5 && total_num <= page">{{ $lang('noMoreData') }}</view>
</view>
</block>
<block v-else>
<view class="empty">
<view class="tip">您还没有邀请到新朋友哦</view>
<view class="tip">邀请好友,赚取好礼。赶紧去试试吧~</view>
<view class="tip">{{ $lang('noInvitedFriendsTip') }}</view>
<view class="tip">{{ $lang('inviteTip') }}</view>
</view>
</block>
</view>
<view class="content">
<view class="title">邀请好友奖励</view>
<view class="title">{{ $lang('inviteRewards') }}</view>
<view class="invite_active">
<view class="list">
<view class="item" v-if="$util.inArray('balance', info.type) != -1">
@@ -68,7 +68,7 @@
<text class="font-size-base">{{ $lang('common.currencySymbol') }}</text>
<text>{{ info.balance }}</text>
</view>
<view class="type">现金红包</view>
<view class="type">{{ $lang('cashRedPacket') }}</view>
</view>
</view>
@@ -78,7 +78,7 @@
<view class="price">
<text>{{ parseInt(info.point) }}</text>
</view>
<view class="type">积分</view>
<view class="type">{{ $lang('points') }}</view>
</view>
</view>
@@ -88,49 +88,49 @@
<view class="desc">
<view class="price">
<text>{{ info.coupon.split(',').length }}</text>
张
{{ $lang('couponUnit') }}
</view>
<view class="type">优惠券</view>
<view class="type">{{ $lang('coupon') }}</view>
</view>
</view>
</view>
<view class="desc">
<view class="title_desc color-tip">分享给好友,让好友通过你的分享链接进入并注册登录,可获得以下奖励:</view>
<view class="title_desc color-tip">{{ $lang('shareDesc') }}</view>
<view class="desc_list">
<view class="" v-if="$util.inArray('balance', info.type) != -1">
<text>●</text>
可得{{ info.balance }}元红包奖励
{{ $lang('balanceReward', { amount: info.balance }) }}
</view>
<view class="" v-if="$util.inArray('point', info.type) != -1">
<text>●</text>
可得{{ info.point }}积分
{{ $lang('pointReward', { amount: info.point }) }}
</view>
<view class="" v-if="$util.inArray('coupon', info.type) != -1">
<text>●</text>
可得{{ info.coupon.split(',').length }}张优惠券
{{ $lang('couponReward', { count: info.coupon.split(',').length }) }}
</view>
<view class="" v-if="info.max_fetch == 0">
<text>●</text>
可得奖励不受限制
{{ $lang('unlimitedReward') }}
</view>
<view class="" v-else>
<text>●</text>
奖励上限为{{ info.max_fetch }}人
{{ $lang('rewardLimit', { max: info.max_fetch }) }}
</view>
</view>
</view>
</view>
</view>
<view class="content">
<view class="title">如何邀请好友</view>
<view class="title">{{ $lang('howToInvite') }}</view>
<view class="invite_active">
<view class="step">
<view>
<view class="img">
<image :src="$util.img('public/uniapp/member/invite/fenxiang.png')" mode="aspectFit" show-menu-by-longpress />
</view>
<view class="text">分享链接给好友</view>
<view class="text">{{ $lang('stepShareLink') }}</view>
</view>
<view>
<image :src="$util.img('public/uniapp/member/invite/jiantou.png')" class="jiantou" show-menu-by-longpress ></image>
@@ -139,7 +139,7 @@
<view class="img">
<image :src="$util.img('public/uniapp/member/invite/shouji.png')" mode="aspectFit" show-menu-by-longpress />
</view>
<view class="text">好友进入</view>
<view class="text">{{ $lang('stepFriendEnter') }}</view>
</view>
<view>
<image :src="$util.img('public/uniapp/member/invite/jiantou.png')" class="jiantou" show-menu-by-longpress ></image>
@@ -148,7 +148,7 @@
<view class="img">
<image :src="$util.img('public/uniapp/member/invite/hongbao.png')" mode="aspectFit" show-menu-by-longpress />
</view>
<view class="text">好友注册成功获得奖励</view>
<view class="text">{{ $lang('stepFriendRegister') }}</view>
</view>
</view>
</view>
@@ -163,10 +163,10 @@
<image :src="$util.img(poster)" mode="widthFix" show-menu-by-longpress />
</view>
<!-- #ifdef MP || APP-PLUS -->
<view class="save" @click="savePoster()">保存图片</view>
<view class="save" @click="savePoster()">{{ $lang('saveImage') }}</view>
<!-- #endif -->
<!-- #ifdef H5 -->
<view class="save">长按保存图片</view>
<view class="save">{{ $lang('longPressSaveImage') }}</view>
<!-- #endif -->
</view>
<view class="close iconfont icon-close" @click="closePosterPopup()"></view>
@@ -179,32 +179,32 @@
<view @touchmove.prevent.stop>
<uni-popup ref="sharePopup" type="bottom" class="share-popup">
<view>
<view class="share-title">分享</view>
<view class="share-title">{{ $lang('share') }}</view>
<view class="share-content">
<!-- #ifdef MP -->
<view class="share-box">
<button class="share-btn" :plain="true" open-type="share">
<view class="iconfont icon-share-friend"></view>
<text>分享给好友</text>
<text>{{ $lang('shareToFriends') }}</text>
</button>
</view>
<!-- #endif -->
<view class="share-box" @click="openPosterPopup">
<button class="share-btn" :plain="true">
<view class="iconfont icon-pengyouquan"></view>
<text>生成分享海报</text>
<text>{{ $lang('generatePoster') }}</text>
</button>
</view>
<!-- #ifdef H5 -->
<view class="share-box" @click="copyUrl">
<button class="share-btn" :plain="true">
<view class="iconfont icon-fuzhilianjie"></view>
<text>复制链接</text>
<text>{{ $lang('copyLink') }}</text>
</button>
</view>
<!-- #endif -->
</view>
<view class="share-footer" @click="closeSharePopup"><text>取消分享</text></view>
<view class="share-footer" @click="closeSharePopup"><text>{{ $lang('cancelShare') }}</text></view>
</view>
</uni-popup>
</view>
@@ -214,7 +214,7 @@
<uni-popup ref="rulePopup" type="bottom">
<view class="tips-layer">
<view class="head" @click="closeRulePopup()">
<view class="title">活动说明</view>
<view class="title">{{ $lang('activityDescription') }}</view>
<text class="iconfont icon-close"></text>
</view>
<view class="body">
@@ -224,7 +224,7 @@
</uni-popup>
</view>
</view>
<ns-empty v-else text="暂无相关数据"></ns-empty>
<ns-empty v-else :text="$lang('noData')"></ns-empty>
<ns-login ref="login"></ns-login>
<loading-cover ref="loadingCover"></loading-cover>
</view>

View File

@@ -53,20 +53,7 @@ export default {
img: ''
},
isIphoneX: false,
items: [{
value: '0',
name: '未知'
},
{
value: '1',
name: '男',
checked: 'true'
},
{
value: '2',
name: '女'
}
],
items: [],
current: 0,
memberConfig: {
is_audit: 0,
@@ -95,6 +82,7 @@ export default {
}
this.getRegisterConfig();
this.initSexItems();
this.initLang();
this.getMemberConfig();
},
@@ -109,7 +97,7 @@ export default {
},
onHide() {
this.seconds = 120;
this.formData.mobileCodeText = '获取动态码';
this.formData.mobileCodeText = this.$lang('findanimateCode');
this.isSend = false;
clearInterval(this.timer);
},
@@ -117,7 +105,7 @@ export default {
seconds(value) {
if (value == 0) {
this.seconds = 120;
this.formData.mobileCodeText = '获取动态码';
this.formData.mobileCodeText = this.$lang('findanimateCode');
this.isSend = false;
clearInterval(this.timer);
}
@@ -138,6 +126,23 @@ export default {
},
methods: {
...memberPublic.methods,
// 初始化性别选项
initSexItems() {
this.items = [{
value: '0',
name: this.$lang('sexUnknown')
},
{
value: '1',
name: this.$lang('sexMale'),
checked: 'true'
},
{
value: '2',
name: this.$lang('sexFemale')
}
];
},
// 初始化语言
initLang() {
//获取语言列表
@@ -182,9 +187,9 @@ export default {
this.memberInfoformData.userHeadImg = this.memberInfo.headimg;
this.memberInfoformData.number = this.memberInfo.username; //账号
this.memberInfoformData.nickName = this.memberInfo.nickname; //昵称
this.memberInfoformData.realName = this.memberInfo.realname ? this.memberInfo.realname : '请输入真实姓名'; //真实姓名
this.memberInfoformData.sex = this.memberInfo.sex == 0 ? '未知' : this.memberInfo.sex == 1 ? '男' : '女'; //性别
this.memberInfoformData.birthday = this.memberInfo.birthday ? this.$util.timeStampTurnTime(this.memberInfo.birthday, 'YYYY-MM-DD') : '请选择生日'; //生日
this.memberInfoformData.realName = this.memberInfo.realname ? this.memberInfo.realname : this.$lang('pleaseRealName'); //真实姓名
this.memberInfoformData.sex = this.memberInfo.sex == 0 ? this.$lang('sexUnknown') : this.memberInfo.sex == 1 ? this.$lang('sexMale') : this.$lang('sexFemale'); //性别
this.memberInfoformData.birthday = this.memberInfo.birthday ? this.$util.timeStampTurnTime(this.memberInfo.birthday, 'YYYY-MM-DD') : this.$lang('pleaseSelectBirthday'); //生日
this.memberInfoformData.mobile = this.memberInfo.mobile; //手机号
this.formData.username = this.memberInfo.username; //用户名
@@ -399,14 +404,14 @@ export default {
modifyRealName() {
if (this.formData.realName == this.memberInfo.realname && this.memberInfo.realname) {
this.$util.showToast({
title: '与原真实姓名一致,无需修改'
title: this.$lang('alikeRealName')
});
return;
}
var rule = [{
name: 'realName',
checkType: 'required',
errorMsg: '真实姓名不能为空'
errorMsg: this.$lang('noEmptyRealName')
}];
if (!rule.length) return;
var checkRes = validate.check(this.formData, rule);
@@ -496,7 +501,7 @@ export default {
modifyBirthday() {
if (this.formData.birthday.length == 0) {
this.$util.showToast({
title: '请选择生日'
title: this.$lang('pleaseSelectBirthday')
});
return;
}
@@ -574,27 +579,32 @@ export default {
name: 'newPassword',
checkType: 'lengthMin',
checkRule: regConfig.pwd_len,
errorMsg: '新密码长度不能小于' + regConfig.pwd_len + '位'
errorMsg: this.$lang('passwordMinLength', { num: regConfig.pwd_len })
});
}
if (regConfig.pwd_complexity) {
let passwordErrorMsg = '密码需包含',
let passwordErrorMsg = this.$lang('passwordComplexityPrefix'),
reg = '';
let firstItem = true;
if (regConfig.pwd_complexity.indexOf('number') != -1) {
reg += '(?=.*?[0-9])';
passwordErrorMsg += '数字';
passwordErrorMsg += (firstItem ? '' : this.$lang('passwordSeparator')) + this.$lang('passwordNumber');
firstItem = false;
}
if (regConfig.pwd_complexity.indexOf('letter') != -1) {
reg += '(?=.*?[a-z])';
passwordErrorMsg += '、小写字母';
passwordErrorMsg += (firstItem ? '' : this.$lang('passwordSeparator')) + this.$lang('passwordLowercase');
firstItem = false;
}
if (regConfig.pwd_complexity.indexOf('upper_case') != -1) {
reg += '(?=.*?[A-Z])';
passwordErrorMsg += '、大写字母';
passwordErrorMsg += (firstItem ? '' : this.$lang('passwordSeparator')) + this.$lang('passwordUppercase');
firstItem = false;
}
if (regConfig.pwd_complexity.indexOf('symbol') != -1) {
reg += '(?=.*?[#?!@$%^&*-])';
passwordErrorMsg += '、特殊字符';
passwordErrorMsg += (firstItem ? '' : this.$lang('passwordSeparator')) + this.$lang('passwordSymbol');
firstItem = false;
}
rule.push({
name: 'newPassword',
@@ -607,13 +617,13 @@ export default {
if (checkRes) {
if (this.formData.currentPassword == this.formData.newPassword) {
this.$util.showToast({
title: '新密码不能与原密码相同'
title: this.$lang('samePassword')
});
return;
}
if (this.formData.newPassword != this.formData.confirmPassword) {
this.$util.showToast({
title: '两次密码不一致'
title: this.$lang('alikePassword')
});
return;
}
@@ -655,11 +665,11 @@ export default {
var rule = [{
name: 'mobile',
checkType: 'required',
errorMsg: '请输入手机号'
errorMsg: this.$lang('pleaseInputMobile')
}, {
name: 'mobile',
checkType: 'phoneno',
errorMsg: '请输入正确的手机号'
errorMsg: this.$lang('surePhoneNumber')
}];
var checkRes = validate.check(this.formData, rule);
if (!checkRes) {
@@ -721,7 +731,7 @@ export default {
if (this.seconds == 120 && this.timer == null) {
this.timer = setInterval(() => {
this.seconds--;
this.formData.mobileCodeText = '已发送(' + this.seconds + 's)';
this.formData.mobileCodeText = this.$lang('codeSent', { seconds: this.seconds });
}, 1000);
}
uni.setStorageSync('mobile_key', data.key);
@@ -739,7 +749,7 @@ export default {
});
} else {
this.$util.showToast({
title: validate.error ? validate.error : '请勿重复点击'
title: validate.error ? validate.error : this.$lang('doNotRepeatedlyClick')
});
}
},
@@ -838,7 +848,7 @@ export default {
if (this.seconds == 120 && this.timer == null) {
this.timer = setInterval(() => {
this.seconds--;
this.formData.mobileCodeText = '已发送(' + this.seconds + 's)';
this.formData.mobileCodeText = this.$lang('codeSent', { seconds: this.seconds });
}, 1000);
}
uni.setStorageSync('password_mobile_key', data.key);
@@ -856,7 +866,7 @@ export default {
});
} else {
this.$util.showToast({
title: '请勿重复点击'
title: this.$lang('doNotRepeatedlyClick')
});
}
},
@@ -864,12 +874,12 @@ export default {
var rule = [{
name: 'fullAddress',
checkType: 'required',
errorMsg: '请选择所在地区'
errorMsg: this.$lang('pleaseSelectRegion')
},
{
name: 'address',
checkType: 'required',
errorMsg: '请输入详细地址'
errorMsg: this.$lang('pleaseInputDetailAddress')
}
];
if (!rule.length) return;

View File

@@ -98,12 +98,12 @@ export default {
filePath: res.tempFilePath,
success: () => {
this.$util.showToast({
title: "保存成功"
title: this.$lang('saveSuccess')
});
},
fail: () => {
this.$util.showToast({
title: "保存失败,请稍后重试"
title: this.$lang('saveFailed')
});
}
});

View File

@@ -5,37 +5,37 @@
<view class="status-wrap">
<view class="status-name">{{ detail.refund_status_name }}</view>
<view class="refund-explain" v-if="detail.refund_status == 1">
<view class="font-size-goods-tag color-tip">如果商家拒绝,你可重新发起申请</view>
<view class="font-size-goods-tag color-tip">如果商家同意,将通过申请并退款给你</view>
<view class="font-size-goods-tag color-tip">{{ $lang('statusTip.merchantReject') }}</view>
<view class="font-size-goods-tag color-tip">{{ $lang('statusTip.merchantAgree') }}</view>
<!-- <view class="font-size-goods-tag color-tip">如果商家逾期未处理,平台将自动通过申请并退款给你</view> -->
</view>
<view class="refund-explain" v-if="detail.refund_status == 5">
<view class="font-size-goods-tag color-tip">如果商家确认收货将会退款给你</view>
<view class="font-size-goods-tag color-tip">如果商家拒绝收货,该次退款将会关闭,你可以重新发起退款</view>
<view class="font-size-goods-tag color-tip">{{ $lang('statusTip.merchantConfirmReceive') }}</view>
<view class="font-size-goods-tag color-tip">{{ $lang('statusTip.merchantRejectReceive') }}</view>
</view>
</view>
<view class="history-wrap" @click="switchAction('consultrecord')">
<view>协商记录</view>
<view>{{ $lang('consultRecord') }}</view>
<text class="iconfont icon-right"></text>
</view>
<view class="refund-address-wrap" v-if="detail.refund_status == 4">
<view class="header">退货地址</view>
<view class="header">{{ $lang('returnAddress.title') }}</view>
<view>
<text>收货人:{{ detail.shop_contacts }}</text>
<text>{{ $lang('returnAddress.receiver') }}{{ detail.shop_contacts }}</text>
</view>
<view>
<text>联系方式:{{ detail.shop_mobile }}</text>
<text>{{ $lang('returnAddress.contact') }}{{ detail.shop_mobile }}</text>
</view>
<view>
<text class="address">退货地址:{{ detail.shop_address }}</text>
<view class="copy" @click="$util.copy(detail.shop_address)">复制</view>
<text class="address">{{ $lang('returnAddress.address') }}{{ detail.shop_address }}</text>
<view class="copy" @click="$util.copy(detail.shop_address)">{{ $lang('returnAddress.copy') }}</view>
</view>
</view>
<view class="refund-info">
<view class="header">退款信息</view>
<view class="header">{{ $lang('refundInfo.title') }}</view>
<view class="body">
<!-- 商品信息 -->
<view class="goods-wrap">
@@ -48,16 +48,16 @@
</view>
<!-- 退款信息 -->
<view class="info">
<view class="cell">退款方式:{{ detail.refund_type == 1 ? '仅退款' : '退款退货' }}</view>
<view class="cell" v-if="detail.refund_status == 3">退款途径:{{ detail.refund_money_type == 1 ? '原路退款' : detail.refund_money_type == 2 ? '线下退款' : '退款到余额' }}</view>
<view class="cell">退款原因:{{ detail.refund_reason }}</view>
<view class="cell" v-if="detail.refund_status == 3 && detail.refund_real_money>0">退款金额:{{ $lang('common.currencySymbol') }}{{ detail.refund_real_money }}</view>
<view class="cell" v-else-if="detail.refund_apply_money>0">退款金额:{{ $lang('common.currencySymbol') }}{{ detail.refund_apply_money }}</view>
<view class="cell">退款编号:{{ detail.refund_no }}</view>
<view class="cell">申请时间:{{ $util.timeStampTurnTime(detail.refund_action_time) }}</view>
<view class="cell" v-if="detail.refund_time">退款时间:{{ $util.timeStampTurnTime(detail.refund_time) }}</view>
<view class="cell" v-if="detail.refund_remark != ''">退款说明:{{ detail.refund_remark }}</view>
<view class="cell" v-if="detail.use_point>0">退款积分:{{ detail.use_point }}</view>
<view class="cell">{{ $lang('refundInfo.refundMethod') }}{{ detail.refund_type == 1 ? $lang('refundInfo.refundOnly') : $lang('refundInfo.refundReturn') }}</view>
<view class="cell" v-if="detail.refund_status == 3">{{ $lang('refundInfo.refundChannel') }}{{ detail.refund_money_type == 1 ? $lang('refundInfo.originalRefund') : detail.refund_money_type == 2 ? $lang('refundInfo.offlineRefund') : $lang('refundInfo.balanceRefund') }}</view>
<view class="cell">{{ $lang('refundInfo.refundReason') }}{{ detail.refund_reason }}</view>
<view class="cell" v-if="detail.refund_status == 3 && detail.refund_real_money>0">{{ $lang('refundInfo.refundAmount') }}{{ $lang('common.currencySymbol') }}{{ detail.refund_real_money }}</view>
<view class="cell" v-else-if="detail.refund_apply_money>0">{{ $lang('refundInfo.refundAmount') }}{{ $lang('common.currencySymbol') }}{{ detail.refund_apply_money }}</view>
<view class="cell">{{ $lang('refundInfo.refundNo') }}{{ detail.refund_no }}</view>
<view class="cell">{{ $lang('refundInfo.applyTime') }}{{ $util.timeStampTurnTime(detail.refund_action_time) }}</view>
<view class="cell" v-if="detail.refund_time">{{ $lang('refundInfo.refundTime') }}{{ $util.timeStampTurnTime(detail.refund_time) }}</view>
<view class="cell" v-if="detail.refund_remark != ''">{{ $lang('refundInfo.refundRemark') }}{{ detail.refund_remark }}</view>
<view class="cell" v-if="detail.use_point>0">{{ $lang('refundInfo.refundPoint') }}{{ detail.use_point }}</view>
</view>
</view>
</view>
@@ -73,11 +73,11 @@
<view class="return-goods-container">
<view class="form-wrap">
<view class="item">
<view class="label">物流公司</view>
<view class="label">{{ $lang('returnGoods.expressCompany') }}</view>
<view class="cont">
<input
type="text"
placeholder="请输入物流公司"
:placeholder="$lang('returnGoods.expressCompanyPlaceholder')"
class="input"
placeholder-class="input-placeholder color-tip"
v-model="formData.refund_delivery_name"
@@ -85,11 +85,11 @@
</view>
</view>
<view class="item">
<view class="label">物流单号</view>
<view class="label">{{ $lang('returnGoods.expressNo') }}</view>
<view class="cont">
<input
type="text"
placeholder="请输入物流单号"
:placeholder="$lang('returnGoods.expressNoPlaceholder')"
class="input"
placeholder-class="input-placeholder color-tip"
v-model="formData.refund_delivery_no"
@@ -97,19 +97,19 @@
</view>
</view>
<view class="item">
<view class="label">物流说明</view>
<view class="label">{{ $lang('returnGoods.expressRemark') }}</view>
<view class="cont">
<textarea
placeholder-class="color-tip font-size-tag"
:auto-height="true"
class="textarea"
placeholder="选填"
:placeholder="$lang('returnGoods.expressRemarkPlaceholder')"
v-model="formData.refund_delivery_remark"
/>
</view>
</view>
</view>
<button type="primary" class="sub-btn" @click="refurnGoods">提交</button>
<button type="primary" class="sub-btn" @click="refurnGoods">{{ $lang('common.submit') }}</button>
</view>
</view>
@@ -118,7 +118,7 @@
<view class="record-item" :class="logItem.action_way == 1 ? 'buyer' : ''" v-for="(logItem, logIndex) in detail.refund_log_list" :key="logIndex">
<view class="cont">
<view class="head">
<text>{{ logItem.action_way == 1 ? '买家' : '卖家' }}</text>
<text>{{ logItem.action_way == 1 ? $lang('record.buyer') : $lang('record.seller') }}</text>
<text class="time">{{ $util.timeStampTurnTime(logItem.action_time) }}</text>
</view>
<view class="body">
@@ -136,7 +136,7 @@
<text>联系客服</text>
</view>
</ns-contact> -->
<view @click="switchAction('')">返回详情</view>
<view @click="switchAction('')">{{ $lang('record.backToDetail') }}</view>
</view>
</view>
</scroll-view>
@@ -190,7 +190,7 @@ export default {
this.detail = res.data;
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
} else {
this.$util.showToast({ title: '未获取到该订单项退款信息' });
this.$util.showToast({ title: this.$lang('toast.noRefundInfo') });
setTimeout(() => {
this.$util.redirectTo('/pages_order/list');
}, 1000);
@@ -206,7 +206,7 @@ export default {
case 'orderRefundCancel':
this.cancleRefund(this.detail.order_goods_id, res => {
if (res.code >= 0) {
this.$util.showToast({ title: '撤销成功' });
this.$util.showToast({ title: this.$lang('toast.cancelSuccess') });
setTimeout(() => {
this.$util.redirectTo('/pages_order/list');
}, 1000);
@@ -223,8 +223,8 @@ export default {
},
refurnGoods() {
var rule = [
{ name: 'refund_delivery_name', checkType: 'required', errorMsg: '请输入物流公司' },
{ name: 'refund_delivery_no', checkType: 'required', errorMsg: '请输入物流单号' }
{ name: 'refund_delivery_name', checkType: 'required', errorMsg: this.$lang('validate.pleaseInputExpressCompany') },
{ name: 'refund_delivery_no', checkType: 'required', errorMsg: this.$lang('validate.pleaseInputExpressNo') }
];
this.formData.order_goods_id = this.order_goods_id;
var checkRes = validate.check(this.formData, rule);

View File

@@ -168,7 +168,7 @@ function main() {
}
// ---- 检查 1: 文件结构一致性 ----
console.log('【1/2】文件结构检查\n');
console.log('【1/3】文件结构检查\n');
const zhFiles = localeFiles['zh-cn'];
const enFiles = localeFiles['en-us'];
@@ -198,7 +198,7 @@ function main() {
}
// ---- 检查 2: key 一致性 ----
console.log('\n【2/2】Key 一致性检查\n');
console.log('\n【2/3】Key 一致性检查\n');
let totalZhKeys = 0;
let totalEnKeys = 0;
@@ -262,6 +262,118 @@ function main() {
console.log(' ✅ 所有共同文件的 key 完全一致');
}
// ---- 检查 3: 硬编码中文扫描 ----
console.log('\n【3/3】硬编码中文扫描\n');
// 跳过的目录
const SKIP_DIRS = new Set([
'node_modules', 'unpackage', 'static', 'lang',
'uni_modules', '.git', '.hbuilderx', 'dist', 'build',
'stub-app-projects', 'docs', 'hybrid', 'wxcomponents'
]);
// 跳过的文件
const SKIP_FILE_PATTERNS = [
/vendor\.js$/,
/\.min\.js$/,
/\.pack\.js$/,
/manifest\.json\.js$/,
];
// 扫描所有 vue / js 文件
const srcFiles = [];
function scanSrcDir(dir, rel) {
const entries = fs.readdirSync(dir, { withFileTypes: true });
for (const entry of entries) {
const fullPath = path.join(dir, entry.name);
const relPath = rel ? path.join(rel, entry.name) : entry.name;
if (entry.isDirectory()) {
if (SKIP_DIRS.has(entry.name)) continue;
scanSrcDir(fullPath, relPath);
} else if (entry.name.endsWith('.vue') || entry.name.endsWith('.js')) {
// 跳过 vendor / min / pack 等非源码文件
let skip = false;
for (const pat of SKIP_FILE_PATTERNS) {
if (pat.test(entry.name)) { skip = true; break; }
}
if (!skip) {
srcFiles.push({ fullPath, relPath: relPath.replace(/\\/g, '/') });
}
}
}
}
scanSrcDir(ROOT, '');
// 中文正则(基本汉字区)
const CN_RE = /[\u4e00-\u9fa5]+/g;
// 判断一行是否是注释行(粗略)
function isCommentLine(line) {
const t = line.trim();
if (t.startsWith('//')) return true;
if (t.startsWith('/*')) return true;
if (t.startsWith('*')) return true;
if (t.startsWith('<!--')) return true;
if (t.startsWith('* ')) return true;
return false;
}
// 判断一行是否是 $lang 调用(已经国际化)
function isLangCall(line) {
// 匹配 $lang(' 或 $lang("
return /\$lang\(\s*['"]/.test(line);
}
const hardcodeResults = [];
let totalCnHits = 0;
for (const { fullPath, relPath } of srcFiles) {
try {
const content = fs.readFileSync(fullPath, 'utf-8');
const lines = content.split('\n');
let fileHits = 0;
for (let i = 0; i < lines.length; i++) {
const line = lines[i];
if (isCommentLine(line)) continue;
if (isLangCall(line)) continue;
const matches = line.match(CN_RE);
if (matches) {
fileHits += matches.length;
}
}
if (fileHits > 0) {
totalCnHits += fileHits;
hardcodeResults.push({ file: relPath, count: fileHits });
}
} catch (e) {
// 跳过读不了的文件
}
}
// 按命中数排序
hardcodeResults.sort((a, b) => b.count - a.count);
console.log(` 扫描文件数: ${srcFiles.length}`);
console.log(` 含中文的文件数: ${hardcodeResults.length}`);
console.log(` 中文字符串命中数: ${totalCnHits}`);
if (hardcodeResults.length > 0) {
console.log(`\n ⚠️ 疑似硬编码中文 TOP 20:`);
const topN = hardcodeResults.slice(0, 20);
for (const r of topN) {
console.log(` ${String(r.count).padStart(4)} ${r.file}`);
}
if (hardcodeResults.length > 20) {
console.log(` ... 还有 ${hardcodeResults.length - 20} 个文件`);
}
console.log(`\n 💡 提示:这是粗略扫描,包含注释/默认值等误报,仅供参考`);
} else {
console.log(' ✅ 未发现硬编码中文(粗略扫描)');
}
// ---- 总结 ----
console.log('\n========================================');
console.log(' 检查完成');