feat: 新增多语言文案与组件国际化适配

本次提交完成了大量多语言相关的新增与优化工作:
1. 新增充值、案例、会员资产、订单等页面的中文/英文翻译文案
2. 新增企业微信客服、时间选择、支付弹窗等组件的多语言包
3. 优化工具函数与自定义页面的多语言适配,替换硬编码提示文案
4. 新增会员等级规则、积分商品、退款管理等页面的国际化支持
5. 修复企业微信JS-SDK的错误提示文案硬编码问题
This commit is contained in:
2026-06-26 09:09:46 +08:00
parent 2d8846c64c
commit 066ca61d97
97 changed files with 2704 additions and 716 deletions

View File

@@ -87,7 +87,7 @@ function ensureWebSocketConnected() {
var domain = getWsDomain();
if (!domain) {
wsConnectionPromise = null;
reject(new Error('WebSocket 域名配置无效'));
reject(new Error(lang.lang('aiService.wsDomainInvalid')));
return;
}
@@ -126,7 +126,7 @@ function ensureWebSocketConnected() {
if (data.type === 'auth_failed') {
wsAuthenticated = false;
wsConnectionPromise = null;
reject(new Error('WebSocket 认证失败'));
reject(new Error(lang.lang('aiService.wsAuthFailed')));
return;
}
@@ -179,8 +179,8 @@ function ensureWebSocketConnected() {
var prevReject = wsMessageReject;
resetWsState();
resetWsMessageState();
if (prevReject) prevReject(new Error('WebSocket 连接失败'));
reject(new Error('WebSocket 连接失败'));
if (prevReject) prevReject(new Error(lang.lang('aiService.wsConnectionFailed')));
reject(new Error(lang.lang('aiService.wsConnectionFailed')));
});
wsSocketTask.onClose(function() {
@@ -188,7 +188,7 @@ function ensureWebSocketConnected() {
var prevReject = wsMessageReject;
resetWsState();
resetWsMessageState();
if (prevReject) prevReject(new Error('WebSocket 连接意外关闭'));
if (prevReject) prevReject(new Error(lang.lang('aiService.wsConnectionClosed')));
});
});
@@ -274,7 +274,7 @@ export default {
uniacid: this.getUniacid(),
token: store.state.token
});
throw new Error('AI服务暂时不可用,请稍后重试');
throw new Error(lang.lang('aiService.serviceUnavailable'));
}
},
@@ -341,7 +341,7 @@ export default {
});
if (!response.ok || !response.body) {
throw new Error('无效响应');
throw new Error(lang.lang('aiService.invalidResponse'));
}
const reader = response.body.getReader();
@@ -440,7 +440,7 @@ export default {
messageId: response.data?.message_id
};
} else {
throw new Error(response.message || 'AI服务返回错误');
throw new Error(response.message || lang.lang('aiService.serviceResponseError'));
}
},
@@ -515,12 +515,12 @@ export default {
.filter(item => item === 'healthy').length > 0;
return {
available,
reason: available ? '服务正常' : '服务异常'
reason: available ? lang.lang('aiService.statusNormal') : lang.lang('aiService.statusAbnormal')
};
} catch (error) {
return {
available: false,
reason: '服务检查失败'
reason: lang.lang('aiService.statusCheckFailed')
};
}
},
@@ -581,7 +581,7 @@ export default {
async getConversationHistory(params = {}) {
try {
if (!params.conversation_id) {
throw new Error('会话ID(conversation_id)是必填参数');
throw new Error(lang.lang('aiService.conversationIdRequired'));
}
console.log('[AI History] 请求历史, conversation_id:', params.conversation_id, 'limit:', params.limit);
const requestData = {
@@ -611,11 +611,11 @@ export default {
page_info: response.data?.page_info || { limit: 20, offset: 0 }
};
} else {
throw new Error(response.message || '获取会话历史失败');
throw new Error(response.message || lang.lang('aiService.getHistoryFailed'));
}
} catch (error) {
console.error('获取会话历史失败:', error);
throw new Error(error.message || '获取会话历史时发生错误,请稍后重试');
throw new Error(error.message || lang.lang('aiService.getHistoryError'));
}
},
@@ -666,7 +666,7 @@ export default {
};
eventSource.onerror = (error) => {
console.error('EventSource错误:', error);
if (onError) onError({ error: '连接失败' });
if (onError) onError({ error: lang.lang('aiService.connectionFailed') });
window.currentEventSource = null;
};
return eventSource;

View File

@@ -338,7 +338,7 @@ export default {
console.error('getDiyInfo request failed', e);
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
this.$util.showToast({
title: '网络异常,请稍后重试'
title: this.$lang('diy.networkError')
});
this.diyInfoLoading = false;
return;
@@ -357,7 +357,7 @@ export default {
}
this.$util.showToast({
title: '未配置自定义页面数据'
title: this.$lang('diy.noDiyData')
});
this.diyData = {};
return;
@@ -595,7 +595,7 @@ export default {
if (res.code == 0 && res.data) {
this.currentPosition = res.data.formatted_addresses.recommend; // 结合知名地点形成的描述性地址,更具人性化特点
} else {
this.currentPosition = '未获取到定位';
this.currentPosition = this.$lang('diy.locationNotAvailable');
}
}
});
@@ -607,7 +607,7 @@ export default {
this.nearestStore = this.defaultStoreInfo;
this.nearestStore.show_address = this.nearestStore.full_address.replace(/,/g, ' ') + ' ' + this.nearestStore.address;
}
if (this.currentPosition == '') this.currentPosition = '未获取到定位';
if (this.currentPosition == '') this.currentPosition = this.$lang('diy.locationNotAvailable');
this.openChooseStorePopup();
}
},

View File

@@ -2,6 +2,7 @@ import Config from './config.js'
import store from '@/store/index.js'
import Http from './http.js'
import Platform from './platform.js'
import Lang from './lang.js'
import {
Weixin
} from 'common/js/wx-jssdk.js';
@@ -568,7 +569,7 @@ export default {
second = second < 10 ? ('0' + second) : second;
if (type) {
if (type == 'yearMonthDay') {
return y + '年' + m + '月' + d + '日';
return y + Lang.lang('util.dateYear') + m + Lang.lang('util.dateMonth') + d + Lang.lang('util.dateDay');
}
return y + '-' + m + '-' + d;
} else {
@@ -668,7 +669,15 @@ export default {
tMonth = doHandleMonth(tMonth + 1);
tDate = doHandleMonth(tDate);
const week = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
const week = [
Lang.lang('util.weekSunday'),
Lang.lang('util.weekMonday'),
Lang.lang('util.weekTuesday'),
Lang.lang('util.weekWednesday'),
Lang.lang('util.weekThursday'),
Lang.lang('util.weekFriday'),
Lang.lang('util.weekSaturday')
]
return {
't': time,
'y': tYear,
@@ -705,7 +714,7 @@ export default {
var _data = data;
var imgs = [];
uni.showLoading({
title: '图片上传中'
title: Lang.lang('util.uploading')
})
for (var i = 0; i < tempFilePaths.length; i++) {
var path = await _self.upload_file_server(tempFilePaths[i], _data, params.path,
@@ -714,7 +723,7 @@ export default {
if (imgs.length == tempFilePaths.length) {
uni.hideLoading()
uni.showToast({
title: '上传成功',
title: Lang.lang('util.uploadSuccess'),
icon: 'none'
})
typeof callback == 'function' && callback(imgs);
@@ -724,7 +733,7 @@ export default {
fail: err => {
uni.hideLoading()
uni.showToast({
title: '上传失败',
title: Lang.lang('util.uploadFailed'),
icon: 'none'
})
}
@@ -775,7 +784,7 @@ export default {
oInput.style.display = 'none';
uni.hideKeyboard();
this.showToast({
title: '复制成功'
title: Lang.lang('util.copySuccess')
});
typeof callback == 'function' && callback();
@@ -1040,7 +1049,7 @@ export default {
});
} else {
this.showToast({
title: '抱歉,商家暂无客服,请线下联系',
title: Lang.lang('customerService.noServiceOffline'),
})
}
}

View File

@@ -1,6 +1,8 @@
/**
* 企业微信JS-SDK调用
*/
import langConfig from './lang.js';
let WxWork = function () {
// 企业微信JS-SDK
this.wxwork = null;
@@ -57,7 +59,7 @@ let WxWork = function () {
this.addContact = function (params, success, fail) {
if (!this.wxwork) {
console.error('企业微信JS-SDK未初始化');
if (fail) fail('企业微信JS-SDK未初始化');
if (fail) fail(langConfig.lang('wxworkJssdk.notInitialized'));
return;
}
@@ -88,7 +90,7 @@ let WxWork = function () {
this.openCustomerService = function (params, success, fail) {
if (!this.wxwork) {
console.error('企业微信JS-SDK未初始化');
if (fail) fail('企业微信JS-SDK未初始化');
if (fail) fail(langConfig.lang('wxworkJssdk.notInitialized'));
return;
}

View File

@@ -1,3 +1,5 @@
import lang from '@/common/js/lang.js';
// 微信视频号组件配置
export const wechatChannelConfig = {
// 图标相关
@@ -56,10 +58,10 @@ export const wechatChannelConfig = {
// 错误提示配置
error: {
notWechat: '当前环境不是微信小程序',
lowVersion: '当前微信基础库版本过低,需要 2.19.2 或以上版本',
notSupported: '当前环境不支持微信视频号',
missingFields: '缺少必要字段: {field}',
notWechat: 'wechatChannel.notWechat',
lowVersion: 'wechatChannel.lowVersion',
notSupported: 'wechatChannel.notSupported',
missingFields: 'wechatChannel.missingFields',
},
};
@@ -108,7 +110,7 @@ export const wechatChannelUtil = {
const requiredFields = ['feedId', 'finderUserName'];
for (const field of requiredFields) {
if (!item[field]) {
throw new Error(`缺少必要字段: ${field}`);
throw new Error(lang.lang(wechatChannelConfig.error.missingFields, { field }));
}
}
return true;
@@ -128,7 +130,7 @@ export const wechatChannelUtil = {
// 检查微信环境
if (typeof wx === 'undefined') {
const err = new Error(wechatChannelConfig.error.notWechat);
const err = new Error(lang.lang(wechatChannelConfig.error.notWechat));
this.handleError(err, item);
reject(err);
return;
@@ -138,7 +140,7 @@ export const wechatChannelUtil = {
const systemInfo = wx.getSystemInfoSync();
const SDKVersion = systemInfo.SDKVersion;
if (this.versionCompare(SDKVersion, wechatChannelConfig.wechat.minSdkVersion) < 0) {
const err = new Error(wechatChannelConfig.error.lowVersion);
const err = new Error(lang.lang(wechatChannelConfig.error.lowVersion));
this.handleError(err, item);
reject(err);
return;
@@ -158,7 +160,7 @@ export const wechatChannelUtil = {
}
});
} else {
const err = new Error(wechatChannelConfig.error.notSupported);
const err = new Error(lang.lang(wechatChannelConfig.error.notSupported));
this.handleError(err, item);
reject(err);
}
@@ -168,7 +170,7 @@ export const wechatChannelUtil = {
// 统一错误处理
handleError(err, item) {
console.error('微信视频号错误:', err);
const { message = '', errMsg = '微信视频播放失败!', errCode = -1 } = err;
const { message = '', errMsg = lang.lang('wechatChannel.playFailed'), errCode = -1 } = err;
// 错误码5: 表示用户点击了取消. openChannelsActivity:fail cancel
if ([5].includes(errCode)) {

View File

@@ -34,7 +34,7 @@
</view>
<view class="box">
<text v-if="item.val != ''">{{ item.val }}</text>
<text v-else class="color-tip">请选择</text>
<text v-else class="color-tip">{{ $lang('components.nsForm.selectPlaceholder') }}</text>
</view>
<text class="iconfont icon-right"></text>
</view>
@@ -188,7 +188,7 @@
<view class="box">
<pick-regions :default-regions="item.default_regions" :select-arr="item.select_arr" @getRegions="handleGetRegions($event, index)">
<view class="select-address " :class="{ empty: !item.val, 'color-tip': !item.val }">
{{ item.val ? item.val : item.select_arr == '2' ? '请选择省市' : '请选择省市区/县' }}
{{ item.val ? item.val : (item.select_arr == '2' ? $lang('components.nsForm.selectProvinceCity') : $lang('components.nsForm.selectProvinceCityDistrict')) }}
</view>
</pick-regions>
</view>
@@ -365,7 +365,7 @@
if (item.value.required && !item.val) {
verify = false;
this.$util.showToast({
title: '请输入' + item.value.title
title: this.$lang('components.nsForm.pleaseInput', { title: item.value.title })
});
break;
}
@@ -375,13 +375,13 @@
verify = !item.value.required;
if (verify == false) {
this.$util.showToast({
title: '身份证输入不合法'
title: this.$lang('components.nsForm.idCardInvalid')
});
return false;
}
if (verify == true && item.val != '') {
this.$util.showToast({
title: '身份证输入不合法'
title: this.$lang('components.nsForm.idCardInvalid')
});
return false;
}
@@ -392,13 +392,13 @@
verify = !item.value.required;
if (verify == false) {
this.$util.showToast({
title: '手机号输入不合法'
title: this.$lang('components.nsForm.mobileInvalid')
});
return false;
}
if (verify == true && item.val != '') {
this.$util.showToast({
title: '手机号输入不合法'
title: this.$lang('components.nsForm.mobileInvalid')
});
return false;
}
@@ -409,7 +409,7 @@
if (item.value.required && !item.val) {
verify = false;
this.$util.showToast({
title: '请输入' + item.value.title
title: this.$lang('components.nsForm.pleaseInput', { title: item.value.title })
});
break;
}
@@ -419,7 +419,7 @@
if (item.value.required && !item.val) {
verify = false;
this.$util.showToast({
title: '请选择' + item.value.title
title: this.$lang('components.nsForm.pleaseSelect', { title: item.value.title })
});
break;
}
@@ -429,7 +429,7 @@
if (item.value.required && !item.val) {
verify = false;
this.$util.showToast({
title: '请至少选择一个' + item.value.title
title: this.$lang('components.nsForm.pleaseSelectAtLeastOne', { title: item.value.title })
});
break;
}
@@ -439,7 +439,7 @@
if (item.value.required && !item.val) {
verify = false;
this.$util.showToast({
title: '请至少上传一张' + item.value.title
title: this.$lang('components.nsForm.pleaseUploadAtLeastOne', { title: item.value.title })
});
break;
}
@@ -449,7 +449,7 @@
if (item.value.required && !item.val) {
verify = false;
this.$util.showToast({
title: '请选择' + item.value.title
title: this.$lang('components.nsForm.pleaseSelect', { title: item.value.title })
});
break;
}
@@ -459,7 +459,7 @@
if (item.value.required && !item.val) {
verify = false;
this.$util.showToast({
title: '请选择' + item.value.title
title: this.$lang('components.nsForm.pleaseSelect', { title: item.value.title })
});
break;
}
@@ -467,7 +467,7 @@
if (this.$util.timeTurnTimeStamp(item.start_date) > this.$util.timeTurnTimeStamp(item.end_date)) {
verify = false;
this.$util.showToast({
title: '结束日期不能小于开始日期'
title: this.$lang('components.nsForm.endDateBeforeStartDate')
});
break;
}
@@ -477,7 +477,7 @@
if (item.value.required && !item.val) {
verify = false;
this.$util.showToast({
title: '请选择' + item.value.title
title: this.$lang('components.nsForm.pleaseSelect', { title: item.value.title })
});
break;
}
@@ -487,7 +487,7 @@
if (item.value.required && !item.val) {
verify = false;
this.$util.showToast({
title: '请选择' + item.value.title
title: this.$lang('components.nsForm.pleaseSelect', { title: item.value.title })
});
break;
}
@@ -495,7 +495,7 @@
if (item.start_time >= item.end_time) {
verify = false;
this.$util.showToast({
title: '结束时间必须大于开始时间'
title: this.$lang('components.nsForm.endTimeBeforeStartTime')
});
break;
}
@@ -505,7 +505,7 @@
if (item.value.required && !item.val) {
verify = false;
this.$util.showToast({
title: '请选择' + item.value.title
title: this.$lang('components.nsForm.pleaseSelect', { title: item.value.title })
});
break;
}
@@ -542,7 +542,7 @@
res.forEach(v => {
if (this.formData[index].img_lists.length >= Number(this.formData[index].value.max_count)) {
this.$util.showToast({
title: '最多上传' + this.formData[index].value.max_count + '张图片'
title: this.$lang('components.nsForm.maxUploadImages', { max: this.formData[index].value.max_count })
});
return false;
} else {
@@ -560,7 +560,7 @@
addImg(index) {
if (this.formData[index].img_lists.length >= Number(this.formData[index].value.max_count)) {
this.$util.showToast({
title: '最多上传' + this.formData[index].value.max_count + '张图片'
title: this.$lang('components.nsForm.maxUploadImages', { max: this.formData[index].value.max_count })
});
return false;
}

View File

@@ -4,19 +4,19 @@
<uni-popup ref="choosePaymentPopup" type="center" :mask-click="false">
<view class="choose-payment-popup popup" @touchmove.prevent.stop>
<view class="popup-header">
<text class="tit">支付方式</text>
<text class="tit">{{ $lang('components.nsPayment.paymentMethod') }}</text>
<text class="iconfont icon-close" @click="close()"></text>
</view>
<scroll-view scroll-y="true" class="popup-body" :class="{ 'safe-area': isIphoneX }">
<view class="pay-money">
<!-- <text class="unit">{{ $lang('common.currencySymbol') }}</text> -->
<text class="money">支付金额{{ payMoney | moneyFormat }}元</text>
<text class="money">{{ $lang('components.nsPayment.payAmount', { amount: payMoney | moneyFormat }) }}</text>
</view>
<view class="payment-item" v-if="balanceDeduct > 0 && balanceConfig == 1 && sale">
<view class="iconfont icon-yue"></view>
<view class="info-wrap">
<text class="name">余额抵扣</text>
<view class="money">可用¥{{ balanceDeduct }}</view>
<text class="name">{{ $lang('components.nsPayment.balanceDeduction') }}</text>
<view class="money">{{ $lang('components.nsPayment.availableBalance', { amount: balanceDeduct }) }}</view>
</view>
<ns-switch class="balance-switch" @change="useBalance" :checked="isBalance == 1"></ns-switch>
</view>
@@ -31,12 +31,12 @@
</view>
</block>
<block v-else>
<view class="empty">平台尚未配置支付方式!</view>
<view class="empty">{{ $lang('components.nsPayment.noPaymentMethod') }}</view>
</block>
</block>
</scroll-view>
<view class="popup-footer" :class="{ 'bottom-safe-area': isIphoneX }">
<view class="confirm-btn color-base-bg" @click="confirm()">确认支付</view>
<view class="confirm-btn color-base-bg" @click="confirm()">{{ $lang('components.nsPayment.confirmPay') }}</view>
</view>
</view>
</uni-popup>
@@ -72,12 +72,12 @@ export default {
payIndex: 0,
// #ifdef H5
payTypeList: [{
name: '支付宝支付',
name: this.$lang('components.nsPayment.alipay'),
icon: 'icon-zhifubaozhifu-',
type: 'alipay'
},
{
name: '微信支付',
name: this.$lang('components.nsPayment.wechatpay'),
icon: 'icon-weixin1',
type: 'wechatpay'
}
@@ -86,7 +86,7 @@ export default {
// #endif
// #ifdef MP-WEIXIN
payTypeList: [{
name: '微信支付',
name: this.$lang('components.nsPayment.wechatpay'),
provider: 'wxpay',
icon: 'icon-weixin1',
type: 'wechatpay'
@@ -95,7 +95,7 @@ export default {
// #endif
// #ifdef MP-ALIPAY
payTypeList: [{
name: '支付宝支付',
name: this.$lang('components.nsPayment.alipay'),
icon: 'icon-zhifubaozhifu-',
type: 'alipay',
provider: 'alipay'
@@ -108,11 +108,12 @@ export default {
};
},
created(e) {
let url;
// #ifdef H5
let url = window.location.href
url = window.location.href
// #endif
// #ifndef H5
let url = getCurrentPages()[getCurrentPages().length - 1].route
url = getCurrentPages()[getCurrentPages().length - 1].route
// #endif
let list = url.match('presale/order_list/order_list')
let detail = url.match('presale/order_detail/order_detail')
@@ -158,12 +159,12 @@ export default {
confirm() {
if (this.payTypeList.length == 0 && this.payMoney > 0) {
this.$util.showToast({
title: '请选择支付方式!'
title: this.$lang('components.nsPayment.pleaseSelectPaymentMethod')
});
return;
}
uni.showLoading({
title: '支付中...',
title: this.$lang('components.nsPayment.paying'),
mask: true
});
this.$refs.choosePaymentPopup.close();
@@ -182,7 +183,7 @@ export default {
this.pay();
} else {
this.$util.showToast({
title: '未获取到支付信息!'
title: this.$lang('components.nsPayment.payInfoNotFound')
});
setTimeout(() => {
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
@@ -295,7 +296,7 @@ export default {
},
res => {
this.$util.showToast({
title: '您已取消支付'
title: this.$lang('components.nsPayment.paymentCancelled')
});
setTimeout(() => {
this.$util.redirectTo('/pages_tool/pay/result', {
@@ -392,10 +393,10 @@ export default {
fail: res => {
this.flag = false;
if (res.errMsg == 'requestOrderPayment:fail cancel') {
this.$util.showToast({ title: '您已取消支付' });
this.$util.showToast({ title: this.$lang('components.nsPayment.paymentCancelled') });
} else {
uni.showModal({
content: '支付失败,失败原因: ' + res.errMsg,
content: this.$lang('components.nsPayment.paymentFailed', { reason: res.errMsg }),
showCancel: false
});
}
@@ -428,10 +429,10 @@ export default {
fail: res => {
this.flag = false;
if (res.errMsg == 'requestPayment:fail cancel') {
this.$util.showToast({ title: '您已取消支付' });
this.$util.showToast({ title: this.$lang('components.nsPayment.paymentCancelled') });
} else {
uni.showModal({
content: '支付失败,失败原因: ' + res.errMsg,
content: this.$lang('components.nsPayment.paymentFailed', { reason: res.errMsg }),
showCancel: false
});
}

View File

@@ -3,8 +3,8 @@
<uni-popup type="bottom" ref="selectTime">
<view class="box">
<view class="title">
<block v-if="obj.delivery && obj.delivery.delivery_type == 'local'">选择送达时间</block>
<block v-if="obj.delivery && obj.delivery.delivery_type == 'store'">选择自提时间</block>
<block v-if="obj.delivery && obj.delivery.delivery_type == 'local'">{{ $lang('components.nsSelectTime.selectDeliveryTime') }}</block>
<block v-if="obj.delivery && obj.delivery.delivery_type == 'store'">{{ $lang('components.nsSelectTime.selectPickupTime') }}</block>
<text class="iconfont icon-close" @click="close"></text>
</view>
<view class="body">
@@ -86,7 +86,7 @@ export default {
this.key = this.keyJudge;
let obj = this.dayData[this.key];
obj.time = this.timeData[this.keys];
let time = obj.time.replace('立即配送(','').replace(')','');
let time = obj.time.replace(this.$lang('components.nsSelectTime.immediateDeliveryPrefix'),'').replace(this.$lang('components.nsSelectTime.immediateDeliverySuffix'),'');
var dateTime = new Date();
var format = time.split('-');
@@ -145,7 +145,15 @@ export default {
let num = 1; //记录循环执行过的次数
let mostDay = this.obj.dataTime.most_day ? this.obj.dataTime.most_day + 1 : 1; // 最多可预约天数
let startTime = parseInt(today.getTime() / 1000);
let week = ['周日', '周一', '周二', '周三', '周四', '周五', '周六'];
let week = [
this.$lang('components.nsSelectTime.sunday'),
this.$lang('components.nsSelectTime.monday'),
this.$lang('components.nsSelectTime.tuesday'),
this.$lang('components.nsSelectTime.wednesday'),
this.$lang('components.nsSelectTime.thursday'),
this.$lang('components.nsSelectTime.friday'),
this.$lang('components.nsSelectTime.saturday'),
];
if (obj.time_week && obj.time_week.length == 7) {
//判断是否七天全有
judge = true;
@@ -170,7 +178,7 @@ export default {
i = i - 1;
} else {
objects = {
title: this.obj.dataTime.advance_day == 0 ? '今天' : '',
title: this.obj.dataTime.advance_day == 0 ? this.$lang('components.nsSelectTime.today') : '',
type: 'special',
month: nowMonth + '月' + nowDate + '日',
Day: '(' + dayStr + ')'
@@ -182,7 +190,7 @@ export default {
case 2:
if (i == 0 || i == 1) {
objects = {
title: this.obj.dataTime.advance_day == 0 ? '明天' : '',
title: this.obj.dataTime.advance_day == 0 ? this.$lang('components.nsSelectTime.tomorrow') : '',
month: nowMonth + '月' + nowDate + '日',
Day: '(' + dayStr + ')'
};
@@ -267,7 +275,7 @@ export default {
if (time <= item.end_time) {
let text = '';
if (this.obj.delivery.delivery_type == 'local' && i == 0) {
text = '立即配送('+ this.$util.getTimeStr(time) + '-' + this.$util.getTimeStr(time + timeInterval) + ')';
text = this.$lang('components.nsSelectTime.immediateDeliveryPrefix') + this.$util.getTimeStr(time) + '-' + this.$util.getTimeStr(time + timeInterval) + this.$lang('components.nsSelectTime.immediateDeliverySuffix');
} else {
text = this.$util.getTimeStr(time) + '-' + this.$util.getTimeStr(time + timeInterval);
}

View File

@@ -4,19 +4,19 @@
<uni-popup ref="choosePaymentPopup" type="center" v-if="payInfo" :mask-click="false">
<view class="choose-payment-popup popup" @touchmove.prevent.stop>
<view class="popup-header">
<text class="tit">支付方式</text>
<text class="tit">{{ $lang('components.payment.title') }}</text>
<text class="iconfont icon-close" @click="close()"></text>
</view>
<scroll-view scroll-y="true" class="popup-body">
<view class="pay-money">
<text class="money">支付金额{{ payMoney|moneyFormat }}元</text>
<text class="money">{{ $lang('components.payment.payAmount', { money: parseFloat(payMoney).toFixed(2) }) }}</text>
</view>
<view class="payment-item" v-if="balanceDeduct > 0 && balanceUsable && balanceConfig == 1">
<view class="iconfont icon-yue"></view>
<view class="info-wrap">
<text class="name">余额支付</text>
<view class="money">可用¥{{ balanceDeduct|moneyFormat }}</view>
<text class="name">{{ $lang('components.payment.balancePay') }}</text>
<view class="money">{{ $lang('components.payment.availableBalance', { symbol: $lang('common.currencySymbol'), balance: parseFloat(balanceDeduct).toFixed(2) }) }}</view>
</view>
<ns-switch class="balance-switch" @change="useBalance" :checked="isBalance == 1"></ns-switch>
</view>
@@ -24,17 +24,17 @@
<block v-if="payTypeList.length">
<view class="payment-item" v-for="(item, index) in payTypeList" :key="index" @click="payIndex = index">
<view class="iconfont" :class="item.icon"></view>
<text class="name">{{ item.name }}</text>
<text class="name">{{ $lang('components.payment.' + item.type) }}</text>
<text class="iconfont" :class="payIndex == index ? 'icon-yuan_checked color-base-text' : 'icon-checkboxblank'"></text>
</view>
</block>
<block v-else>
<view class="empty">平台尚未配置支付方式!</view>
<view class="empty">{{ $lang('components.payment.noPaymentMethod') }}</view>
</block>
</block>
</scroll-view>
<view class="popup-footer">
<view class="confirm-btn color-base-bg" @click="confirm()">确认支付</view>
<view class="confirm-btn color-base-bg" @click="confirm()">{{ $lang('components.payment.confirmPay') }}</view>
</view>
</view>
</uni-popup>
@@ -135,12 +135,12 @@
confirm() {
if (this.payTypeList.length == 0 && this.payMoney > 0) {
this.$util.showToast({
title: '请选择支付方式!'
title: this.$lang('components.payment.pleaseSelectPayMethod')
});
return;
}
uni.showLoading({
title: '支付中...',
title: this.$lang('components.payment.paying'),
mask: true
});
this.pay();
@@ -161,7 +161,7 @@
})
} else {
this.$util.showToast({
title: '未获取到支付信息!'
title: this.$lang('components.payment.payInfoNotFound')
});
}
}
@@ -294,7 +294,7 @@
},
res => {
this.$util.showToast({
title: '您已取消支付'
title: this.$lang('components.payment.payCancelled')
});
this.resetpay();
}
@@ -378,12 +378,12 @@
this.flag = false;
if (res.errMsg == 'requestOrderPayment:fail cancel') {
this.$util.showToast({
title: '您已取消支付'
title: this.$lang('components.payment.payCancelled')
});
this.resetpay();
} else {
uni.showModal({
content: '支付失败,失败原因: ' + res.errMsg,
content: this.$lang('components.payment.payFailed', { reason: res.errMsg }),
showCancel: false
});
setTimeout(() => {
@@ -406,12 +406,12 @@
this.flag = false;
if (res.errMsg == 'requestPayment:fail cancel') {
this.$util.showToast({
title: '您已取消支付'
title: this.$lang('components.payment.payCancelled')
});
this.resetpay();
} else {
uni.showModal({
content: '支付失败,失败原因: ' + res.errMsg,
content: this.$lang('components.payment.payFailed', { reason: res.errMsg }),
showCancel: false
});
setTimeout(() => {

View File

@@ -2,24 +2,24 @@
<view>
<view class="privacy-mask" v-if="showPop">
<view class="privacy-wrap">
<view class="privacy-title">用户隐私保护提示</view>
<view class="privacy-desc">
感谢您使用{{ appName }},在使用前您应当阅读并同意
<text class="privacy-link" @tap="openPrivacyContract">{{ privacyContractName }}</text>
<!-- #ifdef QUICKAPP-WEBVIEW || H5 -->
<text class="privacy-link" @tap="openPrivacyService">{{ privacyServiceName }}</text>
<!-- #endif -->
,当点击同意并继续时,即表示您已理解并同意该条款内容,该条款将对您产生法律约束力;如您不同意,将无法继续使用{{ appName }}相关功能。
</view>
<view class="privacy-button-flex">
<button class="privacy-button-btn bg-disagree" @tap="handleDisagree">不同意</button>
<!-- #ifdef QUICKAPP-WEBVIEW || MP-WEIXIN -->
<button id="agree-btn" class="privacy-button-btn bg-agree" open-type="agreePrivacyAuthorization"
@agreeprivacyauthorization="handleAgree">同意并继续</button>
<!-- #endif -->
<!-- #ifdef WEB || H5 -->
<button id="agree-btn" class="privacy-button-btn bg-agree" @tap="handleAgree" @click="handleAgree">同意并继续</button>
<!-- #endif -->
<view class="privacy-title">{{ $lang('components.privacyPopup.title') }}</view>
<view class="privacy-desc">
{{ $lang('components.privacyPopup.descPrefix', { appName: appName }) }}
<text class="privacy-link" @tap="openPrivacyContract">{{ privacyContractName }}</text>
<!-- #ifdef QUICKAPP-WEBVIEW || H5 -->
<text class="privacy-link" @tap="openPrivacyService">{{ privacyServiceName }}</text>
<!-- #endif -->
{{ $lang('components.privacyPopup.descSuffix', { appName: appName }) }}
</view>
<view class="privacy-button-flex">
<button class="privacy-button-btn bg-disagree" @tap="handleDisagree">{{ $lang('components.privacyPopup.disagreeBtn') }}</button>
<!-- #ifdef QUICKAPP-WEBVIEW || MP-WEIXIN -->
<button id="agree-btn" class="privacy-button-btn bg-agree" open-type="agreePrivacyAuthorization"
@agreeprivacyauthorization="handleAgree">{{ $lang('components.privacyPopup.agreeBtn') }}</button>
<!-- #endif -->
<!-- #ifdef WEB || H5 -->
<button id="agree-btn" class="privacy-button-btn bg-agree" @tap="handleAgree" @click="handleAgree">{{ $lang('components.privacyPopup.agreeBtn') }}</button>
<!-- #endif -->
</view>
</view>
</view>
@@ -43,12 +43,12 @@ export default {
showPop: false,
privacyAuthorization: null,
privacyResolves: new Set(),
privacyContractName: '用户隐私保护指引',
appName: '本小程序',
privacyContractName: this.$lang('components.privacyPopup.defaultContractNameMp'),
appName: this.$lang('components.privacyPopup.defaultAppNameMp'),
// #ifdef WEB || H5
appName: '本应用',
privacyContractName: '《隐私条款》',
privacyServiceName: '《用户服务协议》',
appName: this.$lang('components.privacyPopup.defaultAppNameH5'),
privacyContractName: this.$lang('components.privacyPopup.defaultContractNameH5'),
privacyServiceName: this.$lang('components.privacyPopup.defaultServiceNameH5'),
// #endif
}
},
@@ -250,7 +250,7 @@ export default {
uni.setStorageSync('privacyAgreed', true);
uni.showModal({
content: '未同意隐私协议,无法使用相关功能',
content: this.$lang('components.privacyPopup.disagreeTip'),
success: () => {
this.$emit('disagree')
}

View File

@@ -11,59 +11,61 @@
<scroll-view scroll-y="true" class="register-box">
<view class="reward-content">
<view class="reward-item" v-if="reward.point > 0">
<view class="head">积分奖励</view>
<view class="head">{{ $lang('components.registerReward.pointReward') }}</view>
<view class="content">
<view class="info">
<view>
<text class="num">{{ reward.point }}</text>
<text class="type">积分</text>
<text class="type">{{ $lang('components.registerReward.points') }}</text>
</view>
<view class="desc">用于下单时抵现或兑换商品等</view>
<view class="desc">{{ $lang('components.registerReward.pointDesc') }}</view>
</view>
<view class="tip" @click="closeRewardPopup('point')">立即查看</view>
<view class="tip" @click="closeRewardPopup('point')">{{ $lang('components.registerReward.viewNow') }}</view>
</view>
</view>
<view class="reward-item" v-if="reward.growth > 0">
<view class="head">成长值</view>
<view class="head">{{ $lang('components.registerReward.growthValue') }}</view>
<view class="content">
<view class="info">
<view>
<text class="num">{{ reward.growth }}</text>
<text class="type">成长值</text>
<text class="type">{{ $lang('components.registerReward.growthValue') }}</text>
</view>
<view class="desc">用于提升会员等级</view>
<view class="desc">{{ $lang('components.registerReward.growthDesc') }}</view>
</view>
<view class="tip" @click="closeRewardPopup('growth')">立即查看</view>
<view class="tip" @click="closeRewardPopup('growth')">{{ $lang('components.registerReward.viewNow') }}</view>
</view>
</view>
<view class="reward-item" v-if="reward.balance > 0">
<view class="head">红包奖励</view>
<view class="head">{{ $lang('components.registerReward.balanceReward') }}</view>
<view class="content">
<view class="info">
<view>
<text class="num">{{ reward.balance }}</text>
<text class="type">元</text>
<text class="type">{{ $lang('components.registerReward.yuan') }}</text>
</view>
<view class="desc">不可提现下单时可用</view>
<view class="desc">{{ $lang('components.registerReward.balanceDesc') }}</view>
</view>
<view class="tip" @click="closeRewardPopup('balance')">立即查看</view>
<view class="tip" @click="closeRewardPopup('balance')">{{ $lang('components.registerReward.viewNow') }}</view>
</view>
</view>
<view class="reward-item" v-if="reward.coupon_list.length > 0">
<view class="head">优惠券奖励</view>
<view class="head">{{ $lang('components.registerReward.couponReward') }}</view>
<view class="content" v-for="(item, index) in reward.coupon_list" :key="index">
<view class="info">
<view>
<text class="num coupon-name">{{ item.coupon_name }}</text>
</view>
<view class="desc" v-if="item.at_least > 0">
满{{ item.at_least }}{{ item.type == 'discount' ? '打' + item.discount + '折' : '减' + item.money }}
<template v-if="item.type == 'discount'">{{ $lang('components.registerReward.couponMinSpendDiscount', { atLeast: item.at_least, discount: item.discount }) }}</template>
<template v-else>{{ $lang('components.registerReward.couponMinSpendReduce', { atLeast: item.at_least, money: item.money }) }}</template>
</view>
<view class="desc" v-else>
无门槛,{{ item.type == 'discount' ? '打' + item.discount + '折' : '减' + item.money }}
<template v-if="item.type == 'discount'">{{ $lang('components.registerReward.couponNoThresholdDiscount', { discount: item.discount }) }}</template>
<template v-else>{{ $lang('components.registerReward.couponNoThresholdReduce', { money: item.money }) }}</template>
</view>
</view>
<view class="tip" @click="closeRewardPopup('coupon')">立即查看</view>
<view class="tip" @click="closeRewardPopup('coupon')">{{ $lang('components.registerReward.viewNow') }}</view>
</view>
</view>
</view>

View File

@@ -6,21 +6,21 @@
hover-class="none"
class="contact-button"
@click="addWxWorkContact">
<text class="btn-text">{{ btnText }}</text>
<text class="btn-text">{{ displayBtnText }}</text>
</button>
<!-- 确认弹窗 -->
<uni-popup ref="confirmPopup" type="center">
<view class="confirm-popup">
<view class="popup-header">
<text>添加企业微信客服</text>
<text>{{ $lang('components.wxworkContact.popupTitle') }}</text>
</view>
<view class="popup-body">
<text>点击确定后将跳转至企业微信,添加专业客服为您服务</text>
<text>{{ $lang('components.wxworkContact.popupContent') }}</text>
</view>
<view class="popup-footer">
<button class="cancel-btn" @click="closePopup">取消</button>
<button class="confirm-btn" @click="confirmAdd">确定</button>
<button class="cancel-btn" @click="closePopup">{{ $lang('components.wxworkContact.cancelBtn') }}</button>
<button class="confirm-btn" @click="confirmAdd">{{ $lang('components.wxworkContact.confirmBtn') }}</button>
</view>
</view>
</uni-popup>
@@ -36,7 +36,7 @@
// 按钮文字
btnText: {
type: String,
default: '添加企业微信客服'
default: ''
},
// 企业ID(必需)
corpId: {
@@ -84,6 +84,11 @@
wxWorkSDK: null
};
},
computed: {
displayBtnText() {
return this.btnText || this.$lang('components.wxworkContact.defaultBtnText');
}
},
mounted() {
this.initWxWork();
},
@@ -142,7 +147,7 @@
// 方案2:使用SDK打开用户资料
this.openUserProfile(contactId);
} else {
this.showError('未配置企业微信客服信息');
this.showError(this.$lang('components.wxworkContact.notConfigured'));
}
// #endif
@@ -151,7 +156,7 @@
// H5环境直接跳转
window.location.href = contactUrl;
} else {
this.showError('未配置企业微信客服信息');
this.showError(this.$lang('components.wxworkContact.notConfigured'));
}
// #endif
},
@@ -165,13 +170,13 @@
path: `pages/contacts/externalContactDetail?url=${encodeURIComponent(contactUrl)}`,
success: () => {
this.$util.showToast({
title: '跳转成功',
title: this.$lang('components.wxworkContact.jumpSuccess'),
icon: 'success'
});
},
fail: (err) => {
console.error('跳转企业微信失败:', err);
this.showError('跳转失败,请检查企业微信配置');
this.showError(this.$lang('components.wxworkContact.jumpFailed'));
}
});
},
@@ -179,10 +184,10 @@
/**
* 打开用户资料
*/
openUserProfile(contactId) {
if (!this.wxWorkSDK) {
this.showError('企业微信SDK未初始化');
return;
openUserProfile(contactId) {
if (!this.wxWorkSDK) {
this.showError(this.$lang('components.wxworkContact.sdkNotInitialized'));
return;
}
this.wxWorkSDK.addContact({
@@ -190,7 +195,7 @@
}, (res) => {
}, (err) => {
console.error('打开用户资料失败:', err);
this.showError('打开用户资料失败');
this.showError(this.$lang('components.wxworkContact.openProfileFailed'));
});
},
@@ -199,7 +204,7 @@
*/
showError(message) {
uni.showModal({
title: '提示',
title: this.$lang('components.wxworkContact.tipTitle'),
content: message,
showCancel: false
});

View File

@@ -1,4 +1,29 @@
export const lang = {
//title为每个页面的标题
title: 'Case Studies',
// 案例列表
completionTime: 'Completion: {time}',
viewPdfFile: 'View PDF File',
// 在线留言弹窗
messagePopup: {
title: 'Leave a Message',
},
// 表单
form: {
name: 'Name',
namePlaceholder: 'Please enter your name',
contact: 'Contact',
mobilePlaceholder: 'Please enter your phone number',
messageContent: 'Message',
messagePlaceholder: 'Please enter your message',
},
// 提示
toast: {
loading: 'Loading',
fileNotExist: 'File does not exist',
},
}

View File

@@ -21,6 +21,13 @@ export const lang = {
searchTip: 'Please enter search keywords'
},
// diy custom page
diy: {
networkError: 'Network error, please try again later',
noDiyData: 'Custom page data not configured',
locationNotAvailable: 'Location not available',
},
//customer service
customer: {
weChatKefu: 'WeChat Customer Service',
@@ -53,6 +60,65 @@ export const lang = {
fromFloatButton: 'Inquiry from floating button',
},
// WeChat Work JS-SDK
wxworkJssdk: {
notInitialized: 'WeChat Work JS-SDK not initialized',
},
// WeChat Channel
wechatChannel: {
notWechat: 'Current environment is not a WeChat Mini Program',
lowVersion: 'WeChat base library version is too low, requires 2.19.2 or above',
notSupported: 'Current environment does not support WeChat Channel',
missingFields: 'Missing required field: {field}',
playFailed: 'WeChat video playback failed!',
},
// util utility functions
util: {
// upload
uploading: 'Uploading image',
uploadSuccess: 'Upload successful',
uploadFailed: 'Upload failed',
// copy
copySuccess: 'Copied successfully',
// date format
dateYear: 'Y',
dateMonth: 'M',
dateDay: 'D',
// week days
weekSunday: 'Sun',
weekMonday: 'Mon',
weekTuesday: 'Tue',
weekWednesday: 'Wed',
weekThursday: 'Thu',
weekFriday: 'Fri',
weekSaturday: 'Sat',
},
// AI service
aiService: {
// WebSocket errors
wsDomainInvalid: 'WebSocket domain configuration invalid',
wsAuthFailed: 'WebSocket authentication failed',
wsConnectionFailed: 'WebSocket connection failed',
wsConnectionClosed: 'WebSocket connection closed unexpectedly',
// Service errors
serviceUnavailable: 'AI service temporarily unavailable, please try again later',
serviceResponseError: 'AI service returned an error',
invalidResponse: 'Invalid response',
// Service status
statusNormal: 'Service normal',
statusAbnormal: 'Service abnormal',
statusCheckFailed: 'Service check failed',
// Conversation
conversationIdRequired: 'conversation_id is a required parameter',
getHistoryFailed: 'Failed to get conversation history',
getHistoryError: 'Error getting conversation history, please try again later',
// Connection
connectionFailed: 'Connection failed',
},
getDynacode: 'Get Code',
login: 'Login/Register',

View File

@@ -0,0 +1,26 @@
export const lang = {
// ===== ns-form component =====
'nsForm': {
// Selector placeholders
selectPlaceholder: 'Please select',
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,31 @@
export const lang = {
// ===== ns-payment component =====
'nsPayment': {
// Popup title
paymentMethod: 'Payment Method',
// Pay amount
payAmount: 'Pay {amount} CNY',
// Balance deduction
balanceDeduction: 'Balance Deduction',
availableBalance: 'Available ¥{amount}',
// Empty state
noPaymentMethod: 'No payment methods configured yet!',
// Button
confirmPay: 'Confirm Payment',
// Payment method names
alipay: 'Alipay',
wechatpay: 'WeChat Pay',
// Toast messages
pleaseSelectPaymentMethod: 'Please select a payment method!',
paying: 'Processing payment...',
payInfoNotFound: 'Failed to get payment info!',
paymentCancelled: 'Payment cancelled',
paymentFailed: 'Payment failed, reason: {reason}',
}
}

View File

@@ -0,0 +1,25 @@
export const lang = {
// ===== ns-select-time component =====
'nsSelectTime': {
// Popup titles
selectDeliveryTime: 'Select Delivery Time',
selectPickupTime: 'Select Pickup Time',
// Date labels
today: 'Today',
tomorrow: 'Tomorrow',
// Week day names (Sunday to Saturday, index 0-6 matches getDay())
sunday: 'Sun',
monday: 'Mon',
tuesday: 'Tue',
wednesday: 'Wed',
thursday: 'Thu',
friday: 'Fri',
saturday: 'Sat',
// Immediate delivery prefix/suffix (wraps time range, e.g. "Immediate delivery (09:00-10:00)")
immediateDeliveryPrefix: 'Immediate delivery (',
immediateDeliverySuffix: ')',
}
}

View File

@@ -0,0 +1,31 @@
export const lang = {
// ===== payment component =====
payment: {
// Popup title
title: 'Payment Method',
// Pay amount
payAmount: 'Pay {money} yuan',
// Balance payment
balancePay: 'Balance Payment',
availableBalance: 'Available {symbol}{balance}',
// Empty state
noPaymentMethod: 'No payment method configured!',
// Button
confirmPay: 'Confirm Payment',
// Payment method names
alipay: 'Alipay',
wechatpay: 'WeChat Pay',
// Toast messages
pleaseSelectPayMethod: 'Please select a payment method!',
paying: 'Paying...',
payInfoNotFound: 'Payment info not found!',
payCancelled: 'You have cancelled the payment',
payFailed: 'Payment failed, reason: {reason}',
}
}

View File

@@ -0,0 +1,27 @@
export const lang = {
// ===== privacy-popup component =====
privacyPopup: {
// Popup title
title: 'Privacy Protection Notice',
// Description text
descPrefix: 'Thank you for using {appName}. Before using, please read and agree to the',
descSuffix: '. When you tap "Agree and Continue", it means you have understood and agree to the terms, which will be legally binding on you. If you disagree, you will not be able to continue using {appName}.',
// Button text
disagreeBtn: 'Disagree',
agreeBtn: 'Agree and Continue',
// Default values - Mini Program
defaultContractNameMp: 'User Privacy Protection Guide',
defaultAppNameMp: 'this Mini Program',
// Default values - H5/Web
defaultAppNameH5: 'this App',
defaultContractNameH5: '《Privacy Policy》',
defaultServiceNameH5: '《User Service Agreement》',
// Toast message
disagreeTip: 'You have not agreed to the privacy policy, related features are unavailable',
}
}

View File

@@ -0,0 +1,32 @@
export const lang = {
// ===== register-reward component =====
registerReward: {
// Point reward
pointReward: 'Point Reward',
points: 'points',
pointDesc: 'Use for cash deduction or product exchange',
// Growth value
growthValue: 'Growth Value',
growthDesc: 'Used to upgrade membership level',
// Balance reward
balanceReward: 'Red Packet Reward',
yuan: ' yuan',
balanceDesc: 'Non-withdrawable, usable for orders',
// Coupon reward
couponReward: 'Coupon Reward',
// Coupon description - with minimum spend
couponMinSpendDiscount: 'Spend {atLeast}, get {discount}% off',
couponMinSpendReduce: 'Spend {atLeast}, save {money}',
// Coupon description - no threshold
couponNoThresholdDiscount: 'No threshold, {discount}% off',
couponNoThresholdReduce: 'No threshold, save {money}',
// Action button
viewNow: 'View Now',
}
}

View File

@@ -0,0 +1,21 @@
export const lang = {
// ===== wxwork-contact component =====
wxworkContact: {
// Default button text
defaultBtnText: 'Add WeChat Work Customer Service',
// Confirm popup
popupTitle: 'Add WeChat Work Customer Service',
popupContent: 'After clicking confirm, you will be redirected to WeChat Work to add a professional customer service agent',
cancelBtn: 'Cancel',
confirmBtn: 'Confirm',
// Tips
tipTitle: 'Tip',
jumpSuccess: 'Jump successful',
jumpFailed: 'Jump failed, please check WeChat Work configuration',
notConfigured: 'WeChat Work customer service not configured',
sdkNotInitialized: 'WeChat Work SDK not initialized',
openProfileFailed: 'Failed to open user profile',
}
}

View File

@@ -1,18 +1,18 @@
export const lang = {
//title为每个页面的标题
title: 'Electronic Card',
onlineMessage: 'Online Message',
call: 'One-click Call',
copy: 'Copy',
copyFailed: 'Copy Failed',
copySuccess: 'Copy Success',
oneClickNavigation: 'One-click Navigation',
name: 'Name',
contactInfo: 'Contact Info',
messageContent: 'Message Content',
pleaseEnterName: 'Please enter your name',
pleaseEnterMobile: 'Please enter your phone number',
pleaseEnterMessage: 'Please enter your message',
submit: 'Submit',
exclusiveCustomerService: 'Exclusive Customer Service'
// Section titles
enterpriseFiles: 'Enterprise Files',
enterpriseVideos: 'Enterprise Videos',
// Share
contactUs: 'Contact Us',
// Toast messages
videoUrlNotExist: 'Video URL does not exist',
pleaseFillName: 'Please fill in your name',
invalidMobileFormat: 'Invalid mobile number format',
pleaseFillMessage: 'Please fill in the message content',
submitSuccess: 'Submitted successfully',
submitFailed: 'Submission failed, please try again',
}

View File

@@ -1,4 +1,56 @@
export const lang = {
//title为每个页面的标题
title: 'Coupon Collection'
}
//title is the title of each page
title: 'Coupon Collection',
// ====== Tabs ======
// All
tabAll: 'All',
// Reward coupon
tabReward: 'Reward',
// Discount coupon
tabDiscount: 'Discount',
// ====== Coupon Info ======
// Discount display: {discount} off
discountText: '{discount}% off',
// Minimum spend condition: Available with {atLeast} yuan spend
minSpendAvailable: 'Available with {atLeast} yuan spend',
// No threshold coupon
noThresholdCoupon: 'No threshold coupon',
// Specified goods
specifiedGoods: 'Specified goods',
// All goods
allGoods: 'All goods',
// Maximum discount: (Max discount {amount} yuan)
maxDiscount: '(Max discount {amount} yuan)',
// ====== Valid Period ======
// Valid until: Valid until {date}
validPeriodDate: 'Valid until: {date}',
// Valid for N days after receipt: Valid for {days} days after receipt
validPeriodDays: 'Valid for {days} days after receipt',
// Long-term valid: Long-term valid
validPeriodLong: 'Long-term valid',
// ====== Buttons & Status ======
// Receive
receive: 'Receive',
// Use now
useNow: 'Use Now',
// Sold out
soldOut: 'Sold Out',
// Expired
expired: 'Expired',
// Limit reached
limitReached: 'Limit Reached',
// ====== Empty State ======
// No available coupons
emptyText: 'No available coupons',
// ====== Toast Messages ======
// Merchant not enabled coupons
merchantNotEnabled: 'Merchant has not enabled coupons',
// Receive success message
receiveSuccess: 'Successfully received, go use it now'
}

View File

@@ -1,4 +1,47 @@
export const lang = {
//title为每个页面的标题
title: 'Receive Coupon'
}
//title is the title of each page
title: 'Receive Coupon',
// ====== Coupon Info ======
// Discount display: {discount} off
discountText: '{discount}% off',
// Minimum spend condition: Spend {atLeast} yuan to use
minSpendUsage: 'Spend {atLeast} yuan to use',
// No threshold coupon
noThresholdCoupon: 'No threshold coupon',
// Valid until: Valid until {endTime}
validUntil: 'Valid until {endTime}',
// Valid for N days after receipt: Valid for {fixedTerm} days after receipt
validDaysAfterReceive: 'Valid for {fixedTerm} days after receipt',
// Long-term valid
longTermValid: 'Long-term valid',
// Applicable stores: Applicable stores: {storeName}
applicableStores: 'Applicable stores: {storeName}',
// Scan QR code share tip
scanShareTip: 'Note: Scan QR code or click top-right to share',
// ====== Button Text ======
receive: 'Receive',
// Coupon sold out
couponSoldOut: 'Sorry, this coupon has been fully claimed!',
// Activity ended
activityEnded: 'This coupon activity has ended!',
// Activity closed
activityClosed: 'This coupon activity has been closed',
// Receive limit reached
receiveLimitReached: 'Coupon receive limit reached!',
// ====== Toast Messages ======
// Merchant not enabled coupons
merchantNotEnabled: 'Merchant has not enabled coupons',
// Receive success
receiveSuccess: 'Successfully received',
// ====== Share Text ======
// Congrats money coupon: Congratulations, you got a {money} yuan coupon
congratsMoneyCoupon: 'Congratulations, you got a {money} yuan coupon',
// Congrats discount coupon: Congratulations, you got a {discount}% off coupon
congratsDiscountCoupon: 'Congratulations, you got a {discount}% off coupon',
// Minimum spend available: Available with {atLeast} yuan spend
minSpendAvailable: 'Available with {atLeast} yuan spend'
}

View File

@@ -92,6 +92,8 @@ export const lang = {
couponSoldOut: 'Sold out',
couponClaimed: 'Claimed',
couponReceive: 'Claim',
couponAlreadyClaimed: 'You have already claimed this coupon',
couponClaimSuccess: 'Coupon claimed successfully',
// Promotions
promotion: 'Promotion',
@@ -99,6 +101,18 @@ export const lang = {
fullGift: 'Full Gift',
freeShipping: 'Free Shipping',
// Manjian promotion text templates
manjianUnitYuan: 'yuan',
manjianUnitPiece: 'pcs',
manjianItemSeparator: '; ',
fullReductionItem: 'Spend {limit} {unit}, save {money}',
fullGiftPoints: '{point} points',
fullGiftDiscountCoupon: '{count} {discount}% off coupon(s)',
fullGiftMoneyCoupon: '{count} {money} yuan coupon(s)',
fullGiftConnector: ' + ',
fullGiftItem: 'Spend {limit} {unit}, get {gift}',
freeShippingItem: 'Free shipping on {limit} {unit}',
// Product Message
productMessage: 'Product Message',
@@ -113,4 +127,60 @@ export const lang = {
// Common Button
confirm: 'Confirm',
// Goods detail view component (goods-detail-view)
detailView: {
// Delivery area
notConfigured: 'Not configured',
serviceLabel: 'Service',
// Merchant certification
officialCertifiedMerchant: 'Officially certified merchant, trustworthy!',
// Popup titles
deliveryTitle: 'Delivery',
merchantsServiceTitle: 'Product Services',
storeListTitle: 'Store List',
// Store related
distance: '{distance} away',
businessHours: 'Hours: {time}',
// Community
addCommunity: 'Add',
// Evaluate area
evaluate: 'Reviews',
noEvaluate: 'No reviews yet',
viewAll: 'View all',
// Spec attributes
specAttrTitle: 'Specifications',
expand: 'Expand',
collapse: 'Collapse',
// PDF document
defaultDocName: 'Product Document',
viewDocDetail: 'Click to view document details',
view: 'View',
// Poster
saveImage: 'Save Image',
longPressToSave: 'Long press to save',
// Share popup
shareTitle: 'Share',
shareToFriends: 'Share to Friends',
shareToGoodsCircle: 'Share to Good Circle',
generateSharePoster: 'Generate Poster',
copyLink: 'Copy Link',
cancelShare: 'Cancel',
// Toast messages
posterGenerating: 'Generating poster...',
saveSuccess: 'Saved successfully',
saveFailed: 'Save failed, please try again later',
loading: 'Loading',
fileNotExist: 'File does not exist',
}
}

View File

@@ -1,12 +1,32 @@
export const lang = {
//title为每个页面的标题
title: 'Find Password',
findPassword: 'Find Password',
accountPlaceholder: 'Please enter mobile number',
captchaPlaceholder: 'Please enter verification code',
dynacodePlaceholder: 'Please enter dynamic code',
passwordPlaceholder: 'Please enter new password',
rePasswordPlaceholder: 'Please confirm new password',
next: 'Next',
save: 'Confirm Modification'
}
// Find Password
find: {
// Step titles
step0Title: 'Please enter your phone number',
step1Title: 'Please enter the verification code',
step2Title: 'Please set a new password',
// Step tips
step0Tip: 'Please confirm your account is bound to this phone number',
step1Tip: 'Verification code sent to: {mobile}',
step2Tip: 'We recommend a simple and memorable password',
// Button text
resendCode: 'Resend',
resendCountdown: 'Resend ({seconds}s)',
// Validation error messages
mobileInvalid: 'Please enter a valid phone number',
mobileNotRegistered: 'This phone number is not registered',
passwordRequired: 'Please enter password',
passwordTooShort: 'Password must be at least {length} characters',
passwordMismatch: 'The two passwords do not match',
// Password complexity提示 (in concatenation order, including separators)
passwordComplexityPrefix: 'Password must contain',
complexityNumber: ' numbers',
complexityLowercase: ', lowercase letters',
complexityUppercase: ', uppercase letters',
complexitySymbol: ', special characters',
}
};

View File

@@ -7,9 +7,17 @@ export const lang = {
mobilePhone: 'Mobile Number',
mobilePhonePlaceholder: 'Please enter mobile number',
accountType: 'Account Type',
bankInfo: 'Branch Information',
bankInfoPlaceholder: 'Please enter branch information',
bankName: 'Bank Name',
bankNamePlaceholder: 'Please enter bank name',
withdrawalAccount: 'Withdrawal Account',
withdrawalAccountPlaceholder: 'Please enter withdrawal account',
save: 'Save'
}
save: 'Save',
pleaseEnterName: 'Please enter name',
pleaseEnterMobile: 'Please enter mobile number',
pleaseEnterValidMobile: 'Please enter a valid mobile number',
pleaseSelectAccountType: 'Please select account type',
pleaseEnterBankName: 'Please enter bank name',
pleaseEnterWithdrawalAccount: 'Please enter withdrawal account',
addSuccess: 'Added successfully',
editSuccess: 'Modified successfully'
}

View File

@@ -1,3 +1,19 @@
export const lang = {
title: 'Account Cancellation',
}
riskTip: 'Risk Warning: After confirming the application, your assets will be cleared and cannot be recovered!',
accountAssets: 'Account Assets',
point: 'Points',
cashBalance: 'Cash Balance',
storedValueBalance: 'Stored Value Balance',
coupon: 'Coupons',
orderAssets: 'Order Assets',
waitDelivery: 'Pending Shipment',
waitReceive: 'Pending Receipt',
refunding: 'Refunding',
fenxiaoAssets: 'Distribution Assets',
withdrawableCommission: 'Withdrawable Commission',
withdrawingCommission: 'Withdrawing Commission',
waitSettleOrder: 'Pending Settlement Orders',
prevStep: 'Previous',
confirmApply: 'Confirm Application',
}

View File

@@ -1,4 +1,38 @@
export const lang = {
//title为每个页面的标题
title: 'Membership Card'
}
//title is the title of each page
title: 'Membership Card',
// Member info
validUntil: 'Valid until: ',
// Membership card description
enjoyDiscountAnd: ' can enjoy consumption discounts and',
memberGiftBenefits: 'member gift packages and other benefits',
// Member benefits
memberBenefits: 'Member Benefits',
freeShipping: 'Free Shipping',
enjoyFreeShipping: 'Enjoy free shipping service',
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: 'Get {points} points',
redPacketGift: 'Red Packet Gift',
giftRedPacket: 'Get {amount} yuan red packet',
couponGift: 'Coupon Gift',
giftCoupons: 'Get {count} coupons',
// Action buttons
renewNow: 'Renew Now',
// Popup
cardDescription: 'Membership Card Description',
// Share
shareTitle: 'Exclusive member benefits, come and experience',
}

View File

@@ -1,4 +1,47 @@
export const lang = {
//title为每个页面的标题
title: 'My Coupons'
}
//title is the title of each page
title: 'My Coupons',
// ====== Tabs ======
// Unused
tabUnused: 'Unused',
// Used
tabUsed: 'Used',
// Expired
tabExpired: 'Expired',
// ====== Coupon Info ======
// Discount display: {discount}% off
discountText: '{discount}% off',
// Minimum amount condition: Available with {amount} yuan spend
minAmountCondition: 'Min. {amount} available',
// No threshold coupon
noThresholdCoupon: 'No threshold coupon',
// Specified goods
specifiedGoods: 'Specified goods',
// Maximum discount: (Max discount {amount} yuan)
maxDiscount: '(Max discount {amount})',
// ====== Valid Period ======
// Valid period prefix
validPeriodPrefix: 'Valid: ',
// Long-term valid
longTermValid: 'Long-term valid',
// ====== Buttons & Status ======
// Use now
useNow: 'Use Now',
// Used
used: 'Used',
// Expired
expired: 'Expired',
// ====== Empty State ======
// No coupons yet
emptyText: 'No coupons yet',
// Go shopping
goShopping: 'Go Shopping',
// ====== Toast Messages ======
// Merchant has not enabled coupons
merchantNotEnabled: 'Merchant has not enabled coupons'
}

View File

@@ -1,5 +1,5 @@
export const lang = {
//title为每个页面的标题
//title is the title of each page
title: 'Member Level',
defaultLevelTips: 'You are already the highest level member!',
tag: 'Exclusive Tag',
@@ -13,5 +13,48 @@ export const lang = {
equity: 'Benefits',
giftPackage: 'Upgrade Gift Pack',
levelExplain: 'Level Explanation',
upgradeTips: 'Upgrade membership to enjoy exclusive benefits'
}
upgradeTips: 'Upgrade membership to enjoy exclusive benefits',
// Current level label
currentLevelLabel: 'Current Level: ',
// Growth rules
growthRules: 'Growth Rules',
// Current level tag
currentLevelTag: 'Current Level',
// Current growth value
currentGrowthValue: 'Current Growth',
// Next level progress tip
growthToNextLevel: 'Earn {needGrowth} more growth points to become {levelName}',
// Max level reached
maxLevelReached: 'You have reached the highest level',
// Member benefits
memberBenefits: 'Member Benefits',
// Free shipping
freeShipping: 'Free Shipping',
freeShippingDesc: 'Free shipping on all products',
// Consumption discount
consumptionDiscount: 'Consumption Discount',
noDiscountDesc: 'No consumption discount or other benefits',
discountDescWithValue: 'Enjoy {discount}% consumption discount',
// Points reward
pointsReward: 'Points Reward',
pointsRewardDesc: 'Earn {multiplier}x points multiplier',
// Member gift pack
memberGift: 'Member Gift Pack',
// Points gift
pointsGift: 'Points Gift',
giftPoints: 'Gift: {points} points',
// Red packet gift
redPacketGift: 'Red Packet Gift',
giftRedPacket: 'Gift: {amount} yuan red packet',
// Coupon gift
couponGift: 'Coupon Gift',
giftCoupons: 'Gift: {count} coupons',
// Coupon popup
coupons: 'Coupons',
// Currency unit
yuan: ' yuan',
// Discount unit
zhe: '% off',
// Loading tip
navigatingToDetail: 'Navigating to detail page'
}

View File

@@ -0,0 +1,18 @@
export const lang = {
//title is the title of each page
title: 'Growth Value Rules',
// Table headers
level: 'Level',
growthValue: 'Growth Value',
// What is growth value
whatIsGrowthValue: 'What is Growth Value',
growthValueDescription: 'Growth value is calculated from purchases after a consumer becomes a member of the store. Growth value determines the membership level. The higher the membership level, the more member benefits and gift packages you can enjoy.',
// How to get growth value
howToGetGrowthValue: 'How to Earn Growth Value',
ruleRegister: '1. Earn x growth points for registering as a member.',
ruleRecharge: '2. Earn x growth points for recharging balance.',
ruleCheckin: '3. Earn x growth points for daily check-in.',
ruleConsume: '4. Earn x growth points for every x yuan spent when the transaction is completed.',
// Loading tip
navigatingToDetail: 'Navigating to detail page'
}

View File

@@ -1,3 +1,28 @@
export const lang = {
title: 'Payment Password',
}
// Tips
passwordTips: 'Please enter a 6-digit payment password. It is recommended not to use repeated or consecutive numbers.',
codeSentTips: 'Verification code has been sent to {mobile}. Please enter the 4-digit code below.',
// Action tips
inputSmsCode: 'Enter SMS verification code',
setPayPassword: 'Please set payment password',
inputAgain: 'Please enter again',
// Buttons
confirm: 'Confirm',
getCode: 'Get Code',
getDynacode: 'Get Dynamic Code',
// Modal
tipsTitle: 'Tip',
bindMobileFirst: 'You need to bind your mobile number first to set a payment password. Bind now?',
// Toast
modifySuccess: 'Modified successfully',
passwordMismatch: 'The two passwords do not match',
// Countdown
resendAfter: 'Resend after {seconds}s',
}

View File

@@ -1,4 +1,39 @@
export const lang = {
//title为每个页面的标题
//title is the title of each page
title: 'Merchant Home',
// Search
searchPlaceholder: 'Please enter the product you want to search for',
// Description expand/collapse
desc: {
scrollUpToViewMore: 'Swipe up to view more',
collapse: '↑ Collapse',
expand: '↓ Expand',
},
// Sort
sort: {
comprehensive: 'Comprehensive',
sales: 'Sales',
price: 'Price',
filter: 'Filter',
},
// Goods list
goods: {
consultNow: 'Consult Now',
sold: 'Sold {num}{unit}',
defaultUnit: 'pcs',
noGoods: 'No products',
},
// Filter drawer
filter: {
title: 'Filter',
allCategories: 'All Categories',
all: 'All',
reset: 'Reset',
confirm: 'Confirm',
},
}

View File

@@ -2,4 +2,71 @@ export const lang = {
//title为每个页面的标题
title: 'Edit Product',
addTitle: 'Add Product',
// Product status
grounding: {
offShelf: 'Off Shelf',
onShelf: 'On Shelf',
},
// Pickup type
pickupType: {
sameDay: 'Same Day Delivery',
nextDay: 'Next Day Delivery',
dayAfter: 'Day After Delivery',
},
// Virtual delivery type
virtualDeliver: {
auto: 'Automatic Delivery',
manual: 'Manual Delivery',
verify: 'In-store Verification',
},
// Virtual receive type
virtualReceive: {
auto: 'Automatic Receipt',
buyerConfirm: 'Buyer Confirm Receipt',
},
// Validity type
validityType: {
permanent: 'Permanent',
daysAfterPurchase: 'Valid for Days After Purchase',
specifiedDate: 'Specified Expiry Date',
},
// Card code
carmi: {
add: 'Add Card Code',
addWithCount: 'Add Card Code [{count}]',
},
// Limit type
limitType: {
single: 'Single Purchase Limit',
longTerm: 'Long-term Purchase Limit',
},
// Messages
message: {
goodsNotExist: 'Product does not exist',
maxCategory: 'Product can belong to multiple categories, maximum 10',
pleaseEnterGoodsName: 'Please enter product name',
subtitleMaxLength: 'Product description cannot exceed {max} characters',
pleaseUploadGoodsImage: 'Please upload product images',
pleaseEnterSalePrice: 'Please enter sale price',
salePriceFormatError: '[Sale Price] format input error',
originalPriceFormatError: '[Original Price] format input error',
pleaseEnterStock: 'Please enter stock',
stockFormatError: '[Stock] format input error',
minOrderFormatError: '[Minimum Order] format input error',
minOrderNotLessThanZero: 'Minimum order quantity cannot be less than 0',
},
// Placeholder
placeholder: {
selectGoodsForm: 'Please select product form',
selectSupplier: 'Please select supplier',
},
}

View File

@@ -1,4 +1,50 @@
export const lang = {
//title为每个页面的标题
title: 'Order Details'
}
//title for each page
title: 'Order Details',
// ====== Order Status ======
status: {
pendingPayment: 'Pending Payment',
completed: 'Completed',
closed: 'Closed'
},
// ====== Goods ======
goods: {
points: 'points'
},
// ====== Order Info ======
orderInfo: {
orderNo: 'Order No.:',
copy: 'Copy',
outTradeNo: 'Trade No.:',
createTime: 'Created:',
closeTime: 'Closed:'
},
// ====== Amount ======
amount: {
pointsUsed: 'Points Used',
deliveryFee: 'Shipping',
totalPayable: 'Total Payable:'
},
// ====== Buttons ======
button: {
close: 'Close',
pay: 'Pay'
},
// ====== Modal ======
modal: {
tip: 'Tip',
confirmClose: 'Are you sure to close this exchange?'
},
// ====== Toast Messages ======
toast: {
orderInfoNotFound: 'Order information not found!',
closeSuccess: 'Closed successfully'
}
}

View File

@@ -9,5 +9,24 @@ export const lang = {
waitEvaluate: 'Pending Review',
waitUse: 'Pending Use',
update: "Release to refresh",
updateIng: "Loading..."
}
updateIng: "Loading...",
// Search
searchPlaceholder: 'Please enter product name/order number',
// Order info
orderNo: 'Order No.: ',
totalGoods: '{num} items total',
actualPayment: 'Total: ',
remainingTime: 'Remaining: ',
// Action buttons
evaluate: 'Review',
review: 'Add Review',
viewDetail: 'View Details',
// Status Tabs (mapped by status value)
status: {
all: 'All',
waitpay: 'Pending Payment',
waitsend: 'Pending Shipment',
waitconfirm: 'Pending Receipt',
waitrate: 'Completed'
}
}

View File

@@ -96,6 +96,26 @@ export const lang = {
confirm: 'OK'
},
// ====== Promotion Description ======
promotion: {
title: 'Discounts & Gifts',
yuan: ' yuan',
piece: ' pcs',
points: ' points',
manjianFirst: 'Spend {limit}{unit}, save {money} yuan',
manjianMore: '; Spend {limit}{unit}, save {money} yuan',
couponDiscountFirst: 'get {num} {discount}% off coupon',
couponDiscountMore: ', get {num} {discount}% off coupon',
couponMoneyFirst: 'get {num} {money} yuan coupon',
couponMoneyMore: ', get {num} {money} yuan coupon',
mansongFirst: 'Spend {limit}{unit}, {text}',
mansongMore: '; Spend {limit}{unit}, {text}',
pointGain: 'earn {point} points',
pointFirst: 'Spend {limit}{unit}, {pointText}',
pointMore: '; Spend {limit}{unit}, {pointText}',
freeShipping: 'Free shipping on orders over {limit}{unit}'
},
// ====== Buyer Message Popup ======
buyerMessagePopup: {
title: 'Buyer Message',

View File

@@ -1,4 +1,37 @@
export const lang = {
//title为每个页面的标题
title: 'Apply for Refund',
}
// ====== Refund Type Selection ======
refundType: {
refundOnly: 'Refund Only',
refundOnlyDesc: 'Item not received, or seller agreed to refund without return',
returnRefund: 'Return & Refund',
returnRefundDesc: 'Item received, need to return the goods'
},
// ====== Refund Form ======
form: {
refundReason: 'Refund Reason:',
refundAmount: 'Refund Amount:',
refundRemark: 'Refund Remark',
pleaseSelect: 'Please Select',
remarkPlaceholder: 'Please enter refund remark (optional)'
},
// ====== Refund Reason Popup ======
reasonPopup: {
title: 'Refund Reason',
confirm: 'Confirm'
},
// ====== Toast Messages ======
toast: {
noRefundInfo: 'Failed to get refund information for this order item'
},
// ====== Form Validation ======
validate: {
pleaseSelectRefundReason: 'Please select a refund reason'
}
}

View File

@@ -0,0 +1,29 @@
export const lang = {
// Search
searchPlaceholder: 'Please enter product keywords',
// Sort
comprehensive: 'Comprehensive',
points: 'Points',
newArrival: 'New Arrival',
filter: 'Filter',
// Goods list
stock: 'Stock',
noGoods: 'No point products available',
// Filter drawer
pointRange: 'Point Range',
minPlaceholder: 'Min',
maxPlaceholder: 'Max',
allCategories: 'All Categories',
all: 'All',
reset: 'Reset',
confirm: 'Confirm',
// Tips
pleaseEnterMaxPrice: 'Please enter the maximum price',
priceCannotBeLessThanZero: 'Filter price cannot be less than 0',
minCannotBeGreaterThanMax: 'Minimum price cannot be greater than maximum price',
maxCannotBeLessThanMin: 'Maximum price cannot be less than minimum price',
}

View File

@@ -59,5 +59,32 @@ export const lang = {
pointsSuffix: ' pts',
submitOrder: 'Submit Order',
shortByForMinimum: '{amount} more for minimum order'
},
// ====== Toast Messages ======
toast: {
orderDataNotFound: 'Failed to get data required for order creation!',
pleaseEnterMobile: 'Please enter your mobile number',
pleaseEnterCorrectMobile: 'Please enter a valid mobile number',
noDeliveryMethod: 'Merchant has not set up delivery methods',
pleaseSelectAddress: 'Please select your delivery address first',
noPickupStore: 'No stores available for pickup, please choose another delivery method',
pleaseEnterReservedMobile: 'Please enter your reserved phone number',
pleaseEnterCorrectReservedMobile: 'Please enter a valid reserved phone number',
pleaseSelectPickupTime: 'Please select pickup time',
noDeliveryStore: 'No stores available for delivery, please choose another delivery method',
pleaseSelectDeliveryTime: 'Please select delivery time'
},
// ====== Modal ======
modal: {
orderNotCreated: 'Order Not Created',
goToSet: 'Go to Set'
},
// ====== Time Selection ======
time: {
today: 'Today',
tomorrow: 'Tomorrow'
}
}

View File

@@ -1,4 +1,14 @@
export const lang = {
//title为每个页面的标题
title: 'Recharge List'
}
title: 'Recharge List',
rechargeAmount: 'Recharge Amount',
rechargeRecords: 'Recharge Records',
placeholderEnterAmount: 'Please enter recharge amount',
yuan: 'yuan',
salePrice: 'Sale price {price} yuan',
amount: 'Amount',
confirmRecharge: 'Confirm Recharge',
recharge: 'Recharge',
pleaseEnterAmount: 'Please enter recharge amount',
pleaseSelectPackage: 'Please select a package'
}

View File

@@ -1,4 +1,29 @@
export const lang = {
//title为每个页面的标题
title: '案例展示',
// 案例列表
completionTime: '完成时间:{time}',
viewPdfFile: '查看PDF文件',
// 在线留言弹窗
messagePopup: {
title: '在线留言',
},
// 表单
form: {
name: '姓名',
namePlaceholder: '请输入您的姓名',
contact: '联系方式',
mobilePlaceholder: '请输入您的手机号',
messageContent: '留言内容',
messagePlaceholder: '请输入留言内容',
},
// 提示
toast: {
loading: '正在加载',
fileNotExist: '文件不存在',
},
}

View File

@@ -28,6 +28,13 @@ export const lang = {
weChatWorkKefu: '企业微信客服',
},
// diy 自定义页面
diy: {
networkError: '网络异常,请稍后重试',
noDiyData: '未配置自定义页面数据',
locationNotAvailable: '未获取到定位',
},
// 客服服务
customerService: {
openFailed: '打开客服失败',
@@ -53,6 +60,65 @@ export const lang = {
fromFloatButton: '来自悬浮按钮的咨询',
},
// 企业微信JS-SDK
wxworkJssdk: {
notInitialized: '企业微信JS-SDK未初始化',
},
// 微信视频号
wechatChannel: {
notWechat: '当前环境不是微信小程序',
lowVersion: '当前微信基础库版本过低,需要 2.19.2 或以上版本',
notSupported: '当前环境不支持微信视频号',
missingFields: '缺少必要字段: {field}',
playFailed: '微信视频播放失败!',
},
// util 工具函数
util: {
// 上传相关
uploading: '图片上传中',
uploadSuccess: '上传成功',
uploadFailed: '上传失败',
// 复制相关
copySuccess: '复制成功',
// 日期格式
dateYear: '年',
dateMonth: '月',
dateDay: '日',
// 星期
weekSunday: '周日',
weekMonday: '周一',
weekTuesday: '周二',
weekWednesday: '周三',
weekThursday: '周四',
weekFriday: '周五',
weekSaturday: '周六',
},
// AI 客服服务
aiService: {
// WebSocket 相关错误
wsDomainInvalid: 'WebSocket 域名配置无效',
wsAuthFailed: 'WebSocket 认证失败',
wsConnectionFailed: 'WebSocket 连接失败',
wsConnectionClosed: 'WebSocket 连接意外关闭',
// 服务相关错误
serviceUnavailable: 'AI服务暂时不可用,请稍后重试',
serviceResponseError: 'AI服务返回错误',
invalidResponse: '无效响应',
// 服务状态
statusNormal: '服务正常',
statusAbnormal: '服务异常',
statusCheckFailed: '服务检查失败',
// 会话相关
conversationIdRequired: '会话ID(conversation_id)是必填参数',
getHistoryFailed: '获取会话历史失败',
getHistoryError: '获取会话历史时发生错误,请稍后重试',
// 连接相关
connectionFailed: '连接失败',
},
login: '登录/注册',
loginTips: '点击登录 享受更多精彩信息',
toLogin: '去登录',

View File

@@ -0,0 +1,26 @@
export const lang = {
// ===== ns-form 组件 =====
'nsForm': {
// 选择器占位文本
selectPlaceholder: '请选择',
selectProvinceCity: '请选择省市',
selectProvinceCityDistrict: '请选择省市区/县',
// 验证提示 - 必填
pleaseInput: '请输入{title}',
pleaseSelect: '请选择{title}',
pleaseSelectAtLeastOne: '请至少选择一个{title}',
pleaseUploadAtLeastOne: '请至少上传一张{title}',
// 验证提示 - 格式校验
idCardInvalid: '身份证输入不合法',
mobileInvalid: '手机号输入不合法',
// 验证提示 - 范围校验
endDateBeforeStartDate: '结束日期不能小于开始日期',
endTimeBeforeStartTime: '结束时间必须大于开始时间',
// 图片上传
maxUploadImages: '最多上传{max}张图片',
}
}

View File

@@ -0,0 +1,31 @@
export const lang = {
// ===== ns-payment 组件 =====
'nsPayment': {
// 弹窗标题
paymentMethod: '支付方式',
// 支付金额
payAmount: '支付金额{amount}元',
// 余额抵扣
balanceDeduction: '余额抵扣',
availableBalance: '可用¥{amount}',
// 空状态
noPaymentMethod: '平台尚未配置支付方式!',
// 按钮
confirmPay: '确认支付',
// 支付方式名称
alipay: '支付宝支付',
wechatpay: '微信支付',
// 提示文案
pleaseSelectPaymentMethod: '请选择支付方式!',
paying: '支付中...',
payInfoNotFound: '未获取到支付信息!',
paymentCancelled: '您已取消支付',
paymentFailed: '支付失败,失败原因: {reason}',
}
}

View File

@@ -0,0 +1,25 @@
export const lang = {
// ===== ns-select-time 组件 =====
'nsSelectTime': {
// 弹窗标题
selectDeliveryTime: '选择送达时间',
selectPickupTime: '选择自提时间',
// 日期标签
today: '今天',
tomorrow: '明天',
// 星期名称(按周日到周六顺序,索引 0-6 对应 getDay() 返回值)
sunday: '周日',
monday: '周一',
tuesday: '周二',
wednesday: '周三',
thursday: '周四',
friday: '周五',
saturday: '周六',
// 立即配送前后缀(用于拼接时间范围,如"立即配送(09:00-10:00)")
immediateDeliveryPrefix: '立即配送(',
immediateDeliverySuffix: ')',
}
}

View File

@@ -0,0 +1,31 @@
export const lang = {
// ===== payment 组件 =====
payment: {
// 弹窗标题
title: '支付方式',
// 支付金额
payAmount: '支付金额{money}元',
// 余额支付
balancePay: '余额支付',
availableBalance: '可用{symbol}{balance}',
// 空状态
noPaymentMethod: '平台尚未配置支付方式!',
// 按钮
confirmPay: '确认支付',
// 支付方式名称
alipay: '支付宝支付',
wechatpay: '微信支付',
// 提示文案
pleaseSelectPayMethod: '请选择支付方式!',
paying: '支付中...',
payInfoNotFound: '未获取到支付信息!',
payCancelled: '您已取消支付',
payFailed: '支付失败,失败原因: {reason}',
}
}

View File

@@ -0,0 +1,27 @@
export const lang = {
// ===== privacy-popup 组件 =====
privacyPopup: {
// 弹窗标题
title: '用户隐私保护提示',
// 描述文本
descPrefix: '感谢您使用{appName},在使用前您应当阅读并同意',
descSuffix: ',当点击同意并继续时,即表示您已理解并同意该条款内容,该条款将对您产生法律约束力;如您不同意,将无法继续使用{appName}相关功能。',
// 按钮文字
disagreeBtn: '不同意',
agreeBtn: '同意并继续',
// 默认值 - 小程序端
defaultContractNameMp: '用户隐私保护指引',
defaultAppNameMp: '本小程序',
// 默认值 - H5/Web 端
defaultAppNameH5: '本应用',
defaultContractNameH5: '《隐私条款》',
defaultServiceNameH5: '《用户服务协议》',
// 提示文案
disagreeTip: '未同意隐私协议,无法使用相关功能',
}
}

View File

@@ -0,0 +1,32 @@
export const lang = {
// ===== register-reward 组件 =====
registerReward: {
// 积分奖励
pointReward: '积分奖励',
points: '积分',
pointDesc: '用于下单时抵现或兑换商品等',
// 成长值
growthValue: '成长值',
growthDesc: '用于提升会员等级',
// 红包奖励
balanceReward: '红包奖励',
yuan: '元',
balanceDesc: '不可提现下单时可用',
// 优惠券奖励
couponReward: '优惠券奖励',
// 优惠券描述 - 有门槛
couponMinSpendDiscount: '满{atLeast}打{discount}折',
couponMinSpendReduce: '满{atLeast}减{money}',
// 优惠券描述 - 无门槛
couponNoThresholdDiscount: '无门槛,打{discount}折',
couponNoThresholdReduce: '无门槛,减{money}',
// 操作按钮
viewNow: '立即查看',
}
}

View File

@@ -0,0 +1,21 @@
export const lang = {
// ===== wxwork-contact 组件 =====
wxworkContact: {
// 按钮默认文字
defaultBtnText: '添加企业微信客服',
// 确认弹窗
popupTitle: '添加企业微信客服',
popupContent: '点击确定后将跳转至企业微信,添加专业客服为您服务',
cancelBtn: '取消',
confirmBtn: '确定',
// 提示相关
tipTitle: '提示',
jumpSuccess: '跳转成功',
jumpFailed: '跳转失败,请检查企业微信配置',
notConfigured: '未配置企业微信客服信息',
sdkNotInitialized: '企业微信SDK未初始化',
openProfileFailed: '打开用户资料失败',
}
}

View File

@@ -1,18 +1,18 @@
export const lang = {
//title为每个页面的标题
title: '电子名片',
onlineMessage: '在线留言',
call: '一键拨打',
copy: '复制',
copyFailed: '复制失败',
copySuccess: '复制成功',
oneClickNavigation: '一键导航',
name: '姓名',
contactInfo: '联系方式',
messageContent: '留言内容',
pleaseEnterName: '请输入您的姓名',
pleaseEnterMobile: '请输入您的手机号',
pleaseEnterMessage: '请输入留言内容',
submit: '提交',
exclusiveCustomerService: '专属客服'
// 区块标题
enterpriseFiles: '企业文件',
enterpriseVideos: '企业视频',
// 分享
contactUs: '联系我们',
// 提示信息
videoUrlNotExist: '视频地址不存在',
pleaseFillName: '请填写姓名',
invalidMobileFormat: '手机号格式不正确',
pleaseFillMessage: '请填写留言内容',
submitSuccess: '提交成功',
submitFailed: '提交失败,请重试',
}

View File

@@ -1,4 +1,56 @@
export const lang = {
//title为每个页面的标题
title: '优惠券领取'
title: '优惠券领取',
// ====== 标签页 ======
// 全部
tabAll: '全部',
// 满减券
tabReward: '满减券',
// 折扣券
tabDiscount: '折扣券',
// ====== 优惠券信息 ======
// 折扣单位:{discount}折
discountText: '{discount}折',
// 满减使用条件:满{atLeast}元可用
minSpendAvailable: '满{atLeast}元可用',
// 无门槛优惠券
noThresholdCoupon: '无门槛优惠券',
// 指定商品
specifiedGoods: '指定商品',
// 全场商品
allGoods: '全场商品',
// 最大优惠:(最大优惠{amount}元)
maxDiscount: '(最大优惠{amount}元)',
// ====== 有效期 ======
// 有效期至:有效期:{date}
validPeriodDate: '有效期:{date}',
// 领取后N天有效:有效期:领取之日起{days}日内有效
validPeriodDays: '有效期:领取之日起{days}日内有效',
// 长期有效:有效期:长期有效
validPeriodLong: '有效期:长期有效',
// ====== 按钮与状态 ======
// 领取
receive: '领取',
// 去使用
useNow: '去使用',
// 已抢光
soldOut: '已抢光',
// 已过期
expired: '已过期',
// 已达上限
limitReached: '已达上限',
// ====== 空状态 ======
// 暂无可领取的优惠券
emptyText: '暂无可领取的优惠券',
// ====== 提示消息 ======
// 商家未开启优惠券
merchantNotEnabled: '商家未开启优惠券',
// 领取成功提示
receiveSuccess: '领取成功,快去使用吧'
}

View File

@@ -1,4 +1,47 @@
export const lang = {
//title为每个页面的标题
title: '领取优惠券'
title: '领取优惠券',
// ====== 优惠券信息 ======
// 折扣显示:{discount}折
discountText: '{discount}折',
// 满减使用条件:满{atLeast}元使用
minSpendUsage: '满{atLeast}元使用',
// 无门槛优惠券
noThresholdCoupon: '无门槛优惠券',
// 有效期至:有效期至 {endTime}
validUntil: '有效期至 {endTime}',
// 领取后N天有效:领取之日起{fixedTerm}天内有效
validDaysAfterReceive: '领取之日起{fixedTerm}天内有效',
// 长期有效
longTermValid: '长期有效',
// 适用门店:适用门店:{storeName}
applicableStores: '适用门店:{storeName}',
// 扫码分享提示
scanShareTip: '注:扫描二维码或点击右上角进行分享',
// ====== 按钮文案 ======
receive: '领取',
// 优惠券已领完
couponSoldOut: '来迟了该优惠券已被领取完了!',
// 活动已结束
activityEnded: '该优惠券活动已结束!',
// 活动已关闭
activityClosed: '该优惠券活动已关闭',
// 领取已达上限
receiveLimitReached: '该优惠券领取已达到上限!',
// ====== 提示消息 ======
// 商家未开启优惠券
merchantNotEnabled: '商家未开启优惠券',
// 领取成功
receiveSuccess: '领取成功',
// ====== 分享文案 ======
// 恭喜获得代金券:恭喜您获得一张{money}元的优惠券
congratsMoneyCoupon: '恭喜您获得一张{money}元的优惠券',
// 恭喜获得折扣券:恭喜您获得一张{discount}折优惠券
congratsDiscountCoupon: '恭喜您获得一张{discount}折优惠券',
// 满减可用描述:满{atLeast}元可用
minSpendAvailable: '满{atLeast}元可用'
}

View File

@@ -85,6 +85,8 @@ export const lang = {
couponSoldOut: '已抢光',
couponClaimed: '已领取',
couponReceive: '领取',
couponAlreadyClaimed: '您已领取过该优惠券,快去使用吧',
couponClaimSuccess: '领取成功,快去使用吧',
// 促销活动
promotion: '促销',
@@ -92,6 +94,18 @@ export const lang = {
fullGift: '满送',
freeShipping: '包邮',
// 满减活动文案模板
manjianUnitYuan: '元',
manjianUnitPiece: '件',
manjianItemSeparator: ';',
fullReductionItem: '满{limit}{unit}减{money}元',
fullGiftPoints: '送{point}积分',
fullGiftDiscountCoupon: '送{count}张{discount}折优惠券',
fullGiftMoneyCoupon: '送{count}张{money}元优惠券',
fullGiftConnector: '、送',
fullGiftItem: '满{limit}{unit}{gift}',
freeShippingItem: '满{limit}{unit}包邮',
// 商品留言
productMessage: '商品留言',
@@ -106,4 +120,60 @@ export const lang = {
// 通用按钮
confirm: '确定',
// 商品详情视图组件(goods-detail-view)
detailView: {
// 配送区域
notConfigured: '未配置',
serviceLabel: '服务',
// 商家认证
officialCertifiedMerchant: '官方认证商家,值得信赖!',
// 弹窗标题
deliveryTitle: '配送',
merchantsServiceTitle: '商品服务',
storeListTitle: '门店列表',
// 门店相关
distance: '距离{distance}',
businessHours: '营业时间:{time}',
// 社群
addCommunity: '添加',
// 评价区域
evaluate: '评价',
noEvaluate: '暂无评价',
viewAll: '查看全部',
// 规格属性
specAttrTitle: '规格属性',
expand: '展开',
collapse: '收起',
// PDF文档
defaultDocName: '商品文档',
viewDocDetail: '点击查看文档详情',
view: '查看',
// 海报
saveImage: '保存图片',
longPressToSave: '长按图片进行保存',
// 分享弹窗
shareTitle: '分享',
shareToFriends: '分享给好友',
shareToGoodsCircle: '分享到好物圈',
generateSharePoster: '生成分享海报',
copyLink: '复制链接',
cancelShare: '取消分享',
// 提示消息
posterGenerating: '海报生成中...',
saveSuccess: '保存成功',
saveFailed: '保存失败,请稍后重试',
loading: '正在加载',
fileNotExist: '文件不存在',
}
}

View File

@@ -1,12 +1,32 @@
export const lang = {
//title为每个页面的标题
title: '找回密码',
findPassword: '找回密码',
accountPlaceholder: '请输入手机号',
captchaPlaceholder: "请输入验证码",
dynacodePlaceholder: '请输入动态码',
passwordPlaceholder: '请输入新密码',
rePasswordPlaceholder: '请确认新密码',
next: '下一步',
save: '确认修改'
}
// 找回密码
find: {
// 步骤标题
step0Title: '请输入手机号',
step1Title: '请输入验证码',
step2Title: '请设置新的密码',
// 步骤提示
step0Tip: '请确认您的账号已绑定此手机号',
step1Tip: '已将验证码发送至手机号:{mobile}',
step2Tip: '建议您的新密码以简单好记为标准',
// 按钮文字
resendCode: '重新获取',
resendCountdown: '重新获取({seconds}s)',
// 验证错误提示
mobileInvalid: '请输入正确的手机号',
mobileNotRegistered: '该手机号未注册',
passwordRequired: '请输入密码',
passwordTooShort: '密码长度不能小于{length}位',
passwordMismatch: '两次密码不一致',
// 密码复杂度提示(按拼接顺序,含分隔符)
passwordComplexityPrefix: '密码需包含',
complexityNumber: '数字',
complexityLowercase: '、小写字母',
complexityUppercase: '、大写字母',
complexitySymbol: '、特殊字符',
}
};

View File

@@ -7,9 +7,17 @@ export const lang = {
mobilePhone: '手机号码',
mobilePhonePlaceholder: '请输入手机号',
accountType: '账号类型',
bankInfo: '支行信息',
bankInfoPlaceholder: '请输入支行信息',
bankName: '银行名称',
bankNamePlaceholder: '请输入银行名称',
withdrawalAccount: '提现账号',
withdrawalAccountPlaceholder: '请输入提现账号',
save: '保存'
save: '保存',
pleaseEnterName: '请输入姓名',
pleaseEnterMobile: '请输入手机号',
pleaseEnterValidMobile: '请输入正确的手机号',
pleaseSelectAccountType: '请选择账户类型',
pleaseEnterBankName: '请输入银行名称',
pleaseEnterWithdrawalAccount: '请输入提现账号',
addSuccess: '添加成功',
editSuccess: '修改成功'
}

View File

@@ -1,3 +1,19 @@
export const lang = {
title: '账号注销',
}
riskTip: '风险提示:确认申请后您的资产将被清空且不可找回!',
accountAssets: '账户资产',
point: '积分',
cashBalance: '现金余额',
storedValueBalance: '储值余额',
coupon: '优惠券',
orderAssets: '订单资产',
waitDelivery: '待发货',
waitReceive: '待收货',
refunding: '退款中',
fenxiaoAssets: '分销资产',
withdrawableCommission: '可提现佣金',
withdrawingCommission: '提现中佣金',
waitSettleOrder: '待结算订单',
prevStep: '上一步',
confirmApply: '确认申请',
}

View File

@@ -1,4 +1,38 @@
export const lang = {
//title为每个页面的标题
title: '会员卡'
title: '会员卡',
// 会员信息
validUntil: '有效期至:',
// 会员卡描述
enjoyDiscountAnd: '可享受消费折扣和',
memberGiftBenefits: '会员大礼包等权益',
// 会员权益
memberBenefits: '会员权益',
freeShipping: '全场包邮',
enjoyFreeShipping: '享受商品包邮服务',
consumptionDiscount: '消费折扣',
enjoyDiscountOnSomeProducts: '部分商品下单可享{discount}折优惠',
pointsReward: '积分回馈',
earnPointsMultiplier: '下单享{multiplier}倍积分回馈',
// 开卡礼包
welcomeGift: '开卡礼包',
pointsGift: '积分礼包',
giftPoints: '赠送{points}积分',
redPacketGift: '红包礼包',
giftRedPacket: '赠送{amount}元红包',
couponGift: '优惠券礼包',
giftCoupons: '赠送{count}张优惠券',
// 操作按钮
renewNow: '立即续费',
// 弹窗
cardDescription: '会员卡说明',
// 分享
shareTitle: '专属会员权益,快来体验',
}

View File

@@ -1,4 +1,47 @@
export const lang = {
//title为每个页面的标题
title: '我的优惠券'
title: '我的优惠券',
// ====== 标签页 ======
// 未使用
tabUnused: '未使用',
// 已使用
tabUsed: '已使用',
// 已过期
tabExpired: '已过期',
// ====== 优惠券信息 ======
// 折扣显示:{discount}折
discountText: '{discount}折',
// 满减使用条件:满{amount}元可用
minAmountCondition: '满{amount}元可用',
// 无门槛优惠券
noThresholdCoupon: '无门槛优惠券',
// 指定商品
specifiedGoods: '指定商品',
// 最大优惠:(最大优惠{amount}元)
maxDiscount: '(最大优惠{amount}元)',
// ====== 有效期 ======
// 有效期前缀
validPeriodPrefix: '有效期:',
// 长期有效
longTermValid: '长期有效',
// ====== 按钮与状态 ======
// 去使用
useNow: '去使用',
// 已使用
used: '已使用',
// 已过期
expired: '已过期',
// ====== 空状态 ======
// 暂无优惠券
emptyText: '暂无优惠券',
// 去逛逛
goShopping: '去逛逛',
// ====== 提示消息 ======
// 商家未开启优惠券
merchantNotEnabled: '商家未开启优惠券'
}

View File

@@ -13,5 +13,48 @@ export const lang = {
equity: '权益',
giftPackage: '升级礼包',
levelExplain: '等级说明',
upgradeTips: '升级会员,享专属权益'
upgradeTips: '升级会员,享专属权益',
// 当前等级标签
currentLevelLabel: '当前等级:',
// 成长规则
growthRules: '成长规则',
// 当前等级角标
currentLevelTag: '当前等级',
// 当前成长值
currentGrowthValue: '当前成长值',
// 距离下一等级提示
growthToNextLevel: '再获得{needGrowth}成长值成为{levelName}',
// 最高等级提示
maxLevelReached: '您现在已经是最高等级',
// 会员权益
memberBenefits: '会员权益',
// 包邮服务
freeShipping: '包邮服务',
freeShippingDesc: '提供商品包邮服务',
// 消费折扣
consumptionDiscount: '享受消费折扣服务',
noDiscountDesc: '不享受任何消费折扣和其他权益',
discountDescWithValue: '提供{discount}折消费折扣',
// 积分回馈
pointsReward: '享受积分回馈服务',
pointsRewardDesc: '提供{multiplier}倍积分回馈倍率',
// 会员礼包
memberGift: '会员礼包',
// 积分礼包
pointsGift: '积分礼包',
giftPoints: '赠送{points}积分',
// 红包礼包
redPacketGift: '红包礼包',
giftRedPacket: '赠送{amount}元红包',
// 优惠券礼包
couponGift: '优惠券礼包',
giftCoupons: '赠送{count}张优惠券',
// 优惠券弹窗
coupons: '优惠券',
// 货币单位
yuan: '元',
// 折扣单位
zhe: '折',
// 加载提示
navigatingToDetail: '将前往详情页面'
}

View File

@@ -0,0 +1,18 @@
export const lang = {
//title为每个页面的标题
title: '成长值说明',
// 表格表头
level: '等级',
growthValue: '成长值',
// 什么是成长值
whatIsGrowthValue: '什么是成长值',
growthValueDescription: '成长值是消费者在店铺成为会员后,通过消费计算出来的值。成长值决定会员等级,会员等级越高,所享受的会员权益和会员礼包就越多。',
// 如何获得成长值
howToGetGrowthValue: '如何获得成长值',
ruleRegister: '1、注册会员送x成长值。',
ruleRecharge: '2、会员充值到余额送x成长值。',
ruleCheckin: '3、会员签到送x成长值。',
ruleConsume: '4、会员消费x元,交易完成即可获得x个成长值。',
// 加载提示
navigatingToDetail: '将前往详情页面'
}

View File

@@ -1,3 +1,28 @@
export const lang = {
title: '支付密码',
}
// 提示文案
passwordTips: '请输入6位支付密码,建议不要使用重复或连续数字',
codeSentTips: '验证码已发送至{mobile}请在下方输入4位数字验证码',
// 操作提示
inputSmsCode: '输入短信验证码',
setPayPassword: '请设置支付密码',
inputAgain: '请再次输入',
// 按钮
confirm: '确认',
getCode: '获取验证码',
getDynacode: '获取动态码',
// 弹窗
tipsTitle: '提示',
bindMobileFirst: '设置支付密码需要先绑定手机号,是否立即绑定?',
// Toast
modifySuccess: '修改成功',
passwordMismatch: '两次输入的密码不一致',
// 倒计时
resendAfter: '{seconds}s后可重新获取',
}

View File

@@ -1,4 +1,39 @@
export const lang = {
//title为每个页面的标题
title: '商户首页',
// 搜索
searchPlaceholder: '请输入您要搜索的商品',
// 描述展开/收起
desc: {
scrollUpToViewMore: '上滑查看更多',
collapse: '↑ 收起',
expand: '↓ 展开',
},
// 排序
sort: {
comprehensive: '综合',
sales: '销量',
price: '价格',
filter: '筛选',
},
// 商品列表
goods: {
consultNow: '立即咨询',
sold: '已售{num}{unit}',
defaultUnit: '件',
noGoods: '暂无商品',
},
// 筛选弹窗
filter: {
title: '筛选',
allCategories: '全部分类',
all: '全部',
reset: '重置',
confirm: '确定',
},
}

View File

@@ -2,4 +2,71 @@ export const lang = {
//title为每个页面的标题
title: '编辑商品',
addTitle: '添加商品',
// 商品状态
grounding: {
offShelf: '下架',
onShelf: '上架',
},
// 提货方式
pickupType: {
sameDay: '当日达',
nextDay: '次日达',
dayAfter: '隔日达',
},
// 虚拟发货方式
virtualDeliver: {
auto: '自动发货',
manual: '手动发货',
verify: '到店核销',
},
// 虚拟收货方式
virtualReceive: {
auto: '自动收货',
buyerConfirm: '买家确认收货',
},
// 核销有效期类型
validityType: {
permanent: '永久',
daysAfterPurchase: '购买后几日有效',
specifiedDate: '指定过期日期',
},
// 卡密
carmi: {
add: '添加卡密',
addWithCount: '添加卡密【{count}】',
},
// 限购类型
limitType: {
single: '单次限购',
longTerm: '长期限购',
},
// 提示消息
message: {
goodsNotExist: '商品不存在',
maxCategory: '商品可以属于多个分类,最多10个',
pleaseEnterGoodsName: '请输入商品名称',
subtitleMaxLength: '商品简介不能超过{max}个字符',
pleaseUploadGoodsImage: '请上传商品图片',
pleaseEnterSalePrice: '请输入销售价',
salePriceFormatError: '[销售价]格式输入错误',
originalPriceFormatError: '[原价价]格式输入错误',
pleaseEnterStock: '请输入库存',
stockFormatError: '[库存]格式输入错误',
minOrderFormatError: '[起售]格式输入错误',
minOrderNotLessThanZero: '起售数量不能小于0',
},
// 下拉默认选项
placeholder: {
selectGoodsForm: '请选择商品表单',
selectSupplier: '请选择供应商',
},
}

View File

@@ -1,4 +1,50 @@
export const lang = {
//title为每个页面的标题
title: '订单详情'
title: '订单详情',
// ====== 订单状态区 ======
status: {
pendingPayment: '待支付',
completed: '已完成',
closed: '已关闭'
},
// ====== 商品区 ======
goods: {
points: '积分'
},
// ====== 订单概况区 ======
orderInfo: {
orderNo: '订单编号:',
copy: '复制',
outTradeNo: '订单交易号:',
createTime: '创建时间:',
closeTime: '关闭时间:'
},
// ====== 金额区 ======
amount: {
pointsUsed: '使用积分',
deliveryFee: '运费',
totalPayable: '实付金额:'
},
// ====== 按钮区 ======
button: {
close: '关闭',
pay: '支付'
},
// ====== 弹窗 ======
modal: {
tip: '提示',
confirmClose: '确定关闭此次兑换?'
},
// ====== 提示消息 ======
toast: {
orderInfoNotFound: '未获取到订单信息!',
closeSuccess: '关闭成功'
}
}

View File

@@ -9,5 +9,24 @@ export const lang = {
waitEvaluate: '待评价',
waitUse: '待使用',
update: "释放刷新",
updateIng: "加载中..."
updateIng: "加载中...",
// 搜索
searchPlaceholder: '请输入商品名称/订单编号',
// 订单信息
orderNo: '订单号:',
totalGoods: '共{num}件商品',
actualPayment: '实付款:',
remainingTime: '剩余时间:',
// 操作按钮
evaluate: '评价',
review: '追评',
viewDetail: '查看详情',
// 状态 Tab(与 status 值对应,用于模板动态映射)
status: {
all: '全部',
waitpay: '待付款',
waitsend: '待发货',
waitconfirm: '待收货',
waitrate: '已完成'
}
}

View File

@@ -96,6 +96,26 @@ export const lang = {
confirm: '确定'
},
// ====== 满减送活动描述 ======
promotion: {
title: '满减送',
yuan: '元',
piece: '件',
points: '积分',
manjianFirst: '购买可享受满{limit}{unit}减{money}元',
manjianMore: ';满{limit}{unit}减{money}元',
couponDiscountFirst: '送{num}张{discount}折优惠券',
couponDiscountMore: '、送{num}张{discount}折优惠券',
couponMoneyFirst: '送{num}张{money}元优惠券',
couponMoneyMore: '、送{num}张{money}元优惠券',
mansongFirst: '购物满{limit}{unit}{text}',
mansongMore: ';满{limit}{unit}{text}',
pointGain: '可得{point}积分',
pointFirst: '购物满{limit}{unit}{pointText}',
pointMore: ';满{limit}{unit}{pointText}',
freeShipping: '购物满{limit}{unit}包邮'
},
// ====== 买家留言弹窗 ======
buyerMessagePopup: {
title: '买家留言',

View File

@@ -1,4 +1,37 @@
export const lang = {
//title为每个页面的标题
title: '申请退款',
// ====== 退款类型选择 ======
refundType: {
refundOnly: '退款无需退货',
refundOnlyDesc: '没收到货,或与卖家协商同意无需退货只退款',
returnRefund: '退货退款',
returnRefundDesc: '已收到货,需退还收到的货物'
},
// ====== 退款表单 ======
form: {
refundReason: '退款原因:',
refundAmount: '退款金额:',
refundRemark: '退款说明',
pleaseSelect: '请选择',
remarkPlaceholder: '请输入退款说明(选填)'
},
// ====== 退款原因弹窗 ======
reasonPopup: {
title: '退款原因',
confirm: '确定'
},
// ====== 提示信息 ======
toast: {
noRefundInfo: '未获取到该订单项退款信息'
},
// ====== 表单验证 ======
validate: {
pleaseSelectRefundReason: '请选择退款原因'
}
}

View File

@@ -0,0 +1,29 @@
export const lang = {
// 搜索
searchPlaceholder: '请输入商品关键词',
// 排序
comprehensive: '综合',
points: '积分',
newArrival: '上新时间',
filter: '筛选',
// 商品列表
stock: '库存',
noGoods: '暂无积分商品',
// 筛选弹窗
pointRange: '积分区间',
minPlaceholder: '最低',
maxPlaceholder: '最高',
allCategories: '全部分类',
all: '全部',
reset: '重置',
confirm: '确定',
// 提示
pleaseEnterMaxPrice: '请输入最高价',
priceCannotBeLessThanZero: '筛选价格不能小于0',
minCannotBeGreaterThanMax: '最低价不能大于最高价',
maxCannotBeLessThanMin: '最高价不能小于最低价',
}

View File

@@ -59,5 +59,32 @@ export const lang = {
pointsSuffix: '积分',
submitOrder: '提交订单',
shortByForMinimum: '差{amount}起送'
},
// ====== Toast 提示 ======
toast: {
orderDataNotFound: '未获取到创建订单所需数据!',
pleaseEnterMobile: '请输入您的手机号码',
pleaseEnterCorrectMobile: '请输入正确的手机号码',
noDeliveryMethod: '商家未设置配送方式',
pleaseSelectAddress: '请先选择您的收货地址',
noPickupStore: '没有可提货的门店,请选择其他配送方式',
pleaseEnterReservedMobile: '请输入预留手机',
pleaseEnterCorrectReservedMobile: '请输入正确的预留手机',
pleaseSelectPickupTime: '请选择自提时间',
noDeliveryStore: '没有可配送的门店,请选择其他配送方式',
pleaseSelectDeliveryTime: '请选择配送时间'
},
// ====== 弹窗 ======
modal: {
orderNotCreated: '订单未创建',
goToSet: '去设置'
},
// ====== 时间选择 ======
time: {
today: '今天',
tomorrow: '明天'
}
}

View File

@@ -1,4 +1,14 @@
export const lang = {
//title为每个页面的标题
title: '充值列表'
title: '充值列表',
rechargeAmount: '充值金额',
rechargeRecords: '充值记录',
placeholderEnterAmount: '请输入充值金额',
yuan: '元',
salePrice: '售价 {price} 元',
amount: '金额',
confirmRecharge: '确认充值',
recharge: '充值',
pleaseEnterAmount: '请输入充值金额',
pleaseSelectPackage: '请选择套餐'
}

View File

@@ -299,7 +299,7 @@ export default {
//生成海报
getGoodsPoster() {
uni.showLoading({
'title': '海报生成中...'
'title': this.$lang('detailView.posterGenerating')
})
//活动海报信息
if (this.memberInfo && this.memberInfo.member_id) this.posterParams.source_member = this.memberInfo.member_id;
@@ -365,12 +365,12 @@ export default {
filePath: res.tempFilePath,
success: () => {
this.$util.showToast({
title: "保存成功"
title: this.$lang('detailView.saveSuccess')
});
},
fail: (err) => {
this.$util.showToast({
title: "保存失败,请稍后重试"
title: this.$lang('detailView.saveFailed')
});
}
});
@@ -378,7 +378,7 @@ export default {
},
fail: (err) => {
this.$util.showToast({
title: "保存失败,请稍后重试"
title: this.$lang('detailView.saveFailed')
});
}
});
@@ -484,7 +484,7 @@ export default {
onTapDoc(pdf_url) {
if (!pdf_url) return;
uni.showLoading({
title: '正在加载'
title: this.$lang('detailView.loading')
});
let url = this.$util.img(pdf_url);
uni.downloadFile({
@@ -510,7 +510,7 @@ export default {
complete: (res) => {
if (res.statusCode === 404) {
uni.showToast({
title: '文件不存在',
title: this.$lang('detailView.fileNotExist'),
icon: 'none'
});
}

View File

@@ -72,7 +72,7 @@
<text class="iconfont icon-right"></text>
</block>
<block v-else>
<view class="box">未配置</view>
<view class="box">{{ $lang('detailView.notConfigured') }}</view>
</block>
</view>
@@ -96,7 +96,7 @@
<view class="item service" @click="openMerchantsServicePopup()"
v-if="goodsSkuDetail.goods_service.length">
<view class="label">服务</view>
<view class="label">{{ $lang('detailView.serviceLabel') }}</view>
<view class="list-wrap">
<view class="item-wrap" v-for="(item, index) in goodsSkuDetail.goods_service" :key="index"
v-if="index < 3">
@@ -140,7 +140,7 @@
<view class="other-wrap">
<view class="address" style="margin-left: 30rpx;">
<view>{{ goodsSkuDetail.merchinfo.merch_name }}</view>
<view style="font-size: 24rpx;color: #888;">官方认证商家,值得信赖!</view>
<view style="font-size: 24rpx;color: #888;">{{ $lang('detailView.officialCertifiedMerchant') }}</view>
</view>
</view>
</view>
@@ -153,7 +153,7 @@
<uni-popup ref="deliveryType" type="bottom">
<view class="deliverytype-popup-layer popup-layer">
<view class="head-wrap" @click="$refs.deliveryType.close()">
<text>配送</text>
<text>{{ $lang('detailView.deliveryTitle') }}</text>
<text class="iconfont icon-close"></text>
</view>
<scroll-view scroll-y class="type-body">
@@ -177,7 +177,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('detailView.merchantsServiceTitle') }}</text>
<text class="iconfont icon-close"></text>
</view>
<scroll-view scroll-y>
@@ -199,7 +199,7 @@
</view>
</scroll-view>
<view class="button-box">
<button type="primary" @click="closeMerchantsServicePopup()">确定</button>
<button type="primary" @click="closeMerchantsServicePopup()">{{ $lang('confirm') }}</button>
</view>
</view>
</uni-popup>
@@ -210,7 +210,7 @@
<uni-popup ref="storeListPopup" type="bottom">
<view class="goods-merchants-service-popup-layer popup-layer store-list-wrap">
<view class="head-wrap" @click="closeStoreListPopup()">
<text>门店列表</text>
<text>{{ $lang('detailView.storeListTitle') }}</text>
<text class="iconfont icon-close"></text>
</view>
<scroll-view scroll-y>
@@ -226,11 +226,10 @@
<view class="item-title">
<text class="title">{{ item.store_name }}</text>
<text class="distance color-base-text" v-if="item.distance">
距离{{ item.distance > 1 ? item.distance + 'km' : item.distance *
1000 + 'm' }}
{{ $lang('detailView.distance', { distance: item.distance > 1 ? item.distance + 'km' : item.distance * 1000 + 'm' }) }}
</text>
</view>
<view class="item-time" v-if="item.open_date">营业时间:{{ item.open_date }}
<view class="item-time" v-if="item.open_date">{{ $lang('detailView.businessHours', { time: item.open_date }) }}
</view>
<view class="item-address">{{ item.full_address + item.address }}</view>
</view>
@@ -255,7 +254,7 @@
<view class="community-txt">{{ goodsSkuDetail.qr_data.community_describe }}</view>
</view>
</view>
<view class="community-btn" @click="onCommunity()">添加</view>
<view class="community-btn" @click="onCommunity()">{{ $lang('detailView.addCommunity') }}</view>
</view>
<!-- 促销 -->
@@ -285,12 +284,12 @@
<!-- <view class="tit" :class="{ active: goodsEvaluate.content }"> -->
<view>
<text class="color-title font-size-base">
评价
{{ $lang('detailView.evaluate') }}
<text class="font-size-base">({{ evaluateCount }})</text>
</text>
<text class="evaluate-item-empty" v-if="!evaluateCount">暂无评价</text>
<text class="evaluate-item-empty" v-if="!evaluateCount">{{ $lang('detailView.noEvaluate') }}</text>
<view class="evaluate-item-empty" v-else>
<text class="font-size-tag">查看全部</text>
<text class="font-size-tag">{{ $lang('detailView.viewAll') }}</text>
<text class="iconfont icon-right font-size-tag"></text>
</view>
</view>
@@ -337,7 +336,7 @@
<!-- 规格属性 -->
<view class="goods-attr"
v-if="goodsSkuDetail.goods_attr_format && goodsSkuDetail.goods_attr_format.length > 0">
<view class="title">规格属性</view>
<view class="title">{{ $lang('detailView.specAttrTitle') }}</view>
<view class="attr-wrap">
<block v-for="(item, index) in goodsSkuDetail.goods_attr_format" :key="index">
<view class="item" v-if="goodsAttrShow || (!goodsAttrShow && index < 4)">
@@ -348,10 +347,10 @@
<view class="attr-action" v-if="goodsSkuDetail.goods_attr_format.length > 4"
@click="switchGoodsAttr">
<block v-if="!goodsAttrShow">
展开<text class="iconfont icon-iconangledown"></text>
{{ $lang('detailView.expand') }}<text class="iconfont icon-iconangledown"></text>
</block>
<block v-else>
收起<text class="iconfont icon-iconangledown-copy"></text>
{{ $lang('detailView.collapse') }}<text class="iconfont icon-iconangledown-copy"></text>
</block>
</view>
</view>
@@ -380,11 +379,11 @@
<img class="iconfont icon-file" :src="$util.img('public/static/img/file/file-pdf.svg')" />
</view>
<view class="pdf-info">
<text class="pdf-name">{{ goodsSkuDetail.pdf_name || '商品文档' }}</text>
<text class="pdf-desc">点击查看文档详情</text>
<text class="pdf-name">{{ goodsSkuDetail.pdf_name || $lang('detailView.defaultDocName') }}</text>
<text class="pdf-desc">{{ $lang('detailView.viewDocDetail') }}</text>
</view>
<view class="pdf-btn">
<text>查看</text>
<text>{{ $lang('detailView.view') }}</text>
</view>
</view>
</view>
@@ -420,10 +419,10 @@
<view class="close iconfont icon-close" @click="closePosterPopup()"></view>
</view>
<!-- #ifdef MP || APP-PLUS -->
<view class="save-btn" @click="saveGoodsPoster()">保存图片</view>
<view class="save-btn" @click="saveGoodsPoster()">{{ $lang('detailView.saveImage') }}</view>
<!-- #endif -->
<!-- #ifdef H5 -->
<view class="save-btn">长按图片进行保存</view>
<view class="save-btn">{{ $lang('detailView.longPressToSave') }}</view>
<!-- #endif -->
</view>
</template>
@@ -434,13 +433,13 @@
<view @touchmove.prevent.stop>
<uni-popup ref="sharePopup" type="bottom" class="share-popup">
<view>
<view class="share-title">分享</view>
<view class="share-title">{{ $lang('detailView.shareTitle') }}</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('detailView.shareToFriends') }}</text>
</button>
</view>
<!-- #endif -->
@@ -449,7 +448,7 @@
<view class="share-box" v-if="goodsCircle">
<button class="share-btn" :plain="true" @click="openBusinessView">
<view class="iconfont icon-haowuquan"></view>
<text>分享到好物圈</text>
<text>{{ $lang('detailView.shareToGoodsCircle') }}</text>
</button>
</view>
<!-- #endif -->
@@ -457,19 +456,19 @@
<view class="share-box" @click="openPosterPopup">
<button class="share-btn" :plain="true">
<view class="iconfont icon-pengyouquan"></view>
<text>生成分享海报</text>
<text>{{ $lang('detailView.generateSharePoster') }}</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('detailView.copyLink') }}</text>
</button>
</view>
<!-- #endif -->
</view>
<view class="share-footer" @click="closeSharePopup"><text>取消分享</text></view>
<view class="share-footer" @click="closeSharePopup"><text>{{ $lang('detailView.cancelShare') }}</text></view>
</view>
</uni-popup>
</view>

View File

@@ -318,9 +318,9 @@ export default {
let list = this.couponList;
if (res.data.is_exist == 1 && res.code < 0) {
msg = '您已领取过该优惠券,快去使用吧';
msg = this.$lang('couponAlreadyClaimed');
} else if (res.code == 0) {
msg = '领取成功,快去使用吧';
msg = this.$lang('couponClaimSuccess');
} else {
msg = res.message;
}
@@ -362,7 +362,7 @@ export default {
//获取满减信息
getManjian(data) {
this.manjian = data;
let limit = data.type == 0 ? '元' : '件';
let limit = data.type == 0 ? this.$lang('manjianUnitYuan') : this.$lang('manjianUnitPiece');
Object.keys(data.rule_json).forEach((key) => {
var item = data.rule_json[key];
if (item.coupon_data) {
@@ -373,41 +373,46 @@ export default {
item.limit = data.type == 0 ? parseFloat(item.limit).toFixed(2) : parseInt(item.limit);
// 满减
if (item.discount_money != undefined) {
let itemText = this.$lang('fullReductionItem', { limit: item.limit, unit: limit, money: item.discount_money });
if (this.manjian.manjian == undefined) {
this.manjian.manjian = '满' + item.limit + limit + '减' + item.discount_money + '元';
this.manjian.manjian = itemText;
} else {
this.manjian.manjian += ';满' + item.limit + limit + '减' + item.discount_money + '元';
this.manjian.manjian += this.$lang('manjianItemSeparator') + itemText;
}
}
// 满送
if (item.point != undefined || item.coupon != undefined) {
let text = '';
if (item.point != undefined) {
text = '送' + item.point + '积分';
text = this.$lang('fullGiftPoints', { point: item.point });
}
if (item.coupon != undefined && item.coupon_data != undefined) {
item.coupon_data.forEach((couponItem, couponIndex) => {
if (couponItem.type == 'discount') {
if (text == '') text = '送' + item.coupon_num[couponIndex] + '张' + parseFloat(couponItem.discount) + '折优惠券';
else text += '、送' + item.coupon_num[couponIndex] + '张' + parseFloat(couponItem.discount) + '折优惠券';
let couponText = this.$lang('fullGiftDiscountCoupon', { count: item.coupon_num[couponIndex], discount: parseFloat(couponItem.discount) });
if (text == '') text = couponText;
else text += this.$lang('fullGiftConnector') + couponText;
} else {
if (text == '') text = '送' + item.coupon_num[couponIndex] + '张' + parseFloat(couponItem.money) + '元优惠券';
else text += '、送' + item.coupon_num[couponIndex] + '张' + parseFloat(couponItem.money) + '元优惠券';
let couponText = this.$lang('fullGiftMoneyCoupon', { count: item.coupon_num[couponIndex], money: parseFloat(couponItem.money) });
if (text == '') text = couponText;
else text += this.$lang('fullGiftConnector') + couponText;
}
})
}
let giftItemText = this.$lang('fullGiftItem', { limit: item.limit, unit: limit, gift: text });
if (this.manjian.mansong == undefined) {
this.manjian.mansong = '满' + item.limit + limit + text;
this.manjian.mansong = giftItemText;
} else {
this.manjian.mansong += ';' + '满' + item.limit + limit + text;
this.manjian.mansong += this.$lang('manjianItemSeparator') + giftItemText;
}
}
// 包邮
if (item.free_shipping != undefined) {
let itemText = this.$lang('freeShippingItem', { limit: item.limit, unit: limit });
if (this.manjian.free_shipping == undefined) {
this.manjian.free_shipping = '满' + item.limit + limit + '包邮';
this.manjian.free_shipping = itemText;
} else {
this.manjian.free_shipping += ';满' + item.limit + limit + '包邮';
this.manjian.free_shipping += this.$lang('manjianItemSeparator') + itemText;
}
}
});

View File

@@ -11,8 +11,8 @@
:src="$util.img('public/uniapp/order/order-icon-close.png')" />
<view class="status-name">
<view class="status-name">
{{ orderData.order_status == 0 ? '待支付' : orderData.order_status == 1 ? '已完成' :
orderData.order_status == -1 ? '已关闭' : '' }}
{{ orderData.order_status == 0 ? $lang('status.pendingPayment') : orderData.order_status == 1 ? $lang('status.completed') :
orderData.order_status == -1 ? $lang('status.closed') : '' }}
</view>
</view>
</view>
@@ -32,7 +32,7 @@
<view>
<text class="goods-price color-base-text">
<text>
<text>{{ orderData.point }}积分</text>
<text>{{ orderData.point }}{{ $lang('goods.points') }}</text>
<text v-if="orderData.price > 0" class="price-color">
+
<text class="unit">{{ $lang('common.currencySymbol') }}</text>
@@ -58,26 +58,26 @@
<!-- 订单概况 -->
<view class="order-summary">
<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 class="copy" @click="$util.copy(orderData.order_no)">{{ $lang('orderInfo.copy') }}</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>
@@ -96,7 +96,7 @@
<!-- 订单金额 -->
<view class="order-money">
<view class="order-cell" v-if="orderData.point > 0">
<text class="tit">使用积分</text>
<text class="tit">{{ $lang('amount.pointsUsed') }}</text>
<view class="box align-right">
<text class="color-base-text price-font">
<text>{{ orderData.point }}</text>
@@ -104,7 +104,7 @@
</view>
</view>
<view class="order-cell" v-if="orderData.delivery_price > 0">
<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="unit font-size-tag">{{ $lang('common.currencySymbol') }}</text>
@@ -114,7 +114,7 @@
</view>
<view class="order-cell" v-if="orderData.order_money > 0">
<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>
@@ -123,9 +123,9 @@
</view>
<view class="order-action" v-if="orderData.order_status == 0 && orderData.type == 1">
<view class="order-box-btn" @click="orderClose()">关闭</view>
<view class="order-box-btn" @click="orderClose()">{{ $lang('button.close') }}</view>
<view class="order-box-btn color-base-bg color-base-border color-text-white"
@click="openChoosePayment()">支付</view>
@click="openChoosePayment()">{{ $lang('button.pay') }}</view>
</view>
</view>
@@ -200,7 +200,7 @@ export default {
JSON.parse(this.orderData.delivery_store_info);
} else {
this.$util.showToast({
title: '未获取到订单信息!'
title: this.$lang('toast.orderInfoNotFound')
});
setTimeout(() => {
this.$util.redirectTo('/pages_order/list');
@@ -221,8 +221,8 @@ export default {
},
orderClose() {
uni.showModal({
title: '提示',
content: '确定关闭此次兑换?',
title: this.$lang('modal.tip'),
content: this.$lang('modal.confirmClose'),
success: res => {
if (res.confirm) {
this.$api.sendRequest({
@@ -233,7 +233,7 @@ export default {
success: res => {
if (res.code >= 0) {
this.$util.showToast({
title: '关闭成功'
title: this.$lang('toast.closeSuccess')
});
this.getOrderData();
}

View File

@@ -3,7 +3,7 @@
<view class="cate-search">
<view class="search-box">
<input class="uni-input" maxlength="50" v-model="searchText" confirm-type="search"
placeholder="请输入商品名称/订单编号" @confirm="search()" @click.stop="search()" @tap.stop="search()" />
:placeholder="$lang('searchPlaceholder')" @confirm="search()" @click.stop="search()" @tap.stop="search()" />
<text class="iconfont icon-sousuo3" @click.stop="search()" @tap.stop="search()"></text>
</view>
</view>
@@ -12,7 +12,7 @@
:id="statusItem.id" :data-current="statusIndex" @click="ontabtap">
<text class="uni-tab-item-title"
:class="statusItem.status == orderStatus ? 'uni-tab-item-title-active color-base-text' : ''">
{{ statusItem.name }}
{{ $lang('status.' + statusItem.status) }}
</text>
</view>
</view>
@@ -32,7 +32,7 @@
:class="$util.inArray(orderItem.order_id, mergePayOrder) == -1 ? 'icon-yuan_checkbox' : 'icon-yuan_checked color-base-text'"
@click="selectOrder(orderItem.order_id, orderItem.pay_money)"
v-if="orderStatus == 'waitpay' && orderItem.order_status == 0"></view> -->
<text class="order-no">订单号:{{ orderItem.order_no }}</text>
<text class="order-no">{{ $lang('orderNo') }}{{ orderItem.order_no }}</text>
<text class="order-type-name">{{ orderItem.order_type_name }}</text>
<text class="status-name">{{ orderItem.order_status_name }}</text>
</view>
@@ -98,9 +98,9 @@
<view class="order-footer">
<view class="order-base-info">
<view class="total">
<text class="font-size-sub">共{{ orderItem.goods_num }}件商品</text>
<text class="font-size-sub">{{ $lang('totalGoods', { num: orderItem.goods_num }) }}</text>
<text class="align-right font-size-base">
实付款:
{{ $lang('actualPayment') }}
<text class="font-size-base price-font">{{ $lang('common.currencySymbol')
}}{{ orderItem.order_money }}</text>
</text>
@@ -109,7 +109,7 @@
<view class="order-action" v-if="orderItem.action.length > 0">
<view class="order-time" v-if="orderItem.order_status == 0" id="action-date">
<image :src="$util.img('public/uniapp/order/time.png')" show-menu-by-longpress></image>
剩余时间:
{{ $lang('remainingTime') }}
<uni-count-down :day="orderItem.discountTimeMachine.d"
:hour="orderItem.discountTimeMachine.h"
:minute="orderItem.discountTimeMachine.i"
@@ -119,8 +119,8 @@
<view class="order-box-btn"
v-if="evaluateConfig.evaluate_status == 1 && orderItem.is_evaluate == 1"
@click="operation('memberOrderEvaluation', orderItem)">
<text v-if="orderItem.evaluate_status == 0">评价</text>
<text v-else-if="orderItem.evaluate_status == 1">追评</text>
<text v-if="orderItem.evaluate_status == 0">{{ $lang('evaluate') }}</text>
<text v-else-if="orderItem.evaluate_status == 1">{{ $lang('review') }}</text>
</view>
<view class="order-box-btn"
:class="{ 'color-base-border color-base-bg': operationItem.action == 'orderPay' }"
@@ -133,12 +133,12 @@
v-else-if="orderItem.action.length == 0 && orderItem.is_evaluate == 1 && evaluateConfig.evaluate_status == 1">
<view class="order-box-btn" v-if="orderItem.is_evaluate == 1"
@click="operation('memberOrderEvaluation', orderItem)">
<text v-if="orderItem.evaluate_status == 0">评价</text>
<text v-else-if="orderItem.evaluate_status == 1">追评</text>
<text v-if="orderItem.evaluate_status == 0">{{ $lang('evaluate') }}</text>
<text v-else-if="orderItem.evaluate_status == 1">{{ $lang('review') }}</text>
</view>
</view>
<view class="order-action" v-else>
<view class="order-box-btn" @click="orderDetail(orderItem)">查看详情</view>
<view class="order-box-btn" @click="orderDetail(orderItem)">{{ $lang('viewDetail') }}</view>
</view>
</view>
</view>

View File

@@ -34,20 +34,20 @@ export default {
*/
promotion(data){
if (data.promotion && data.promotion.manjian && data.promotion.manjian.length) {
let promotionStr = {title: `满减送`, content: ''}
let promotionStr = {title: this.$lang('promotion.title'), content: ''}
data.promotion.manjian.forEach((mItem,mIndex)=>{
let promotion = '';
let content = {};
let limit = mItem.type == 0 ? '元' : '件';
let limit = mItem.type == 0 ? this.$lang('promotion.yuan') : this.$lang('promotion.piece');
if(mItem.rule){
var item = mItem.discount_array.rule;
item.limit = mItem.type == 0 ? parseFloat(item.limit).toFixed(2) : parseInt(item.limit);
// 满减
if (item.discount_money != undefined) {
if (content.manjian == undefined) {
content.manjian = '购买可享受满' + item.limit + limit + '减' + item.discount_money + '元';
content.manjian = this.$lang('promotion.manjianFirst', { limit: item.limit, unit: limit, money: item.discount_money });
} else {
content.manjian += ';满' + item.limit + limit + '减' + item.discount_money + '元';
content.manjian += this.$lang('promotion.manjianMore', { limit: item.limit, unit: limit, money: item.discount_money });
}
}
// 满送优惠券
@@ -55,32 +55,32 @@ export default {
let text = '';
item.coupon_list.forEach((couponItem, couponIndex) => {
if (couponItem.type == 'discount') {
if (text == '') text = '送'+ couponItem.give_num +'张' + parseFloat(couponItem.discount) + '折优惠券';
else text += '、送'+ couponItem.give_num +'张' + parseFloat(couponItem.discount) + '折优惠券';
if (text == '') text = this.$lang('promotion.couponDiscountFirst', { num: couponItem.give_num, discount: parseFloat(couponItem.discount) });
else text += this.$lang('promotion.couponDiscountMore', { num: couponItem.give_num, discount: parseFloat(couponItem.discount) });
} else {
if (text == '') text = '送'+ couponItem.give_num +'张' + parseFloat(couponItem.money) + '元优惠券';
else text += '、送'+ couponItem.give_num +'张' + parseFloat(couponItem.money) + '元优惠券';
if (text == '') text = this.$lang('promotion.couponMoneyFirst', { num: couponItem.give_num, money: parseFloat(couponItem.money) });
else text += this.$lang('promotion.couponMoneyMore', { num: couponItem.give_num, money: parseFloat(couponItem.money) });
}
})
if (content.mansong == undefined) {
content.mansong = '购物满' + item.limit + limit + text;
content.mansong = this.$lang('promotion.mansongFirst', { limit: item.limit, unit: limit, text: text });
} else {
content.mansong += ';' + '满' + item.limit + limit + text;
content.mansong += this.$lang('promotion.mansongMore', { limit: item.limit, unit: limit, text: text });
}
}
// 满送积分
if (item.point) {
let point_text = '可得' + item.point + '积分';
let point_text = this.$lang('promotion.pointGain', { point: item.point });
if(content.point_text == undefined) {
content.point_text = '购物满' + item.limit + limit + point_text
content.point_text = this.$lang('promotion.pointFirst', { limit: item.limit, unit: limit, pointText: point_text });
}else {
content.point_text += ';' + '满' + item.limit + limit + point_text;
content.point_text += this.$lang('promotion.pointMore', { limit: item.limit, unit: limit, pointText: point_text });
}
}
// 包邮
if (item.free_shipping != undefined) {
if (content.free_shipping == undefined) {
content.free_shipping = '购物满' + item.limit + limit + '包邮';
content.free_shipping = this.$lang('promotion.freeShipping', { limit: item.limit, unit: limit });
}
}
}

View File

@@ -4,7 +4,7 @@
<!-- 搜索区域 -->
<view class="search-wrap uni-flex uni-row" style="margin-bottom: 20rpx;">
<view class="flex-item input-wrap">
<input class="uni-input" maxlength="50" v-model="keyword" @confirm="search()" placeholder="请输入您要搜索的商品" />
<input class="uni-input" maxlength="50" v-model="keyword" @confirm="search()" :placeholder="$lang('searchPlaceholder')" />
<text class="iconfont icon-sousuo3" @click.stop="search()"></text>
</view>
<view class="iconfont" :class="{ 'icon-apps': isList, 'icon-list': !isList }" @click="changeListStyle()"></view>
@@ -28,11 +28,11 @@
<view class="scroll-desc">{{ merch.desc }}</view>
<view class="scroll-hint" v-if="isShowScrollHint">
<text class="scroll-icon">↓</text>
<text class="scroll-text">上滑查看更多</text>
<text class="scroll-text">{{ $lang('desc.scrollUpToViewMore') }}</text>
</view>
</view>
<view class="expand-tip" v-if="merch.desc && merch.desc.length > 50" @click.stop="toggleDesc">
<text class="hint-arrow">{{ isDescExpanded ? '↑ 收起' : '↓ 展开' }}</text>
<text class="hint-arrow">{{ isDescExpanded ? $lang('desc.collapse') : $lang('desc.expand') }}</text>
</view>
</view>
</view>
@@ -42,14 +42,14 @@
<view class="sort-wrap">
<view class="comprehensive-wrap" :class="{ 'color-base-text': orderType === '' }"
@click="sortTabClick('')">
<text :class="{ 'color-base-text': orderType === '' }">综合</text>
<text :class="{ 'color-base-text': orderType === '' }">{{ $lang('sort.comprehensive') }}</text>
</view>
<view :class="{ 'color-base-text': orderType === 'sale_num' }" @click="sortTabClick('sale_num')">销量
<view :class="{ 'color-base-text': orderType === 'sale_num' }" @click="sortTabClick('sale_num')">{{ $lang('sort.sales') }}
</view>
<view class="price-wrap" @click="sortTabClick('discount_price')">
<text :class="{ 'color-base-text': orderType === 'discount_price' }">价格</text>
<text :class="{ 'color-base-text': orderType === 'discount_price' }">{{ $lang('sort.price') }}</text>
<view class="iconfont-wrap">
<view class="iconfont icon-iconangledown-copy asc"
:class="{ 'color-base-text': priceOrder === 'asc' && orderType === 'discount_price' }">
@@ -61,7 +61,7 @@
</view>
<view :class="{ 'color-base-text': orderType === 'screen' }" class="screen-wrap" @click="showScreen = true">
<text @click="showScreen = true">筛选</text>
<text @click="showScreen = true">{{ $lang('sort.filter') }}</text>
<view @click="showScreen = true" class="iconfont-wrap">
<view class="iconfont icon-shaixuan color-tip"></view>
</view>
@@ -99,8 +99,7 @@
parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
</view>
<view class="discount-price" v-else>
<text class="price price-style large">{{ $lang('Make') ? $lang('Make') : '立即咨询'
}}</text>
<text class="price price-style large">{{ $lang('goods.consultNow') }}</text>
</view>
@@ -118,8 +117,7 @@
<text>{{ showMarketPrice(item) }}</text>
</view>
<view class="block-wrap">
<view class="sale color-tip" v-if="item.sale_show">已售{{ item.sale_num }}{{ item.unit
? item.unit : '件' }}</view>
<view class="sale color-tip" v-if="item.sale_show">{{ $lang('goods.sold', { num: item.sale_num, unit: item.unit ? item.unit : $lang('goods.defaultUnit') }) }}</view>
</view>
<view class="cart-action-wrap" v-if="config.control && item.is_virtual == 0">
<!-- 购物车图标 -->
@@ -193,8 +191,7 @@
parseFloat(showPrice(item)).toFixed(2).split('.')[1] }}</text>
</view>
<view class="discount-price" v-else>
<text class="price price-style large">{{ $lang('Make') ? $lang('Make') : '立即咨询'
}}</text>
<text class="price price-style large">{{ $lang('goods.consultNow') }}</text>
</view>
<view class="member-price-tag"
v-if="item.member_price && item.member_price == showPrice(item)">
@@ -210,8 +207,7 @@
</view>
<view class="pro-info" v-if="item.isinformation == 0">
<view class="block-wrap">
<view class="sale color-tip" v-if="item.sale_show">已售{{ item.sale_num }}{{ item.unit
? item.unit : '件' }}</view>
<view class="sale color-tip" v-if="item.sale_show">{{ $lang('goods.sold', { num: item.sale_num, unit: item.unit ? item.unit : $lang('goods.defaultUnit') }) }}</view>
</view>
<view class="cart-action-wrap" v-if="config.control && item.is_virtual == 0">
<!-- 购物车图标 -->
@@ -258,7 +254,7 @@
</view>
</view>
</view>
<view v-if="goodsList.length == 0 && emptyShow"><ns-empty text="暂无商品"></ns-empty></view>
<view v-if="goodsList.length == 0 && emptyShow"><ns-empty :text="$lang('goods.noGoods')"></ns-empty></view>
</block>
</mescroll-uni>
@@ -266,7 +262,7 @@
<!-- 筛选弹出框 -->
<uni-drawer :visible="showScreen" mode="right" @close="showScreen = false" class="screen-wrap">
<view class="title color-tip">筛选</view>
<view class="title color-tip">{{ $lang('filter.title') }}</view>
<scroll-view scroll-y>
<!-- 包邮 -->
<!-- <view class="item-wrap">
@@ -298,10 +294,10 @@
<!-- 分类筛选项 -->
<view class="category-list-wrap">
<text class="first">全部分类</text>
<text class="first">{{ $lang('filter.allCategories') }}</text>
<view class="class-box">
<view @click="selectedCategory('')" class="list-wrap">
<text :class="{ selected: !categoryId, 'color-base-text': !categoryId }">全部</text>
<text :class="{ selected: !categoryId, 'color-base-text': !categoryId }">{{ $lang('filter.all') }}</text>
</view>
<view @click="selectedCategory(item.category_id)" v-for="(item, index) in categoryList"
:key="index" class="list-wrap">
@@ -313,8 +309,8 @@
</view>
</scroll-view>
<view class="footer" :class="{ 'safe-area': isIphoneX }">
<button type="default" class="footer-box" @click="resetData">重置</button>
<button type="primary" class="footer-box1" @click="screenData">确定</button>
<button type="default" class="footer-box" @click="resetData">{{ $lang('filter.reset') }}</button>
<button type="primary" class="footer-box1" @click="screenData">{{ $lang('filter.confirm') }}</button>
</view>
</uni-drawer>
<loading-cover ref="loadingCover"></loading-cover>

View File

@@ -53,57 +53,57 @@ export default {
begin_time:'',//团购开始时间
end_time:''//团购结束时间
},
groundingArray: ['下架', '上架'],
groundingArray: [this.$lang('grounding.offShelf'), this.$lang('grounding.onShelf')],
pickuptypeArray: ['当日达', '次日达', '隔日达'],//, '自定义'
pickuptypeArray: [this.$lang('pickupType.sameDay'), this.$lang('pickupType.nextDay'), this.$lang('pickupType.dayAfter')],//, '自定义'
currCategory: 0, // 当前所设置的商品分类
virtualDeliverArray: [{
name: '自动发货',
value: 'auto_deliver',
},
{
name: '手动发货',
value: 'artificial_deliver',
},
{
name: '到店核销',
value: 'verify',
}
],
virtualDeliverValue: {
'auto_deliver': '自动发货',
'artificial_deliver': '手动发货',
'verify': '到店核销'
},
virtualReceiveArray: [{
name: '自动收货',
value: 'auto_receive',
},
{
name: '买家确认收货',
value: 'artificial_receive',
},
],
virtualReceiveValue: {
'auto_receive': '自动收货',
'artificial_receive': '买家确认收货',
},
validityTypeArray: ['永久', '购买后几日有效', '指定过期日期'],
virtualDeliverArray: [{
name: this.$lang('virtualDeliver.auto'),
value: 'auto_deliver',
},
{
name: this.$lang('virtualDeliver.manual'),
value: 'artificial_deliver',
},
{
name: this.$lang('virtualDeliver.verify'),
value: 'verify',
}
],
virtualDeliverValue: {
'auto_deliver': this.$lang('virtualDeliver.auto'),
'artificial_deliver': this.$lang('virtualDeliver.manual'),
'verify': this.$lang('virtualDeliver.verify')
},
virtualReceiveArray: [{
name: this.$lang('virtualReceive.auto'),
value: 'auto_receive',
},
{
name: this.$lang('virtualReceive.buyerConfirm'),
value: 'artificial_receive',
},
],
virtualReceiveValue: {
'auto_receive': this.$lang('virtualReceive.auto'),
'artificial_receive': this.$lang('virtualReceive.buyerConfirm'),
},
validityTypeArray: [this.$lang('validityType.permanent'), this.$lang('validityType.daysAfterPurchase'), this.$lang('validityType.specifiedDate')],
virtualIndate: 0,
minDate: '',
carmiLength: '添加卡密',
limitLength: [ //限购
{
name: '单次限购',
value: '1'
},
{
name: '长期限购',
value: '2'
}
],
carmiLength: this.$lang('carmi.add'),
limitLength: [ //限购
{
name: this.$lang('limitType.single'),
value: '1'
},
{
name: this.$lang('limitType.longTerm'),
value: '2'
}
],
current: 0,
goodsFormArray: [],
goodsForm: [],
@@ -163,7 +163,7 @@ export default {
if(res.result.detail){
this.goodsData = res.result.detail
this.$util.showToast({
title: '商品不存在',
title: this.$lang('message.goodsNotExist'),
});
setTimeout(() => {
this.$util.redirectTo('/pages_goods/list', {}, 'redirectTo');
@@ -489,7 +489,7 @@ export default {
addShopCategory() {
if (this.shopCategoryNumber == 10) {
this.$util.showToast({
title: '商品可以属于多个分类,最多10个'
title: this.$lang('message.maxCategory')
});
return;
}
@@ -526,7 +526,7 @@ export default {
this.goodsData.carmichael = uni.getStorageSync('editGoodsCarmichael') ? JSON.parse(uni.getStorageSync('editGoodsCarmichael')) : [];
if (this.goodsData.carmichael.length > 0) {
this.carmiLength = '添加卡密【' + this.goodsData.carmichael.length + '】'
this.carmiLength = this.$lang('carmi.addWithCount', { count: this.goodsData.carmichael.length })
}
}
@@ -564,21 +564,21 @@ export default {
if (this.goodsData.goodsname.length == 0) {
this.$util.showToast({
title: '请输入商品名称'
title: this.$lang('message.pleaseEnterGoodsName')
});
return false;
}
if (this.goodsData.subtitle.length > 100) {
this.$util.showToast({
title: '商品简介不能超过100个字符'
title: this.$lang('message.subtitleMaxLength', { max: 100 })
});
return false;
}
if (this.goodsData.goods_image.length == 0) {
this.$util.showToast({
title: '请上传商品图片'
title: this.$lang('message.pleaseUploadGoodsImage')
});
return false;
}
@@ -628,20 +628,20 @@ export default {
if (this.goodsData.price == 0) {
this.$util.showToast({
title: '请输入销售价'
title: this.$lang('message.pleaseEnterSalePrice')
});
return false;
}
if (isNaN(this.goodsData.price) || !this.$util.data().regExp.digit.test(this.goodsData.price)) {
this.$util.showToast({
title: '[销售价]格式输入错误'
title: this.$lang('message.salePriceFormatError')
});
return false;
}
if (this.goodsData.productprice.length > 0 && (isNaN(this.goodsData.productprice) || !this.$util.data().regExp.digit.test(this.goodsData.productprice))) {
this.$util.showToast({
title: '[原价价]格式输入错误'
title: this.$lang('message.originalPriceFormatError')
});
return false;
}
@@ -651,26 +651,26 @@ export default {
// 总库存
if (this.goodsData.total == 0) {
this.$util.showToast({
title: '请输入库存'
title: this.$lang('message.pleaseEnterStock')
});
return false;
}
if (isNaN(this.goodsData.total) || !this.$util.data().regExp.number.test(this.goodsData.total)) {
this.$util.showToast({
title: '[库存]格式输入错误'
title: this.$lang('message.stockFormatError')
});
return false;
}
if (isNaN(this.goodsData.goods_start_count) || !this.$util.data().regExp.number.test(this.goodsData.goods_start_count)) {
this.$util.showToast({
title: '[起售]格式输入错误'
title: this.$lang('message.minOrderFormatError')
});
return false;
}
if (this.goodsData.goods_start_count < 0) {
this.$util.showToast({
title: '起售数量不能小于0'
title: this.$lang('message.minOrderNotLessThanZero')
});
return false;
}
@@ -901,7 +901,7 @@ export default {
getGoodsForm() {
getOrderFormList().then(res=>{
if (res.data) {
let goodsForm = ['请选择商品表单'];
let goodsForm = [this.$lang('placeholder.selectGoodsForm')];
res.data.forEach((item, index) => {
goodsForm.push(item.form_name);
if (this.goodsData.form_id && this.goodsData.form_id == item.id) this.goodsData.goods_form_index = index + 1;
@@ -922,7 +922,7 @@ export default {
getSupplyList() {
getSupplyList().then(res=>{
if (res.data) {
let supplyForm = ['请选择供应商'];
let supplyForm = [this.$lang('placeholder.selectSupplier')];
res.data.forEach((item, index) => {
supplyForm.push(item.title);
if (this.goodsData.supplier_id && this.goodsData.supplier_id == item.supplier_id) this.goodsData.supply_index = index + 1;

View File

@@ -6,7 +6,7 @@
<view class="flex-item input-wrap" @click.stop="search()" @tap.stop="search()">
<input class="uni-input" maxlength="50" v-model="keyword" confirm-type="search" @confirm="search()"
@click.stop="search()" @tap.stop="search()"
:placeholder="isEnEnv ? 'Please enter product keywords' : '请输入商品关键词'" />
:placeholder="$lang('goods_list.searchPlaceholder')" />
<text class="iconfont icon-sousuo3" @click.stop="search()" @tap.stop="search()"></text>
</view>
</view>
@@ -14,10 +14,10 @@
<!-- 排序 -->
<view class="sort-wrap">
<view class="comprehensive-wrap" :class="{ 'color-base-text': order === '' }" @click="sortTabClick('')">
<text :class="{ 'color-base-text': order === '' }">{{ isEnEnv ? 'Comprehensive' : '综合' }}</text>
<text :class="{ 'color-base-text': order === '' }">{{ $lang('goods_list.comprehensive') }}</text>
</view>
<view class="price-wrap" @click="sortTabClick('point')">
<text :class="{ 'color-base-text': order === 'point' }">{{ isEnEnv ? 'Points' : '积分' }}</text>
<text :class="{ 'color-base-text': order === 'point' }">{{ $lang('goods_list.points') }}</text>
<view class="iconfont-wrap">
<view class="iconfont icon-shangsanjiao-copy"
:class="{ 'color-base-text': priceOrder === 'asc' && order === 'point' }"></view>
@@ -26,8 +26,7 @@
</view>
</view>
<view class="price-wrap" @click="sortTabClick('create_time')">
<text :class="{ 'color-base-text': order === 'create_time' }">{{ isEnEnv ? 'New Arrival' : '上新时间'
}}</text>
<text :class="{ 'color-base-text': order === 'create_time' }">{{ $lang('goods_list.newArrival') }}</text>
<view class="iconfont-wrap">
<view class="iconfont icon-shangsanjiao-copy"
:class="{ 'color-base-text': priceOrder === 'asc' && order === 'create_time' }"></view>
@@ -36,7 +35,7 @@
</view>
</view>
<view :class="{ 'color-base-text': order === 'screen' }" class="screen-wrap">
<text @click="sortTabClick('screen')">{{ isEnEnv ? 'Filter' : '筛选' }}</text>
<text @click="sortTabClick('screen')">{{ $lang('goods_list.filter') }}</text>
<view @click="sortTabClick('screen')" class="iconfont-wrap">
<view class="iconfont icon-shaixuan color-tip"></view>
</view>
@@ -60,7 +59,7 @@
<view class="lineheight-clear">
<view class="discount-price">
<text class="unit ">{{ item.point }}</text>
<text class="unit font-size-tag">{{ isEnEnv ? 'Points' : '积分' }}</text>
<text class="unit font-size-tag">{{ $lang('goods_list.points') }}</text>
<block v-if="item.price > 0 && item.pay_type > 0">
<text class="unit font-size-tag">+</text>
<text class="unit font-size-tag">{{ $lang('common.currencySymbol')
@@ -73,7 +72,7 @@
</view>
</view>
<view class="pro-info" v-if="item.stock_show">
<view class="font-size-activity-tag color-tip">{{ isEnEnv ? 'Stock ' : '库存' }}{{
<view class="font-size-activity-tag color-tip">{{ $lang('goods_list.stock') }}{{
item.stock }}</view>
<view class="sale font-size-activity-tag color-tip" @click="toDetail(item)">
<!-- <button type="primary" size="mini">立即兑换</button> -->
@@ -84,7 +83,7 @@
</view>
<view class="empty" v-if="goodsList.length == 0">
<ns-empty :isIndex="false"
:text="isEnEnv ? 'No point products available' : '暂无积分商品'"></ns-empty>
:text="$lang('goods_list.noGoods')"></ns-empty>
</view>
</view>
</block>
@@ -92,26 +91,25 @@
<!-- 筛选弹出框 -->
<uni-drawer :visible="showScreen" mode="right" @close="showScreen = false" class="screen-wrap">
<view class="title color-tip">{{ isEnEnv ? 'Filter' : '筛选' }}</view>
<view class="title color-tip">{{ $lang('goods_list.filter') }}</view>
<scroll-view scroll-y>
<!-- 价格筛选项 -->
<view class="item-wrap">
<view class="label"><text>{{ isEnEnv ? 'Point Range' : '积分区间' }}</text></view>
<view class="label"><text>{{ $lang('goods_list.pointRange') }}</text></view>
<view class="price-wrap">
<input class="uni-input" type="digit" v-model="minPoint"
:placeholder="isEnEnv ? 'Min' : '最低'" />
:placeholder="$lang('goods_list.minPlaceholder')" />
<view class="h-line"></view>
<input class="uni-input" type="digit" v-model="maxPoint"
:placeholder="isEnEnv ? 'Max' : '最高'" />
:placeholder="$lang('goods_list.maxPlaceholder')" />
</view>
</view>
<!-- 分类筛选项 -->
<view class="category-list-wrap">
<text class="first">{{ isEnEnv ? 'All Categories' : '全部分类' }}</text>
<text class="first">{{ $lang('goods_list.allCategories') }}</text>
<view class="class-box">
<view @click="selectedCategory('')" class="list-wrap"><text
:class="{ selected: !categoryId, 'color-base-text': !categoryId }">{{ isEnEnv ? 'All' :
'全部' }}</text></view>
:class="{ selected: !categoryId, 'color-base-text': !categoryId }">{{ $lang('goods_list.all') }}</text></view>
<view @click="selectedCategory(item.category_id)" v-for="(item, index) in categoryList"
:key="index" class="list-wrap">
<text
@@ -122,8 +120,8 @@
</view>
</scroll-view>
<view class="footer" :class="{ 'safe-area': isIphoneX }">
<button type="default" class="footer-box" @click="resetData">{{ isEnEnv ? 'Reset' : '重置' }}</button>
<button type="primary" class="footer-box1" @click="screenData">{{ isEnEnv ? 'Confirm' : '确定' }}</button>
<button type="default" class="footer-box" @click="resetData">{{ $lang('goods_list.reset') }}</button>
<button type="primary" class="footer-box1" @click="screenData">{{ $lang('goods_list.confirm') }}</button>
</view>
</uni-drawer>
@@ -285,26 +283,26 @@ export default {
// }
if (!Number(this.maxPoint) && this.maxPoint) {
this.$util.showToast({
title: this.isEnEnv ? 'Please enter the maximum price' : '请输入最高价'
title: this.$lang('goods_list.pleaseEnterMaxPrice')
});
return;
}
if (Number(this.minPoint) < 0 || Number(this.maxPoint) < 0) {
this.$util.showToast({
title: this.isEnEnv ? 'Filter price cannot be less than 0' : '筛选价格不能小于0'
title: this.$lang('goods_list.priceCannotBeLessThanZero')
});
return;
}
if (this.minPoint != '' && Number(this.minPoint) > Number(this.maxPoint) && this.maxPoint) {
this.$util.showToast({
title: this.isEnEnv ? 'Minimum price cannot be greater than maximum price' : '最低价不能大于最高价'
title: this.$lang('goods_list.minCannotBeGreaterThanMax')
});
return;
}
if (this.maxPoint != '' && Number(this.maxPoint) < Number(this.minPoint)) {
this.$util.showToast({
title: this.isEnEnv ? 'Maximum price cannot be less than minimum price' : '最高价不能小于最低价'
title: this.$lang('goods_list.maxCannotBeLessThanMin')
});
return;
}

View File

@@ -92,7 +92,7 @@ export default {
uni.removeStorageSync("pay_flag");
} else {
this.$util.showToast({
title: '未获取到创建订单所需数据!'
title: this.$lang('payment.toast.orderDataNotFound')
});
setTimeout(() => {
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
@@ -119,7 +119,7 @@ export default {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
} else {
this.$util.showToast({
title: '未获取到创建订单所需数据!'
title: this.$lang('payment.toast.orderDataNotFound')
});
setTimeout(() => {
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
@@ -280,9 +280,9 @@ export default {
this.isSub = false;
if (res.data.error_code == 10 || res.data.error_code == 12) {
uni.showModal({
title: '订单未创建',
title: this.$lang('payment.modal.orderNotCreated'),
content: res.message,
confirmText: '去设置',
confirmText: this.$lang('payment.modal.goToSet'),
success: res => {
if (res.confirm) {
this.selectAddress();
@@ -309,13 +309,13 @@ export default {
if (this.orderPaymentData.is_virtual == 1) {
if (!this.orderCreateData.member_address.mobile.length) {
this.$util.showToast({
title: '请输入您的手机号码'
title: this.$lang('payment.toast.pleaseEnterMobile')
});
return false;
}
if (!this.$util.verifyMobile(this.orderCreateData.member_address.mobile)) {
this.$util.showToast({
title: '请输入正确的手机号码'
title: this.$lang('payment.toast.pleaseEnterCorrectMobile')
});
return false;
}
@@ -324,7 +324,7 @@ export default {
if (this.orderPaymentData.is_virtual == 0) {
if (!this.orderCreateData.delivery || !this.orderCreateData.delivery.delivery_type) {
this.$util.showToast({
title: '商家未设置配送方式'
title: this.$lang('payment.toast.noDeliveryMethod')
});
return false;
}
@@ -332,7 +332,7 @@ export default {
if (this.orderCreateData.delivery.delivery_type != 'store') {
if (!this.orderCreateData.member_address) {
this.$util.showToast({
title: '请先选择您的收货地址'
title: this.$lang('payment.toast.pleaseSelectAddress')
});
return false;
}
@@ -341,26 +341,26 @@ 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.member_address.mobile) {
this.$util.showToast({
title: '请输入预留手机'
title: this.$lang('payment.toast.pleaseEnterReservedMobile')
});
return false;
}
if (!this.$util.verifyMobile(this.member_address.mobile)) {
this.$util.showToast({
title: '请输入正确的预留手机'
title: this.$lang('payment.toast.pleaseEnterCorrectReservedMobile')
});
return false;
}
if (!this.orderCreateData.delivery.buyer_ask_delivery_time.start_date || !this.orderCreateData.delivery.buyer_ask_delivery_time.end_date) {
this.$util.showToast({
title: '请选择自提时间'
title: this.$lang('payment.toast.pleaseSelectPickupTime')
});
return false;
}
@@ -369,13 +369,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.orderPaymentData.config.local.is_use && this.orderPaymentData.delivery.local.info && this.orderPaymentData.delivery.local.info.time_is_open == 1 && (!this.orderCreateData.delivery.buyer_ask_delivery_time.start_date || !this.orderCreateData.delivery.buyer_ask_delivery_time.end_date)) {
this.$util.showToast({
title: '请选择配送时间'
title: this.$lang('payment.toast.pleaseSelectDeliveryTime')
});
return false;
}
@@ -526,7 +526,7 @@ export default {
start_date:data.data.start_date,
end_date:data.data.end_date
};
if (data.data.title == '今天' || data.data.title == '明天') {
if (data.data.title == this.$lang('payment.time.today') || data.data.title == this.$lang('payment.time.tomorrow')) {
this.orderCreateData.buyer_ask_delivery_title = data.data.title + '(' + data.data.time + ')'
} else {
this.orderCreateData.buyer_ask_delivery_title = data.data.month + '(' + data.data.time + ')'

View File

@@ -19,7 +19,7 @@
<view style="padding:20rpx;">
<view style="font-size:36rpx;font-weight:600;">{{item.$orig.title}}</view>
<view>{{item.$orig.desc}}</view>
<view style="font-size:24rpx;color:#888;padding-top:20rpx;">{{"完成时间:" + item.g3}}</view>
<view style="font-size:24rpx;color:#888;padding-top:20rpx;">{{ $lang('completionTime', { time: item.g3 }) }}</view>
<block v-if="item.$orig.files_url">
<view @tap="toDetail(item.$orig)" class="item">
<view class="article-img">
@@ -28,7 +28,7 @@
<view class="info-wrap">
<view class="title">{{item.$orig.files_title}}</view>
<view class="read-wrap">
<text>查看PDF文件</text>
<text>{{ $lang('viewPdfFile') }}</text>
</view>
</view>
</view>
@@ -44,35 +44,35 @@
<uni-popup ref="informationPopup" class="vue-ref" type="bottom" @change="change">
<view class="liuyan-popup-layer popup-layer">
<view @tap="closeinformationPopup" class="head-wrap">
<text>在线留言</text>
<text>{{ $lang('messagePopup.title') }}</text>
<text class="iconfont icon-close"></text>
</view>
<scroll-view class="liuyan-body" scroll-y="true">
<view style="padding:0 30rpx;">
<view class="fui-cell-group">
<view class="fui-cell">
<view class="fui-cell-label">姓名</view>
<view class="fui-cell-label">{{ $lang('form.name') }}</view>
<view class="fui-cell-info">
<input class="fui-input" placeholder="请输入您的姓名" v-model="Form.realname" />
<input class="fui-input" :placeholder="$lang('form.namePlaceholder')" v-model="Form.realname" />
</view>
</view>
<view class="fui-cell">
<view class="fui-cell-label">联系方式</view>
<view class="fui-cell-label">{{ $lang('form.contact') }}</view>
<view class="fui-cell-info">
<input class="fui-input" maxlength="11" placeholder="请输入您的手机号" type="number" v-model="Form.mobile" />
<input class="fui-input" maxlength="11" :placeholder="$lang('form.mobilePlaceholder')" type="number" v-model="Form.mobile" />
</view>
</view>
<view class="fui-cell">
<view class="fui-cell-label" style="position:absolute;top:10px;">留言内容</view>
<view class="fui-cell-label" style="position:absolute;top:10px;">{{ $lang('form.messageContent') }}</view>
<view class="fui-cell-info" style="margin-left:160rpx;border:solid 2rpx #eee;">
<textarea class="textarea" style="font-size:28rpx;padding:10rpx;" placeholder="请输入留言内容" v-model="Form.remark"></textarea>
<textarea class="textarea" style="font-size:28rpx;padding:10rpx;" :placeholder="$lang('form.messagePlaceholder')" v-model="Form.remark"></textarea>
</view>
</view>
</view>
</view>
</scroll-view>
<view class="button-box">
<button type="primary" @tap="save">提交</button>
<button type="primary" @tap="save">{{ $lang('common.submit') }}</button>
</view>
</view>
</uni-popup>
@@ -140,7 +140,7 @@ export default {
},
toDetail(item) {
const url = item.files_url;
uni.showLoading({ title: "正在加载" });
uni.showLoading({ title: this.$lang('toast.loading') });
try {
uni.downloadFile({
url: url,
@@ -164,7 +164,7 @@ export default {
},
complete: (res) => {
if (res.statusCode === 404) {
uni.showToast({ title: "文件不存在", icon: "none" });
uni.showToast({ title: this.$lang('toast.fileNotExist'), icon: "none" });
}
}
});
@@ -186,7 +186,7 @@ export default {
},
onTapDoc(item) {
const url = this.$util.img(item.files_url);
uni.showLoading({ title: "正在加载" });
uni.showLoading({ title: this.$lang('toast.loading') });
try {
uni.downloadFile({
url: url,
@@ -210,7 +210,7 @@ export default {
},
complete: (res) => {
if (res.statusCode === 404) {
uni.showToast({ title: "文件不存在", icon: "none" });
uni.showToast({ title: this.$lang('toast.fileNotExist'), icon: "none" });
}
}
});
@@ -220,7 +220,7 @@ export default {
},
share(item) {
const url = this.$util.img(item.files_url);
uni.showLoading({ title: "正在加载" });
uni.showLoading({ title: this.$lang('toast.loading') });
try {
uni.downloadFile({
url: url,
@@ -241,7 +241,7 @@ export default {
},
complete: (res) => {
if (res.statusCode === 404) {
uni.showToast({ title: "文件不存在", icon: "none" });
uni.showToast({ title: this.$lang('toast.fileNotExist'), icon: "none" });
}
}
});
@@ -286,7 +286,7 @@ export default {
uni.setClipboardData({
data: text,
success: () => {
uni.showToast({ title: "复制成功", icon: "success", duration: 2000 });
uni.showToast({ title: this.$lang('util.copySuccess'), icon: "success", duration: 2000 });
},
fail: () => {
}

View File

@@ -73,7 +73,7 @@
<!-- 企业文件 -->
<view class="view_files_container" v-if="showFileListDiy && fileList.length > 0">
<view class="section-title">企业文件</view>
<view class="section-title">{{ $lang('enterpriseFiles') }}</view>
<view class="files-list">
<view v-for="(file, index) in fileList" :key="index" class="file-item">
<image mode="aspectFill" :src="$util.img('public/static/img/pdf-icon.png')"
@@ -90,7 +90,7 @@
</view>
<!-- 企业视频 -->
<view class="view_videos_container" v-if="showVideoListDiy && videoList.length > 0">
<view class="section-title">企业视频</view>
<view class="section-title">{{ $lang('enterpriseVideos') }}</view>
<view class="videos-list">
<view v-for="(video, index) in videoList" :key="index" class="video-item"
@click="playVideo(video)">
@@ -311,11 +311,11 @@ export default {
// 如果后台没配置,用默认值
this.mpShareData = {
appMessage: {
title: '联系我们',
title: this.$lang('contactUs'),
path: '/pages_tool/contact/contact'
},
timeLine: {
title: '联系我们',
title: this.$lang('contactUs'),
query: ''
}
};
@@ -351,7 +351,7 @@ export default {
this.currentVideo = video;
this.$refs.videoPlayerPopup.open();
} else {
uni.showToast({ title: '视频地址不存在', icon: 'none' });
uni.showToast({ title: this.$lang('videoUrlNotExist'), icon: 'none' });
}
},
@@ -369,22 +369,22 @@ export default {
},
save() {
if (!this.Form.realname.trim()) {
uni.showToast({ title: '请填写姓名', icon: 'none' });
uni.showToast({ title: this.$lang('pleaseFillName'), icon: 'none' });
return;
}
if (!this.Form.mobile || !/^1[3-9]\d{9}$/.test(this.Form.mobile)) {
uni.showToast({ title: '手机号格式不正确', icon: 'none' });
uni.showToast({ title: this.$lang('invalidMobileFormat'), icon: 'none' });
return;
}
if (!this.Form.remark.trim()) {
uni.showToast({ title: '请填写留言内容', icon: 'none' });
uni.showToast({ title: this.$lang('pleaseFillMessage'), icon: 'none' });
return;
}
this.$api.sendRequest({
url: '/api/member/message',
data: this.Form,
success: res => {
uni.showToast({ title: res.message || '提交成功', icon: 'success' });
uni.showToast({ title: res.message || this.$lang('submitSuccess'), icon: 'success' });
// 重置表单数据
@@ -402,7 +402,7 @@ export default {
// #endif
},
fail: () => {
uni.showToast({ title: '提交失败,请重试', icon: 'none' });
uni.showToast({ title: this.$lang('submitFailed'), icon: 'none' });
}
});
},
@@ -471,19 +471,19 @@ export default {
},
onShareAppMessage() {
return this.mpShareData?.appMessage || {
title: '联系我们',
title: this.$lang('contactUs'),
path: '/pages_tool/contact/contact'
};
},
onShareTimeline() {
return this.mpShareData?.timeLine || {
title: '联系我们',
title: this.$lang('contactUs'),
query: ''
};
},
onAddToFavorites() {
return {
title: '联系我们',
title: this.$lang('contactUs'),
path: '/pages_tool/contact/contact'
};
},

View File

@@ -3,11 +3,11 @@
<view class="cf-container color-line-border">
<view class="tab">
<view @click="changeSort(1)"><text
:class="sort == 1 ? 'color-base-text active color-base-border-bottom' : ''">全部</text></view>
:class="sort == 1 ? 'color-base-text active color-base-border-bottom' : ''">{{ $lang('tabAll') }}</text></view>
<view @click="changeSort(2, 'reward')"><text
:class="sort == 2 ? 'color-base-text active color-base-border-bottom' : ''">满减券</text></view>
:class="sort == 2 ? 'color-base-text active color-base-border-bottom' : ''">{{ $lang('tabReward') }}</text></view>
<view @click="changeSort(3, 'discount')"><text
:class="sort == 3 ? 'color-base-text active color-base-border-bottom' : ''">折扣券</text></view>
:class="sort == 3 ? 'color-base-text active color-base-border-bottom' : ''">{{ $lang('tabDiscount') }}</text></view>
<!-- <view @click="changeSort(4, 'no_threshold')"><text :class="sort == 4 ? 'color-base-text active color-base-border-bottom' : ''">无门槛券</text></view> -->
</view>
</view>
@@ -28,23 +28,22 @@
</view>
<view class="use_price price-font" v-else-if="item.type == 'discount'"
:class="{ disabled: item.useState == 2 }">
{{ parseFloat(item.discount) }}
<text>折</text>
{{ $lang('discountText', { discount: parseFloat(item.discount) }) }}
</view>
<view class="use_condition font-size-tag" v-if="item.at_least > 0"
:class="{ disabled: item.useState == 2 }">满{{ item.at_least }}元可用</view>
:class="{ disabled: item.useState == 2 }">{{ $lang('minSpendAvailable', { atLeast: item.at_least }) }}</view>
<view class="use_condition font-size-tag" v-else
:class="{ disabled: item.useState == 2 }">无门槛优惠券</view>
:class="{ disabled: item.useState == 2 }">{{ $lang('noThresholdCoupon') }}</view>
</view>
</view>
<view class="item-info">
<view class="use_title">
<view class="title">{{ item.coupon_name }}</view>
<view class="max_price" v-if="item.goods_type == 2 || item.goods_type == 3"
:class="{ disabled: item.useState == 2 }">指定商品</view>
<view class="max_price" v-else :class="{ disabled: item.useState == 2 }">全场商品</view>
:class="{ disabled: item.useState == 2 }">{{ $lang('specifiedGoods') }}</view>
<view class="max_price" v-else :class="{ disabled: item.useState == 2 }">{{ $lang('allGoods') }}</view>
<view class="max_price" v-if="item.discount_limit != '0.00'">
(最大优惠{{ item.discount_limit }}元)
{{ $lang('maxDiscount', { amount: item.discount_limit }) }}
</view>
<view class="max_price" :class="{ disabled: item.useState == 2 }">{{
item.use_channel_name }}</view>
@@ -53,21 +52,21 @@
</view> -->
</view>
<view class="use_time" v-if="item.validity_type == 0">
有效期:{{ $util.timeStampTurnTime(item.end_time) }}</view>
{{ $lang('validPeriodDate', { date: $util.timeStampTurnTime(item.end_time) }) }}</view>
<view class="use_time" v-else-if="item.validity_type == 1">
有效期:领取之日起{{ item.fixed_term }}日内有效</view>
<view class="use_time" v-else>有效期:长期有效</view>
{{ $lang('validPeriodDays', { days: item.fixed_term }) }}</view>
<view class="use_time" v-else>{{ $lang('validPeriodLong') }}</view>
</view>
<view class="item-btn">
<view v-if="item.useState == 0" @click.stop="receiveCoupon(item, index)">领取</view>
<view v-if="item.useState == 1" @click.stop="toGoodsList(item, index)">去使用</view>
<view v-if="item.receivedType == 'out'" class="disabled">已抢光</view>
<view v-if="item.receivedType == 'expire'" class="disabled">已过期</view>
<view v-if="item.receivedType == 'limit'" class="disabled">已达上限</view>
<view v-if="item.useState == 0" @click.stop="receiveCoupon(item, index)">{{ $lang('receive') }}</view>
<view v-if="item.useState == 1" @click.stop="toGoodsList(item, index)">{{ $lang('useNow') }}</view>
<view v-if="item.receivedType == 'out'" class="disabled">{{ $lang('soldOut') }}</view>
<view v-if="item.receivedType == 'expire'" class="disabled">{{ $lang('expired') }}</view>
<view v-if="item.receivedType == 'limit'" class="disabled">{{ $lang('limitReached') }}</view>
</view>
</view>
</view>
<view v-if="list.length == 0"><ns-empty text="暂无可领取的优惠券" :isIndex="false"></ns-empty></view>
<view v-if="list.length == 0"><ns-empty :text="$lang('emptyText')" :isIndex="false"></ns-empty></view>
</block>
</mescroll-uni>
<loading-cover ref="loadingCover"></loading-cover>
@@ -99,7 +98,7 @@ export default {
setTimeout(() => {
if (!this.addonIsExist.coupon) {
this.$util.showToast({
title: '商家未开启优惠券',
title: this.$lang('merchantNotEnabled'),
mask: true,
duration: 2000
});
@@ -173,7 +172,7 @@ export default {
},
success: res => {
this.couponBtnSwitch = false;
let msg = '领取成功,快去使用吧';
let msg = this.$lang('receiveSuccess');
let list = this.list;
if (res.code < 0) msg = res.message;

View File

@@ -7,24 +7,24 @@
<view class="get-coupon">
<text class="coupon-name">{{ info.coupon_name }}</text>
<view class="color-base-text coupon-price" v-if="info.type == 'reward'">¥{{ info.money }}</view>
<view class="color-base-text coupon-price" v-else-if="info.type == 'discount'">{{ info.discount }}折</view>
<text v-if="info.at_least > 0" class="color-tip">满{{ info.at_least }}元使用</text>
<text v-else class="color-tip">无门槛优惠券</text>
<view v-if="info.validity_type == 0" class="color-tip">有效期至 {{ $util.timeStampTurnTime(info.end_time) }}</view>
<view v-else-if="info.validity_type == 1" class="color-tip">领取之日起{{ info.fixed_term }}天内有效</view>
<view v-else class="color-tip">长期有效</view>
<view class="color-base-text coupon-price" v-else-if="info.type == 'discount'">{{ $lang('discountText', { discount: info.discount }) }}</view>
<text v-if="info.at_least > 0" class="color-tip">{{ $lang('minSpendUsage', { atLeast: info.at_least }) }}</text>
<text v-else class="color-tip">{{ $lang('noThresholdCoupon') }}</text>
<view v-if="info.validity_type == 0" class="color-tip">{{ $lang('validUntil', { endTime: $util.timeStampTurnTime(info.end_time) }) }}</view>
<view v-else-if="info.validity_type == 1" class="color-tip">{{ $lang('validDaysAfterReceive', { fixedTerm: info.fixed_term }) }}</view>
<view v-else class="color-tip">{{ $lang('longTermValid') }}</view>
<!-- 适用场景: -->
<view class="color-tip truncate" v-if="info.use_channel!='all'">{{ info.use_channel_name }}</view>
<!-- 适用门店: -->
<view v-if="info.use_channel!='online' &&info.use_store!='all'" class="color-tip">
<view class="w-460 truncate">适用门店:{{ info.use_store_name}}</view>
<view class="w-460 truncate">{{ $lang('applicableStores', { storeName: info.use_store_name }) }}</view>
</view>
<view class="get-span" @click="receiveGoodsCoupon(info.coupon_type_id)">
<button type="primary" v-if="isCanReceive">{{ button }}</button>
<button type="primary" disabled v-if="!isCanReceive">{{ button }}</button>
</view>
<view class="color-tip font-size-goods-tag tips">注:扫描二维码或点击右上角进行分享</view>
<view class="color-tip font-size-goods-tag tips">{{ $lang('scanShareTip') }}</view>
</view>
</view>
<loading-cover ref="loadingCover"></loading-cover>
@@ -42,7 +42,7 @@
info: {},
couponTypeId: 0,
path: '',
button: '领取',
button: '',
uid: 0,
couponBtnSwitch: false, //获取优惠券防止重复提交
receivedNum: 0,
@@ -50,10 +50,11 @@
};
},
onLoad(data) {
this.button = this.$lang('receive');
setTimeout( () => {
if (!this.addonIsExist.coupon) {
this.$util.showToast({
title: '商家未开启优惠券',
title: this.$lang('merchantNotEnabled'),
mask: true,
duration: 2000
});
@@ -152,7 +153,7 @@
let msg = res.message;
this.receivedType = data.type;
if (res.code == 0) {
msg = '领取成功';
msg = this.$lang('receiveSuccess');
this.receivedNum += 1;
}
this.buttonRefresh();
@@ -181,18 +182,18 @@
});
},
buttonRefresh() {
this.button = '领取';
this.button = this.$lang('receive');
if (this.info.count <= this.info.lead_count || this.receivedType == 'out') {
this.button = '来迟了该优惠券已被领取完了!';
this.button = this.$lang('couponSoldOut');
}
if (this.info.status == 2 || this.receivedType == 'expire') {
this.button = '该优惠券活动已结束!';
this.button = this.$lang('activityEnded');
}
if (this.info.status == 3) {
this.button = '该优惠券活动已关闭';
this.button = this.$lang('activityClosed');
}
if (this.receivedType == 'limit'){
this.button = '该优惠券领取已达到上限!';
this.button = this.$lang('receiveLimitReached');
}
},
/**
@@ -204,14 +205,14 @@
var title = '';
if (this.info.type == 'reward') {
title = '恭喜您获得一张' + this.info.money + '元的优惠券';
title = this.$lang('congratsMoneyCoupon', { money: this.info.money });
} else if (this.info.type == 'discount') {
title = '恭喜您获得一张' + this.info.discount + '折优惠券';
title = this.$lang('congratsDiscountCoupon', { discount: this.info.discount });
}
if (this.info.at_least > 0) {
var desc = `满${this.info.at_least}元可用`;
var desc = this.$lang('minSpendAvailable', { atLeast: this.info.at_least });
} else {
var desc = `无门槛优惠券`;
var desc = this.$lang('noThresholdCoupon');
}
this.$util.setPublicShare({
title: title,
@@ -239,14 +240,14 @@
onShareAppMessage(res) {
var title = '';
if (this.info.type == 'reward') {
title = '恭喜您获得一张' + this.info.money + '元的优惠券';
title = this.$lang('congratsMoneyCoupon', { money: this.info.money });
} else if (this.info.type == 'discount') {
title = '恭喜您获得一张' + this.info.discount + '折优惠券';
title = this.$lang('congratsDiscountCoupon', { discount: this.info.discount });
}
if (this.info.at_least > 0) {
title += `,满${this.info.at_least}元可用`;
title += ',' + this.$lang('minSpendAvailable', { atLeast: this.info.at_least });
} else {
title += `,无门槛优惠券`;
title += ',' + this.$lang('noThresholdCoupon');
}
var path = '/pages_tool/goods/coupon_receive?coupon_type_id=' + this.couponTypeId;
if (this.memberInfo && this.memberInfo.member_id) path += '&source_member=' + this.memberInfo.member_id;

View File

@@ -3,20 +3,20 @@
<view class="iconfont icon-close" @click="navigateBack()"></view>
<view class="header-wrap">
<block v-if="stepShow == 0">
<view class="title">请输入手机号</view>
<view><text class="color-tip">请确认您的账号已绑定此手机号</text></view>
<view class="title">{{ $lang('find.step0Title') }}</view>
<view><text class="color-tip">{{ $lang('find.step0Tip') }}</text></view>
</block>
<block v-if="stepShow == 1">
<view class="title">请输入验证码</view>
<view class="title">{{ $lang('find.step1Title') }}</view>
<view>
<text class="color-tip">已将验证码发送至手机号:{{ formData.mobile }}</text>
<text class="color-tip">{{ $lang('find.step1Tip', { mobile: formData.mobile }) }}</text>
</view>
</block>
<block v-if="stepShow == 2">
<view class="title">请设置新的密码</view>
<view><text class="color-tip">建议您的新密码以简单好记为标准</text></view>
<view class="title">{{ $lang('find.step2Title') }}</view>
<view><text class="color-tip">{{ $lang('find.step2Tip') }}</text></view>
</block>
</view>
<view class="find-form">
@@ -97,7 +97,7 @@ export default {
data() {
return {
findMode: 'mobile',
codeText: '重新获取',
codeText: '',
seconds: 120,
timer: null,
formData: {
@@ -117,6 +117,7 @@ export default {
};
},
onLoad() {
this.codeText = this.$lang('find.resendCode');
this.getCaptcha();
},
onShow() {
@@ -143,7 +144,7 @@ export default {
{
name: 'mobile',
checkType: 'phoneno',
errorMsg: '请输入正确的手机号'
errorMsg: this.$lang('find.mobileInvalid')
},
{
name: 'captcha',
@@ -166,7 +167,7 @@ export default {
});
if (res.code == 0) {
this.$util.showToast({
title: '该手机号未注册'
title: this.$lang('find.mobileNotRegistered')
});
return false;
}
@@ -185,7 +186,7 @@ export default {
{
name: 'password',
checkType: 'required',
errorMsg: '请输入密码'
errorMsg: this.$lang('find.passwordRequired')
}
];
if (regConfig.pwd_len > 0) {
@@ -193,27 +194,27 @@ export default {
name: 'password',
checkType: 'lengthMin',
checkRule: regConfig.pwd_len,
errorMsg: '密码长度不能小于' + regConfig.pwd_len + '位'
errorMsg: this.$lang('find.passwordTooShort', { length: regConfig.pwd_len })
});
}
if (regConfig.pwd_complexity != '') {
let passwordErrorMsg = '密码需包含',
let passwordErrorMsg = this.$lang('find.passwordComplexityPrefix'),
reg = '';
if (regConfig.pwd_complexity.indexOf('number') != -1) {
reg += '(?=.*?[0-9])';
passwordErrorMsg += '数字';
passwordErrorMsg += this.$lang('find.complexityNumber');
}
if (regConfig.pwd_complexity.indexOf('letter') != -1) {
reg += '(?=.*?[a-z])';
passwordErrorMsg += '、小写字母';
passwordErrorMsg += this.$lang('find.complexityLowercase');
}
if (regConfig.pwd_complexity.indexOf('upper_case') != -1) {
reg += '(?=.*?[A-Z])';
passwordErrorMsg += '、大写字母';
passwordErrorMsg += this.$lang('find.complexityUppercase');
}
if (regConfig.pwd_complexity.indexOf('symbol') != -1) {
reg += '(?=.*?[#?!@$%^&*-])';
passwordErrorMsg += '、特殊字符';
passwordErrorMsg += this.$lang('find.complexitySymbol');
}
rule.push({
name: 'password',
@@ -227,7 +228,7 @@ export default {
if (checkRes) {
if (this.formData.password != this.formData.rePassword) {
this.$util.showToast({
title: '两次密码不一致'
title: this.$lang('find.passwordMismatch')
});
return false;
}
@@ -283,7 +284,7 @@ export default {
if (this.seconds == 120 && this.timer == null) {
this.timer = setInterval(() => {
this.seconds--;
this.codeText = '重新获取(' + this.seconds + 's)';
this.codeText = this.$lang('find.resendCountdown', { seconds: this.seconds });
}, 1000);
}
uni.setStorageSync('forgot_password_token', data.key);
@@ -351,7 +352,7 @@ export default {
seconds(value) {
if (value == 0) {
this.seconds = 120;
this.codeText = '重新获取';
this.codeText = this.$lang('find.resendCode');
this.isSend = false;
clearInterval(this.timer);
}

View File

@@ -2,11 +2,11 @@
<view class="account-list-content" :style="themeColor">
<view class="edit-item">
<text class="tit">{{ $lang('name') }}</text>
<input class="desc uni-input" type="text" maxlength="30" placeholder="请输入真实姓名" name="name" v-model="formData.realname" />
<input class="desc uni-input" type="text" maxlength="30" :placeholder="$lang('namePlaceholder')" name="name" v-model="formData.realname" />
</view>
<view class="edit-item">
<text class="tit">{{ $lang('mobilePhone') }}</text>
<input class="desc uni-input" type="number" maxlength="11" placeholder="请输入手机号" v-model="formData.mobile" />
<input class="desc uni-input" type="number" maxlength="11" :placeholder="$lang('mobilePhonePlaceholder')" v-model="formData.mobile" />
</view>
<view class="edit-item">
<text class="tit">{{ $lang('accountType') }}</text>
@@ -16,12 +16,12 @@
</picker>
</view>
<view class="edit-item" v-if="formData.withdraw_type == 'bank'">
<text class="tit">银行名称</text>
<input class="desc uni-input" type="text" maxlength="50" placeholder="请输入银行名称" v-model.trim="formData.branch_bank_name" />
<text class="tit">{{ $lang('bankName') }}</text>
<input class="desc uni-input" type="text" maxlength="50" :placeholder="$lang('bankNamePlaceholder')" v-model.trim="formData.branch_bank_name" />
</view>
<view class="edit-item" v-if="formData.withdraw_type != 'wechatpay'">
<text class="tit">提现账号</text>
<input class="desc uni-input" type="text" maxlength="30" placeholder="请输入提现账号" v-model.trim="formData.bank_account" />
<text class="tit">{{ $lang('withdrawalAccount') }}</text>
<input class="desc uni-input" type="text" maxlength="30" :placeholder="$lang('withdrawalAccountPlaceholder')" v-model.trim="formData.bank_account" />
</view>
<view class="btn">
<button type="primary" class="add" @click="saveAccount">{{ $lang('save') }}</button>
@@ -156,36 +156,36 @@ export default {
{
name: 'realname',
checkType: 'required',
errorMsg: '请输入姓名'
errorMsg: this.$lang('pleaseEnterName')
},
{
name: 'mobile',
checkType: 'required',
errorMsg: '请输入手机号'
errorMsg: this.$lang('pleaseEnterMobile')
},
{
name: 'mobile',
checkType: 'phoneno',
errorMsg: '请输入正确的手机号'
errorMsg: this.$lang('pleaseEnterValidMobile')
},
{
name: 'withdraw_type',
checkType: 'required',
errorMsg: '请选择账户类型'
errorMsg: this.$lang('pleaseSelectAccountType')
}
];
if (this.formData.withdraw_type == 'bank') {
rule.push({
name: 'branch_bank_name',
checkType: 'required',
errorMsg: '请输入银行名称'
errorMsg: this.$lang('pleaseEnterBankName')
});
}
if (this.formData.withdraw_type != 'wechatpay') {
rule.push({
name: 'bank_account',
checkType: 'required',
errorMsg: '请输入提现账号'
errorMsg: this.$lang('pleaseEnterWithdrawalAccount')
});
}
var checkRes = validate.check(this.formData, rule);
@@ -219,11 +219,11 @@ export default {
if (res.code == 0) {
if (!this.formData.id) {
this.$util.showToast({
title: '添加成功'
title: this.$lang('addSuccess')
});
} else {
this.$util.showToast({
title: '修改成功'
title: this.$lang('editSuccess')
});
}
if (this.back != '') {

View File

@@ -2,48 +2,48 @@
<view class="container" :style="themeColor">
<view class="assets-wrap">
<view class="assets-block">
<view class="assets-tips"><text>风险提示:确认申请后您的资产将被清空且不可找回!</text></view>
<view class="assets-tips"><text>{{ $lang('member.assets.riskTip') }}</text></view>
<view class="assets-box assets-account">
<view class="assets-title">
<text class="color-base-bg"></text>
<text>账户资产</text>
<text>{{ $lang('member.assets.accountAssets') }}</text>
</view>
<view class="assets-list">
<view class="assets-li">
<view>{{ member_info.point }}</view>
<view>积分</view>
<view>{{ $lang('member.assets.point') }}</view>
</view>
<view class="assets-li">
<view>¥{{ member_info.balance_money }}</view>
<view>现金余额</view>
<view>{{ $lang('member.assets.cashBalance') }}</view>
</view>
<view class="assets-li">
<view>¥{{ member_info.balance }}</view>
<view>储值余额</view>
<view>{{ $lang('member.assets.storedValueBalance') }}</view>
</view>
<view class="assets-li">
<view>{{ accountInfo.member_coupon_count }}</view>
<view>优惠券</view>
<view>{{ $lang('member.assets.coupon') }}</view>
</view>
</view>
</view>
<view class="assets-box assets-order">
<view class="assets-title">
<text class="color-base-bg"></text>
<text>订单资产</text>
<text>{{ $lang('member.assets.orderAssets') }}</text>
</view>
<view class="assets-list">
<view class="assets-li">
<view>{{ accountInfo.order_pay_count }}</view>
<view>待发货</view>
<view>{{ $lang('member.assets.waitDelivery') }}</view>
</view>
<view class="assets-li">
<view>{{ accountInfo.order_delivery_count }}</view>
<view>待收货</view>
<view>{{ $lang('member.assets.waitReceive') }}</view>
</view>
<view class="assets-li">
<view>{{ accountInfo.order_refund_count }}</view>
<view>退款中</view>
<view>{{ $lang('member.assets.refunding') }}</view>
</view>
</view>
</view>
@@ -51,27 +51,27 @@
<view v-if="member_info.is_fenxiao == 1" class="assets-box assets-fenxiao">
<view class="assets-title">
<text class="color-base-bg"></text>
<text>分销资产</text>
<text>{{ $lang('member.assets.fenxiaoAssets') }}</text>
</view>
<view class="assets-list">
<view class="assets-li">
<view>¥{{ fenxiao_info.account }}</view>
<view>可提现佣金</view>
<view>{{ $lang('member.assets.withdrawableCommission') }}</view>
</view>
<view class="assets-li">
<view>¥{{ fenxiao_info.account_withdraw_apply }}</view>
<view>提现中佣金</view>
<view>{{ $lang('member.assets.withdrawingCommission') }}</view>
</view>
<view class="assets-li">
<view>{{ accountInfo.fenxiao_order_count }}</view>
<view>待结算订单</view>
<view>{{ $lang('member.assets.waitSettleOrder') }}</view>
</view>
</view>
</view>
</view>
<view class="assets-btn">
<button type="primary" @click="prev">上一步</button>
<button class="color-base-bg" @click="submit">确认申请</button>
<button type="primary" @click="prev">{{ $lang('member.assets.prevStep') }}</button>
<button class="color-base-bg" @click="submit">{{ $lang('member.assets.confirmApply') }}</button>
</view>
</view>
</view>

View File

@@ -11,7 +11,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) }}</view>
{{ $lang('validUntil') }}{{ $util.timeStampTurnTime(memberInfo.level_expire_time, true) }}</view>
</view>
</view>
@@ -21,14 +21,14 @@
<image :src="$util.img('public/uniapp/level/card-bg.png')"></image>
<view class="info">
<view class="level-detail">{{ levelInfo.level_name }}</view>
<view class="growr-name">{{ levelInfo.level_name }}可享受消费折扣和</view>
<view class="growr-value">会员大礼包等权益</view>
<view class="growr-name">{{ levelInfo.level_name }}{{ $lang('enjoyDiscountAnd') }}</view>
<view class="growr-value">{{ $lang('memberGiftBenefits') }}</view>
<view class="growth-rules font-size-tag" @click="openExplainPopup"
v-if="levelInfo.remark != ''">
<text class="iconfont icon-wenhao font-size-tag"></text>
</view>
<button type="default" class="renew-btn"
@click="$util.redirectTo('/pages_tool/member/card_buy')">立即续费</button>
@click="$util.redirectTo('/pages_tool/member/card_buy')">{{ $lang('renewNow') }}</button>
</view>
</view>
</view>
@@ -39,7 +39,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>
@@ -49,18 +49,18 @@
<view class="card-privilege-item" v-if="levelInfo.is_free_shipping">
<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="levelInfo.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">部分商品下单可享{{ levelInfo.consume_discount / 10 }}折优惠</view>
<view class="card-privilege-name">{{ $lang('consumptionDiscount') }}</view>
<view class="card-privilege-text">{{ $lang('enjoyDiscountOnSomeProducts', { discount: levelInfo.consume_discount / 10 }) }}</view>
</view>
<view class="card-privilege-item" v-if="levelInfo.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(levelInfo.point_feedback) }}倍积分回馈</view>
<view class="card-privilege-name">{{ $lang('pointsReward') }}</view>
<view class="card-privilege-text">{{ $lang('earnPointsMultiplier', { multiplier: parseFloat(levelInfo.point_feedback) }) }}</view>
</view>
</view>
@@ -69,7 +69,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>
@@ -78,18 +78,18 @@
<view class="card-privilege-list">
<view class="card-privilege-item" v-if="levelInfo.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">赠送{{ levelInfo.send_point }}积分</view>
<view class="card-privilege-name">{{ $lang('pointsGift') }}</view>
<view class="card-privilege-text">{{ $lang('giftPoints', { points: levelInfo.send_point }) }}</view>
</view>
<view class="card-privilege-item" v-if="levelInfo.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(levelInfo.send_balance) }}元红包</view>
<view class="card-privilege-name">{{ $lang('redPacketGift') }}</view>
<view class="card-privilege-text">{{ $lang('giftRedPacket', { amount: parseFloat(levelInfo.send_balance) }) }}</view>
</view>
<view class="card-privilege-item" v-if="levelInfo.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">赠送{{ levelInfo.send_coupon.split(',').length }}张优惠券</view>
<view class="card-privilege-name">{{ $lang('couponGift') }}</view>
<view class="card-privilege-text">{{ $lang('giftCoupons', { count: levelInfo.send_coupon.split(',').length }) }}</view>
</view>
</view>
</view>
@@ -101,13 +101,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="levelInfo.remark != ''">
<view class="tip">会员卡说明</view>
<view class="tip">{{ $lang('cardDescription') }}</view>
<view class="font-size-base">{{ levelInfo.remark }}</view>
</block>
</view>
@@ -171,11 +171,11 @@ export default {
// 如果后台没配置,用默认值
this.mpShareData = {
appMessage: {
title: '专属会员权益,快来体验',
title: this.$lang('shareTitle'),
path: '/pages_tool/member/card'
},
timeLine: {
title: '专属会员权益,快来体验',
title: this.$lang('shareTitle'),
query: '/pages_tool/member/card'
}
};
@@ -208,19 +208,19 @@ export default {
},
onShareAppMessage() {
return this.mpShareData?.appMessage || {
title: '专属会员权益,快来体验',
title: this.$lang('shareTitle'),
path: '/pages_tool/member/card'
};
},
onShareTimeline() {
return this.mpShareData?.timeLine || {
title: '专属会员权益,快来体验',
title: this.$lang('shareTitle'),
query: '/pages_tool/member/card'
};
},
onAddToFavorites() {
return {
title: '专属会员权益,快来体验',
title: this.$lang('shareTitle'),
path: '/pages_tool/member/card'
};
}

View File

@@ -2,9 +2,9 @@
<view :style="themeColor" :class="isIphoneX ? 'iphone-x' : ''">
<view class="cf-container color-line-border" v-if="storeToken">
<view class="tab">
<view @click="changeState(1)"><text :class="state == 1 ? 'color-base-text active color-base-border-bottom' : ''">未使用</text></view>
<view @click="changeState(2)"><text :class="state == 2 ? 'color-base-text active color-base-border-bottom' : ''">已使用</text></view>
<view @click="changeState(3)"><text :class="state == 3 ? 'color-base-text active color-base-border-bottom' : ''">已过期</text></view>
<view @click="changeState(1)"><text :class="state == 1 ? 'color-base-text active color-base-border-bottom' : ''">{{ $lang('tabUnused') }}</text></view>
<view @click="changeState(2)"><text :class="state == 2 ? 'color-base-text active color-base-border-bottom' : ''">{{ $lang('tabUsed') }}</text></view>
<view @click="changeState(3)"><text :class="state == 3 ? 'color-base-text active color-base-border-bottom' : ''">{{ $lang('tabExpired') }}</text></view>
</view>
<!-- <view class="coupon-head">
<view class="sort" :class="sort == 1 ? 'color-base-border color-base-text' : ''" @click="changeSort(1, '')">全部</view>
@@ -30,37 +30,36 @@
{{ parseFloat(item.money) }}
</view>
<view class="use_price" v-else-if="item.type == 'discount'">
{{ parseFloat(item.discount) }}
<text>折</text>
{{ $lang('discountText', { discount: parseFloat(item.discount) }) }}
</view>
<view class="use_condition font-size-tag" v-if="item.at_least > 0">
满{{ item.at_least }}元可用</view>
<view class="use_condition font-size-tag" v-else>无门槛优惠券</view>
{{ $lang('minAmountCondition', { amount: item.at_least }) }}</view>
<view class="use_condition font-size-tag" v-else>{{ $lang('noThresholdCoupon') }}</view>
</view>
</view>
<view class="item-info">
<view class="use_title">
<view class="title">{{ item.coupon_name }}</view>
<view class="max_price" v-if="item.goods_type == 2 || item.goods_type == 3" :class="{ disabled: item.state == 3 }">指定商品</view>
<view class="max_price" v-if="item.discount_limit != '0.00'">(最大优惠{{ item.discount_limit }}元)</view>
<view class="max_price" v-if="item.goods_type == 2 || item.goods_type == 3" :class="{ disabled: item.state == 3 }">{{ $lang('specifiedGoods') }}</view>
<view class="max_price" v-if="item.discount_limit != '0.00'">{{ $lang('maxDiscount', { amount: item.discount_limit }) }}</view>
<view class="max_price" :class="{ disabled: item.useState == 2 }">{{ item.use_channel_name }}</view>
<!-- <view class="max_price truncate" v-if="item.use_channel!='online'" :class="{ disabled: item.useState == 2 }">
{{ item.use_store==='all'?'适用门店:全部门店': '适用门店:'+item.use_store_name}}
</view> -->
</view>
<view class="use_time" v-if="item.end_time">有效期:{{ $util.timeStampTurnTime(item.end_time) }}
<view class="use_time" v-if="item.end_time">{{ $lang('validPeriodPrefix') }}{{ $util.timeStampTurnTime(item.end_time) }}
</view>
<view class="use_time" v-else>有效期:长期有效</view>
<view class="use_time" v-else>{{ $lang('validPeriodPrefix') }}{{ $lang('longTermValid') }}</view>
</view>
<view class="item-btn">
<view class="tag" v-if="item.state == 1">去使用</view>
<view class="tag disabled" v-if="item.state == 2">已使用</view>
<view class="tag disabled" v-if="item.state == 3">已过期</view>
<view class="tag" v-if="item.state == 1">{{ $lang('useNow') }}</view>
<view class="tag disabled" v-if="item.state == 2">{{ $lang('used') }}</view>
<view class="tag disabled" v-if="item.state == 3">{{ $lang('expired') }}</view>
</view>
</view>
</view>
<view v-if="!list.length && showEmpty" class="margin-top cart-empty" :fixed="false">
<ns-empty :isIndex="true" :emptyBtn="{url: $util.INDEX_PAGE_URL,text: '去逛逛'}" text="暂无优惠券"></ns-empty>
<ns-empty :isIndex="true" :emptyBtn="{url: $util.INDEX_PAGE_URL,text: $lang('goShopping')}" :text="$lang('emptyText')"></ns-empty>
</view>
</block>
</mescroll-uni>
@@ -88,7 +87,7 @@ export default {
setTimeout( () => {
if (!this.addonIsExist.coupon) {
this.$util.showToast({
title: '商家未开启优惠券',
title: this.$lang('merchantNotEnabled'),
mask: true,
duration: 2000
});

View File

@@ -9,11 +9,11 @@
<image :src="$util.getDefaultImage().head" v-else mode="aspectFill" show-menu-by-longpress></image>
<view class="member-desc">
<view class="font-size-base">{{ memberInfo.nickname }}</view>
<view class="font-size-activity-tag">当前等级:{{ memberInfo.member_level_name }}</view>
<view class="font-size-activity-tag">{{ $lang('currentLevelLabel') }}{{ memberInfo.member_level_name }}</view>
</view>
<view class="growth-rules font-size-tag" @click="growthRules">
<text class="iconfont icon-wenhao font-size-tag"></text>
成长规则
{{ $lang('growthRules') }}
</view>
</view>
<swiper :style="{ width: '100vw', height: '390rpx' }" class="margin-bottom"
@@ -54,29 +54,27 @@
<view class="info">
<view class="level-detail" :style="{color:levelList[curIndex]['level_text_color']}">
{{ levelList[curIndex].level_name }}
<text class="isnow " :style="{color:levelList[curIndex]['level_text_color']}" v-if="levelId == item.level_id">当前等级</text>
<text class="isnow " :style="{color:levelList[curIndex]['level_text_color']}" v-if="levelId == item.level_id">{{ $lang('currentLevelTag') }}</text>
</view>
<view class="growr-name" :style="{color:levelList[curIndex]['level_text_color']}">当前成长值</view>
<view class="growr-name" :style="{color:levelList[curIndex]['level_text_color']}">{{ $lang('currentGrowthValue') }}</view>
<view class="growr-value" :style="{color:levelList[curIndex]['level_text_color']}">{{ growth }}</view>
<block v-if="levelId == item.level_id">
<block v-if="levelList[curIndex + 1] != undefined">
<ns-progress :progress="levelList[curIndex + 1].rate"></ns-progress>
<view class="residue-growr-value"
:style="{color:levelList[curIndex]['level_text_color']}">
再获得{{ levelList[curIndex + 1].needGrowth > 0 ? levelList[curIndex + 1].needGrowth : 0 }}成长值成为{{
levelList[curIndex + 1].level_name
}}
</view>
{{ $lang('growthToNextLevel', { needGrowth: levelList[curIndex + 1].needGrowth > 0 ? levelList[curIndex + 1].needGrowth : 0, levelName: levelList[curIndex + 1].level_name }) }}
</view>
</block>
<block v-else>
<view class="residue-growr-value" :style="{color:levelList[curIndex]['level_text_color']}">您现在已经是最高等级</view>
<view class="residue-growr-value" :style="{color:levelList[curIndex]['level_text_color']}">{{ $lang('maxLevelReached') }}</view>
</block>
</block>
<block v-else>
<ns-progress :progress="levelList[curIndex].rate" v-if="levelList[curIndex].needGrowth > 0"></ns-progress>
<view class="residue-growr-value" v-if="levelList[curIndex].needGrowth > 0" :style="{color:levelList[curIndex]['level_text_color']}">
再获得{{ levelList[curIndex].needGrowth }}成长值成为{{ levelList[curIndex].level_name }}
</view>
{{ $lang('growthToNextLevel', { needGrowth: levelList[curIndex].needGrowth, levelName: levelList[curIndex].level_name }) }}
</view>
</block>
</view>
</view>
@@ -84,52 +82,52 @@
</swiper-item>
</swiper>
<view class="member-equity" v-if="levelList[curIndex].is_free_shipping > 0 || levelList[curIndex].consume_discount > 0 || levelList[curIndex].point_feedback > 0">
<view class="equity-title">会员权益</view>
<view class="equity-title">{{ $lang('memberBenefits') }}</view>
<view class="equity-itme" v-if="levelList[curIndex].is_free_shipping > 0">
<image :src="$util.img('public/uniapp/level/exemption_postage.png')" mode="aspectFit" show-menu-by-longpress></image>
<view class="equity-content" :class="{ active: levelList[curIndex].consume_discount > 0 }">
<text>包邮服务</text>
<text class="equity-desc">提供商品包邮服务</text>
<text>{{ $lang('freeShipping') }}</text>
<text class="equity-desc">{{ $lang('freeShippingDesc') }}</text>
</view>
</view>
<view class="equity-itme" v-if="levelList[curIndex].consume_discount > 0">
<image :src="$util.img('public/uniapp/level/consumption_discount.png')" mode="aspectFit" show-menu-by-longpress></image>
<view class="equity-content" :class="{ active: levelList[curIndex].point_feedback > 0 }">
<text>享受消费折扣服务</text>
<text class="equity-desc" v-if="levelList[curIndex].is_default == 1">不享受任何消费折扣和其他权益</text>
<text class="equity-desc" v-else>提供{{ levelList[curIndex].consume_discount }}折消费折扣</text>
<text>{{ $lang('consumptionDiscount') }}</text>
<text class="equity-desc" v-if="levelList[curIndex].is_default == 1">{{ $lang('noDiscountDesc') }}</text>
<text class="equity-desc" v-else>{{ $lang('discountDescWithValue', { discount: levelList[curIndex].consume_discount }) }}</text>
</view>
</view>
<view class="equity-itme" v-if="levelList[curIndex].point_feedback > 0">
<image :src="$util.img('public/uniapp/level/integral_feedback.png')" mode="aspectFit" show-menu-by-longpress></image>
<view class="equity-content">
<text>享受积分回馈服务</text>
<text class="equity-desc">提供{{ levelList[curIndex].point_feedback }}倍积分回馈倍率</text>
<text>{{ $lang('pointsReward') }}</text>
<text class="equity-desc">{{ $lang('pointsRewardDesc', { multiplier: levelList[curIndex].point_feedback }) }}</text>
</view>
</view>
</view>
<view class="member-gift" v-if="levelList[curIndex].send_balance > 0 || levelList[curIndex].send_balance > 0 || levelList[curIndex].send_coupon">
<view class="gift-title">会员礼包</view>
<view class="gift-title">{{ $lang('memberGift') }}</view>
<view class="gift-itme" v-if="levelList[curIndex].send_point > 0">
<image :src="$util.img('public/uniapp/level/integral.png')" mode="aspectFit" show-menu-by-longpress></image>
<view class="gift-content" :class="{ active: levelList[curIndex].send_balance > 0 }">
<text>积分礼包</text>
<text class="gift-desc">赠送{{ levelList[curIndex].send_point }}积分</text>
<text>{{ $lang('pointsGift') }}</text>
<text class="gift-desc">{{ $lang('giftPoints', { points: levelList[curIndex].send_point }) }}</text>
</view>
</view>
<view class="gift-itme" v-if="levelList[curIndex].send_balance > 0">
<image :src="$util.img('public/uniapp/level/red_packet.png')" mode="aspectFit" show-menu-by-longpress></image>
<view class="gift-content" :class="{ active: levelList[curIndex].send_coupon }">
<text>红包礼包</text>
<text class="gift-desc">赠送{{ levelList[curIndex].send_balance }}元红包</text>
<text>{{ $lang('redPacketGift') }}</text>
<text class="gift-desc">{{ $lang('giftRedPacket', { amount: levelList[curIndex].send_balance }) }}</text>
</view>
</view>
<view class="gift-itme" v-if="levelList[curIndex].send_coupon" @click="openCoupon(levelList[curIndex].send_coupon)">
<image :src="$util.img('public/uniapp/level/coupon.png')" mode="aspectFit" show-menu-by-longpress></image>
<view class="gift-content">
<text>优惠券礼包</text>
<text class="gift-desc">赠送{{ levelList[curIndex].coupon_length }}张优惠券</text>
<text>{{ $lang('couponGift') }}</text>
<text class="gift-desc">{{ $lang('giftCoupons', { count: levelList[curIndex].coupon_length }) }}</text>
</view>
</view>
</view>
@@ -139,7 +137,7 @@
<uni-popup ref="couponPopup" type="bottom">
<view class="coupon-popup-box">
<view class="coupon-popup-title" @click="closeCoupon">
优惠券
{{ $lang('coupons') }}
<text class="iconfont icon-close"></text>
</view>
<scroll-view class="coupon-popup-content" scroll-y>
@@ -150,11 +148,11 @@
</view>
<view class="coupon-price" v-if="item.type == 'reward'">
<text>{{ item.money }}</text>
元
{{ $lang('yuan') }}
</view>
<view class="coupon-price" v-if="item.type == 'discount'">
<text>{{ $util.numberFixed(item.discount, 1) }}</text>
折
{{ $lang('zhe') }}
</view>
</view>
</scroll-view>
@@ -265,7 +263,7 @@
},
getBannerDetail(index) {
uni.showLoading({
title: '将前往详情页面',
title: this.$lang('navigatingToDetail'),
duration: 2000,
mask: true
});

View File

@@ -3,13 +3,13 @@
<view class="grow-explain">
<view class="explain-title">
<image :src="$util.img('public/uniapp/level/growth_that_left.png')" mode="aspectFit" show-menu-by-longpress></image>
成长值说明
{{ $lang('title') }}
<image :src="$util.img('public/uniapp/level/growth_that_right.png')" mode="aspectFit" show-menu-by-longpress></image>
</view>
<view class="explain-table">
<view class="explain-tr">
<text class="explain-th">等级</text>
<text class="explain-th">成长值</text>
<text class="explain-th">{{ $lang('level') }}</text>
<text class="explain-th">{{ $lang('growthValue') }}</text>
</view>
<view class="explain-tr" v-for="(item, index) in levelList" :key="index">
<text class="explain-td">{{ item.level_name }}</text>
@@ -20,20 +20,20 @@
<view class="grow-value">
<view class="title">
<image :src="$util.img('public/uniapp/level/explain.png')" mode="aspectFit" show-menu-by-longpress></image>
<text>什么是成长值</text>
<text>{{ $lang('whatIsGrowthValue') }}</text>
</view>
<view class="content color-tip">成长值是消费者在店铺成为会员后,通过消费计算出来的值。成长值决定会员等级,会员等级越高,所享受的会员权益和会员礼包就越多。</view>
<view class="content color-tip">{{ $lang('growthValueDescription') }}</view>
</view>
<view class="acquisition-grow">
<view class="title">
<image :src="$util.img('public/uniapp/level/explain.png')" mode="aspectFit" show-menu-by-longpress></image>
<text>如何获得成长值</text>
<text>{{ $lang('howToGetGrowthValue') }}</text>
</view>
<view class="content color-tip">
<text>1、注册会员送x成长值。</text>
<text>2、会员充值到余额送x成长值。</text>
<text>3、会员签到送x成长值。</text>
<text>4、会员消费x元,交易完成即可获得x个成长值。</text>
<text>{{ $lang('ruleRegister') }}</text>
<text>{{ $lang('ruleRecharge') }}</text>
<text>{{ $lang('ruleCheckin') }}</text>
<text>{{ $lang('ruleConsume') }}</text>
</view>
</view>
@@ -118,7 +118,7 @@
},
getBannerDetail(index) {
uni.showLoading({
title: '将前往详情页面',
title: this.$lang('navigatingToDetail'),
duration: 2000,
mask: true
});

View File

@@ -1,16 +1,16 @@
<template>
<view :style="themeColor" class="container">
<view class="tips" v-if="step != 0">请输入6位支付密码,建议不要使用重复或连续数字</view>
<view class="tips" v-else>验证码已发送至{{ memberInfo.mobile | mobile }}请在下方输入4位数字验证码</view>
<view class="tips" v-if="step != 0">{{ $lang('passwordTips') }}</view>
<view class="tips" v-else>{{ $lang('codeSentTips', { mobile: memberInfo.mobile | mobile }) }}</view>
<view class="password-wrap">
<myp-one :maxlength="step == 0 ? 4 : 6" :is-pwd="step != 0" @input="input" ref="input" :auto-focus="true"></myp-one>
<view v-show="step == 0" class="dynacode" :class="dynacodeData.seconds == 120 ? 'color-base-text' : 'color-tip'" @click="sendMobileCode">
{{ dynacodeData.codeText }}
</view>
<view class="action-tips" v-show="step == 0">输入短信验证码</view>
<view class="action-tips" v-show="step == 1">请设置支付密码</view>
<view class="action-tips" v-show="step == 2">请再次输入</view>
<view class="btn color-base-bg color-base-border" :class="{ disabled: !isClick }" @click="confirm">确认</view>
<view class="action-tips" v-show="step == 0">{{ $lang('inputSmsCode') }}</view>
<view class="action-tips" v-show="step == 1">{{ $lang('setPayPassword') }}</view>
<view class="action-tips" v-show="step == 2">{{ $lang('inputAgain') }}</view>
<view class="btn color-base-bg color-base-border" :class="{ disabled: !isClick }" @click="confirm">{{ $lang('confirm') }}</view>
</view>
</view>
</template>
@@ -34,7 +34,7 @@
dynacodeData: {
seconds: 120,
timer: null,
codeText: '获取验证码',
codeText: '',
isSend: false
}
};
@@ -42,14 +42,16 @@
onLoad(option) {
if (option.back) this.back = option.back;
this.dynacodeData.codeText = this.$lang('getCode');
// 判断登录
if (!this.storeToken) {
this.$util.redirectTo(this.$util.LOGIN_PAGE_URL);
} else {
if (this.memberInfo.mobile == '') {
uni.showModal({
title: '提示',
content: '设置支付密码需要先绑定手机号,是否立即绑定?',
title: this.$lang('tipsTitle'),
content: this.$lang('bindMobileFirst'),
success: res => {
if (res.confirm) {
this.$util.redirectTo('/pages_tool/member/info', {
@@ -132,7 +134,7 @@
success: res => {
if (res.code >= 0) {
this.$util.showToast({
title: '修改成功'
title: this.$lang('modifySuccess')
});
setTimeout(() => {
if (this.back) this.$util.redirectTo(this.back, {},
@@ -149,7 +151,7 @@
});
} else {
this.$util.showToast({
title: '两次输入的密码不一致',
title: this.$lang('passwordMismatch'),
success: res => {
this.initInfo();
}
@@ -185,7 +187,7 @@
if (this.dynacodeData.seconds == 120 && this.dynacodeData.timer == null) {
this.dynacodeData.timer = setInterval(() => {
this.dynacodeData.seconds--;
this.dynacodeData.codeText = this.dynacodeData.seconds + 's后可重新获取';
this.dynacodeData.codeText = this.$lang('resendAfter', { seconds: this.dynacodeData.seconds });
}, 1000);
}
} else {
@@ -216,7 +218,7 @@
this.dynacodeData = {
seconds: 120,
timer: null,
codeText: '获取动态码',
codeText: this.$lang('getDynacode'),
isSend: false
};
}
@@ -275,4 +277,4 @@
}
}
}
</style>
</style>

View File

@@ -14,15 +14,15 @@
<view class="refund-option" v-show="!refund_type">
<view class="option-item" @click="selectRefundType(1)">
<view>
<text>退款无需退货</text>
<text class="font-size-goods-tag color-tip">没收到货,或与卖家协商同意无需退货只退款</text>
<text>{{ $lang('refundType.refundOnly') }}</text>
<text class="font-size-goods-tag color-tip">{{ $lang('refundType.refundOnlyDesc') }}</text>
</view>
<text class="iconfont icon-right"></text>
</view>
<view class="option-item" @click="selectRefundType(2)" v-if="refund_data.refund_type.length == 2">
<view>
<text>退货退款</text>
<text class="font-size-goods-tag color-tip">已收到货,需退还收到的货物</text>
<text>{{ $lang('refundType.returnRefund') }}</text>
<text class="font-size-goods-tag color-tip">{{ $lang('refundType.returnRefundDesc') }}</text>
</view>
<text class="iconfont icon-right"></text>
</view>
@@ -31,27 +31,27 @@
<view v-show="refund_type">
<view class="refund-form">
<view class="item-wrap" @click="openPopup('refundReasonPopup')">
<view class="label">退款原因:</view>
<view class="label">{{ $lang('form.refundReason') }}</view>
<view class="cont reason">
<text class="color-tip" v-if="!refund_reason.length">请选择</text>
<text class="color-tip" v-if="!refund_reason.length">{{ $lang('form.pleaseSelect') }}</text>
<text class="color-tip" v-else>{{ refund_reason }}</text>
</view>
<text class="iconfont icon-right"></text>
</view>
<view class="item-wrap">
<view class="label">退款金额:</view>
<view class="label">{{ $lang('form.refundAmount') }}</view>
<view class="cont color-base-text">{{ $lang('common.currencySymbol') }}{{ refund_data.refund_money }}</view>
</view>
</view>
<view class="refund-form">
<view class="item-wrap"><view class="label active">退款说明</view></view>
<view class="item-wrap"><view class="label active">{{ $lang('form.refundRemark') }}</view></view>
<!-- #ifdef MP-WEIXIN -->
<textarea
v-if="!showText"
class="newText"
placeholder="请输入退款说明(选填)"
:placeholder="$lang('form.remarkPlaceholder')"
placeholder-class="color-tip font-size-tag"
:auto-height="true"
v-model="refund_remark"
@@ -60,7 +60,7 @@
<!-- #ifdef H5 -->
<textarea
class="newText"
placeholder="请输入退款说明(选填)"
:placeholder="$lang('form.remarkPlaceholder')"
@blur="textBlur()"
placeholder-class="color-tip font-size-tag"
:auto-height="true"
@@ -78,7 +78,7 @@
<uni-popup ref="refundReasonPopup" type="bottom" @change="change()">
<view class="refund-reason-popup popup">
<view class="popup-header">
<view><text class="tit">退款原因</text></view>
<view><text class="tit">{{ $lang('reasonPopup.title') }}</text></view>
<view class="align-right" @click="closePopup('refundReasonPopup')"><text class="iconfont icon-close"></text></view>
</view>
<view class="popup-body">
@@ -92,7 +92,7 @@
</scroll-view>
</view>
<view class="popup-footer" :class="{ 'bottom-safe-area': isIphoneX }">
<view class="confirm-btn color-base-bg" @click="closePopup('refundReasonPopup')">确定</view>
<view class="confirm-btn color-base-bg" @click="closePopup('refundReasonPopup')">{{ $lang('reasonPopup.confirm') }}</view>
</view>
</view>
</uni-popup>
@@ -172,7 +172,7 @@ export default {
this.refund_data = 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);
@@ -239,7 +239,7 @@ export default {
},
verify() {
if (this.refund_reason == '') {
this.$util.showToast({ title: '请选择退款原因' });
this.$util.showToast({ title: this.$lang('validate.pleaseSelectRefundReason') });
return false;
}
return true;

View File

@@ -9,24 +9,24 @@
</view> -->
<view class="recharge-box">
<view class="recharge-box-title">充值金额
<view @click="toOrderList"><text class="color-base-text" style="color:#1db03b !important">充值记录</text></view>
<view class="recharge-box-title">{{ $lang('rechargeAmount') }}
<view @click="toOrderList"><text class="color-base-text" style="color:#1db03b !important">{{ $lang('rechargeRecords') }}</text></view>
</view>
<view class="box-content">
<view class="money">
<text class="label">¥</text>
<view class="input-box">
<input class="reg-input" v-model="payMoney" placeholder="请输入充值金额" placeholder-style="font-size:32rpx;color:#969696;font-weight:500"></input>
<input class="reg-input" v-model="payMoney" :placeholder="$lang('placeholderEnterAmount')" placeholder-style="font-size:32rpx;color:#969696;font-weight:500"></input>
</view>
</view>
<view v-if="list.length" class="content-item" v-for="(item, index) in list" :key="index" @click="itemClick(index, item.recharge_id, item.buy_price)" :class="isIndex == index ? 'active' : ''">
<view class="price1 ">
<text class="price-font">{{ parseFloat(item.face_value).toFixed(0) }}</text>
<text>元</text>
<text>{{ $lang('yuan') }}</text>
</view>
<view class="price2">售价 {{ item.buy_price }} 元</view>
<view class="price2">{{ $lang('salePrice', { price: item.buy_price }) }}</view>
</view>
<!-- <view class="content-item" @click="openRecharge()">
@@ -62,12 +62,12 @@
</view> -->
<uni-popup ref="rechargePopup" type="bottom">
<view class="rechargeList">
<view class="tip">请输入充值金额</view>
<view class="tip">{{ $lang('pleaseEnterAmount') }}</view>
<view class="input color-tip">
{{keywordsInfo.price?keywordsInfo.price:'金额'}}<text class="color-base-text">元</text>
{{keywordsInfo.price?keywordsInfo.price:$lang('amount')}}<text class="color-base-text">{{ $lang('yuan') }}</text>
</view>
<view class="input color-tip">
<text class="color-base-text" v-if="payMoney > 0">售价{{payMoney}}元</text>
<text class="color-base-text" v-if="payMoney > 0">{{ $lang('salePrice', { price: payMoney }) }}</text>
</view>
<view class="keywords">
<view class="keywords-left">
@@ -86,7 +86,7 @@
</view>
<view class="keywords-right">
<view @click="delPrice"><text class="iconfont icon-close"></text></view>
<view class="color-base-bg" @click="keywordsPayment()">确认充值</view>
<view class="color-base-bg" @click="keywordsPayment()">{{ $lang('confirmRecharge') }}</view>
</view>
</view>
</view>
@@ -94,7 +94,7 @@
<!-- 选择支付方式弹窗 -->
<ns-payment ref="choosePaymentPopup" :payMoney="payMoney" @confirm="toPay"></ns-payment>
<view style="background: #fff;width: 100%;position: fixed;bottom: 0rpx;">
<button class="add-account" type="primary" @click="submitPayment" >充值</button>
<button class="add-account" type="primary" @click="submitPayment" >{{ $lang('recharge') }}</button>
</view>
<!-- <button class="add-account" type="primary" :disabled="recharge_id > 0 ? false : true" @click="openChoosePayment">充值</button> -->
@@ -176,7 +176,7 @@
this.openChoosePayment()
} else {
this.$util.showToast({
title: "请输入充值金额"
title: this.$lang('pleaseEnterAmount')
})
}
@@ -273,7 +273,7 @@
});
} else {
this.$util.showToast({
title: '请选择套餐'
title: this.$lang('pleaseSelectPackage')
});
}
},

View File

@@ -307,15 +307,64 @@ function main() {
// 中文正则(基本汉字区)
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;
// 去掉行内注释(// 和 /* */ 块注释单行)
function stripInlineComment(line, inBlockComment) {
let result = line;
let inString = false;
let stringChar = '';
let i = 0;
while (i < result.length) {
const ch = result[i];
const next = result[i + 1];
if (inBlockComment) {
// 块注释中,找 */
if (ch === '*' && next === '/') {
inBlockComment = false;
result = result.substring(0, i) + ' ' + result.substring(i + 2);
i += 2;
continue;
}
// 替换为空格保持位置
result = result.substring(0, i) + ' ' + result.substring(i + 1);
i++;
continue;
}
if (inString) {
if (ch === '\\') { i += 2; continue; } // 转义
if (ch === stringChar) { inString = false; }
i++;
continue;
}
// 字符串开始
if (ch === "'" || ch === '"' || ch === '`') {
inString = true;
stringChar = ch;
i++;
continue;
}
// 行注释
if (ch === '/' && next === '/') {
result = result.substring(0, i);
break;
}
// 块注释开始
if (ch === '/' && next === '*') {
inBlockComment = true;
result = result.substring(0, i) + ' ' + result.substring(i + 2);
i += 2;
continue;
}
i++;
}
return { text: result, inBlockComment };
}
// 判断一行是否是 $lang 调用(已经国际化)
@@ -332,10 +381,38 @@ function main() {
const content = fs.readFileSync(fullPath, 'utf-8');
const lines = content.split('\n');
let fileHits = 0;
let inBlockComment = false;
let inHtmlComment = false;
for (let i = 0; i < lines.length; i++) {
const line = lines[i];
if (isCommentLine(line)) continue;
let line = lines[i];
// HTML 注释块处理 (<!-- -->)
if (inHtmlComment) {
const endIdx = line.indexOf('-->');
if (endIdx >= 0) {
line = line.substring(endIdx + 3);
inHtmlComment = false;
} else {
continue; // 整行在 HTML 注释中
}
}
const htmlStart = line.indexOf('<!--');
if (htmlStart >= 0) {
const htmlEnd = line.indexOf('-->', htmlStart);
if (htmlEnd >= 0) {
line = line.substring(0, htmlStart) + line.substring(htmlEnd + 3);
} else {
line = line.substring(0, htmlStart);
inHtmlComment = true;
}
}
// JS/CSS 块注释 + 行注释处理
const stripped = stripInlineComment(line, inBlockComment);
inBlockComment = stripped.inBlockComment;
line = stripped.text;
if (isLangCall(line)) continue;
const matches = line.match(CN_RE);