refactor: 替换项目中硬编码文本为多语言配置
将多处页面和组件内的硬编码文字替换为国际化语言包调用,包括空状态提示、按钮文案、表单占位符、弹窗标题等内容,统一项目多语言管理
This commit is contained in:
@@ -15,7 +15,7 @@ export default {
|
||||
props: {
|
||||
text: {
|
||||
type: String,
|
||||
default: '暂无相关数据'
|
||||
default: ''
|
||||
},
|
||||
subText: {
|
||||
type: String,
|
||||
@@ -28,7 +28,7 @@ export default {
|
||||
emptyBtn: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return { text: '去逛逛' };
|
||||
return { text: '' };
|
||||
}
|
||||
},
|
||||
fixed: {
|
||||
|
||||
@@ -7,34 +7,34 @@
|
||||
<!-- #ifdef H5 -->
|
||||
<template v-if="forceBindingMobileControl">
|
||||
<view class="head">
|
||||
<text class="title">检测到您还未绑定手机号</text>
|
||||
<text class="color-tip tips">为了方便您接收订单等信息,需要绑定手机号</text>
|
||||
<text class="title">{{ $lang('loginPage.detectPhoneNotBound') }}</text>
|
||||
<text class="color-tip tips">{{ $lang('loginPage.bindPhoneForOrder') }}</text>
|
||||
<text class="iconfont icon-close color-tip" @click="cancelCompleteInfo"></text>
|
||||
</view>
|
||||
<view class="item-wrap">
|
||||
<text class="label">手机号</text>
|
||||
<input type="number" placeholder="请输入手机号" v-model="formData.mobile" maxlength="11" />
|
||||
<text class="label">{{ $lang('loginPage.phone') }}</text>
|
||||
<input type="number" :placeholder="$lang('loginPage.phone')" v-model="formData.mobile" maxlength="11" />
|
||||
</view>
|
||||
<view class="item-wrap" v-if="isOpenCaptcha">
|
||||
<text class="label">验证码</text>
|
||||
<input type="number" placeholder="请输入验证码" v-model="formData.vercode" maxlength="4" />
|
||||
<text class="label">{{ $lang('loginPage.verificationCode') }}</text>
|
||||
<input type="number" :placeholder="$lang('loginPage.verificationCode')" v-model="formData.vercode" maxlength="4" />
|
||||
<image :src="captcha.img" class="captcha" @click="getCaptcha" show-menu-by-longpress></image>
|
||||
</view>
|
||||
<view class="item-wrap">
|
||||
<text class="label">动态码</text>
|
||||
<input type="number" placeholder="请输入动态码" v-model="formData.dynacode" maxlength="4" />
|
||||
<text class="label">{{ $lang('loginPage.dynamicCode') }}</text>
|
||||
<input type="number" :placeholder="$lang('loginPage.dynamicCode')" v-model="formData.dynacode" maxlength="4" />
|
||||
<view class="send color-base-text" @click="sendMobileCode">{{ dynacodeData.codeText }}
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<button type="default" class="save-btn" @click="saveH5" :disabled="isDisabled">保存</button>
|
||||
<button type="default" class="save-btn" @click="saveH5" :disabled="isDisabled">{{ $lang('loginPage.save') }}</button>
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- #ifdef MP -->
|
||||
<view class="head">
|
||||
<text class="title">欢迎来到 {{ site_name }}</text>
|
||||
<text class="title">{{ $lang('loginPage.welcomeTo') }} {{ site_name }}</text>
|
||||
<text class="color-tip tips">
|
||||
<template>{{ forceBindingMobileControl ? '使用手机号登录,' : '注册登录,' }}</template>
|
||||
<template>{{ forceBindingMobileControl ? $lang('loginPage.usePhoneLogin') : $lang('loginPage.registerLogin') }}</template>
|
||||
获得订单、售后等服务。
|
||||
</text>
|
||||
<text class="iconfont icon-close color-tip" @click="cancelCompleteInfo"></text>
|
||||
@@ -48,9 +48,9 @@
|
||||
<view style="text-align: left; margin-left: 10rpx; padding-top: 2rpx; font-size: 28rpx;">
|
||||
我同意
|
||||
<text style="color: #4395ff;"
|
||||
@click="tourl('/pages_tool/agreement/contenr?type=0')">《隐私条款》</text>
|
||||
@click="tourl('/pages_tool/agreement/contenr?type=0')">{{ $lang('loginPage.privacyClause') }}</text>
|
||||
<text style="color: #4395ff;"
|
||||
@click="tourl('/pages_tool/agreement/contenr?type=1')">《用户服务协议》</text>
|
||||
@click="tourl('/pages_tool/agreement/contenr?type=1')">{{ $lang('loginPage.userAgreement') }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -58,25 +58,25 @@
|
||||
<block v-if="isAgree">
|
||||
<button class="auth-login save-btn border-0" style="border: none;" open-type="getPhoneNumber"
|
||||
@getphonenumber="getPhoneNumber">
|
||||
<text style="color: #fff; font-size: 30rpx;">同意隐私协议并授权手机号</text>
|
||||
<text style="color: #fff; font-size: 30rpx;">{{ $lang('loginPage.agreePrivacyAndAuth') }}</text>
|
||||
</button>
|
||||
</block>
|
||||
<block v-else>
|
||||
<button class="auth-login save-btn border-0" style="border: none;" @click="authno">
|
||||
<text style="color: #fff; font-size: 30rpx;">授权手机号码</text>
|
||||
<text style="color: #fff; font-size: 30rpx;">{{ $lang('loginPage.authPhoneNumber') }}</text>
|
||||
</button>
|
||||
</block>
|
||||
|
||||
<view @click="closeLogin"
|
||||
style="font-size: 30rpx; color: #888; text-align: center; padding-top: 10rpx;">
|
||||
暂不登录
|
||||
{{ $lang('loginPage.notNow') }}
|
||||
</view>
|
||||
|
||||
<!-- 昵称和头像模式 -->
|
||||
<template v-if="enableNickAndAvatar">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view class="item-wrap">
|
||||
<text class="label">头像</text>
|
||||
<text class="label">{{ $lang('loginPage.avatar') }}</text>
|
||||
<button open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
|
||||
<image :src="avatarUrl ? avatarUrl : $util.getDefaultImage().head"
|
||||
@error="avatarUrl = $util.getDefaultImage().head" mode="aspectFill" show-menu-by-longpress/>
|
||||
@@ -84,15 +84,15 @@
|
||||
</button>
|
||||
</view>
|
||||
<view class="item-wrap">
|
||||
<text class="label">昵称</text>
|
||||
<input type="nickname" placeholder="请输入昵称" v-model="nickName" @blur="blurNickName"
|
||||
<text class="label">{{ $lang('loginPage.nickname') }}</text>
|
||||
<input type="nickname" :placeholder="$lang('loginPage.nickname')" v-model="nickName" @blur="blurNickName"
|
||||
maxlength="50" />
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
|
||||
<!-- #ifdef MP-ALIPAY -->
|
||||
<view class="item-wrap">
|
||||
<text class="label">头像</text>
|
||||
<text class="label">{{ $lang('loginPage.avatar') }}</text>
|
||||
<button open-type="getAuthorize" scope="userInfo" @getAuthorize="aliappGetUserinfo"
|
||||
:plain="true" class="border-0">
|
||||
<image :src="avatarUrl ? avatarUrl : $util.getDefaultImage().head"
|
||||
@@ -101,21 +101,21 @@
|
||||
</button>
|
||||
</view>
|
||||
<view class="item-wrap">
|
||||
<text class="label">昵称</text>
|
||||
<input type="nickname" placeholder="请输入昵称" v-model="nickName" @blur="blurNickName"
|
||||
<text class="label">{{ $lang('loginPage.nickname') }}</text>
|
||||
<input type="nickname" :placeholder="$lang('loginPage.nickname')" v-model="nickName" @blur="blurNickName"
|
||||
maxlength="50" />
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
|
||||
<view class="item-wrap" v-if="forceBindingMobileControl">
|
||||
<text class="label">手机号</text>
|
||||
<text class="label">{{ $lang('loginPage.phone') }}</text>
|
||||
<button open-type="getPhoneNumber" :plain="true" class="auth-login border-0"
|
||||
@getphonenumber="getPhoneNumber">
|
||||
<text class="mobile" v-if="formData.mobile">{{ formData.mobile }}</text>
|
||||
<text class="color-base-text" v-else>获取手机号</text>
|
||||
<text class="color-base-text" v-else>{{ $lang('loginPage.getPhone') }}</text>
|
||||
</button>
|
||||
</view>
|
||||
<button type="default" class="save-btn" @click="saveMp" :disabled="isDisabled">保存</button>
|
||||
<button type="default" class="save-btn" @click="saveMp" :disabled="isDisabled">{{ $lang('loginPage.save') }}</button>
|
||||
</template>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
@@ -166,7 +166,7 @@ export default {
|
||||
dynacodeData: {
|
||||
seconds: 120,
|
||||
timer: null,
|
||||
codeText: '获取动态码',
|
||||
codeText: this.$lang('loginPage.dynamicCode'),
|
||||
isSend: false
|
||||
},
|
||||
// 小程序获取手机号所需数据
|
||||
@@ -228,7 +228,7 @@ export default {
|
||||
// 同意协议
|
||||
authno() {
|
||||
if (!this.isAgree) {
|
||||
this.$util.showToast({ title: '请确认相关协议' });
|
||||
this.$util.showToast({ title: this.$lang('loginPage.confirmAgreement') });
|
||||
}
|
||||
},
|
||||
|
||||
@@ -324,7 +324,7 @@ export default {
|
||||
},
|
||||
fail: () => {
|
||||
this.$util.showToast({
|
||||
title: '上传失败'
|
||||
title: this.$lang('loginPage.uploadFailed')
|
||||
});
|
||||
}
|
||||
})
|
||||
@@ -386,17 +386,17 @@ export default {
|
||||
var rule = [{
|
||||
name: 'mobile',
|
||||
checkType: 'required',
|
||||
errorMsg: '请输入手机号'
|
||||
errorMsg: this.$lang('loginPage.phoneRequired')
|
||||
}, {
|
||||
name: 'mobile',
|
||||
checkType: 'phoneno',
|
||||
errorMsg: '请输入正确的手机号'
|
||||
errorMsg: this.$lang('loginPage.phoneInvalid')
|
||||
}];
|
||||
if (this.isOpenCaptcha == 1) {
|
||||
rule.push({
|
||||
name: 'captcha_code',
|
||||
checkType: 'required',
|
||||
errorMsg: '请输入验证码'
|
||||
errorMsg: this.$lang('loginPage.verificationCodeRequired')
|
||||
});
|
||||
}
|
||||
var checkRes = validate.check(data, rule);
|
||||
@@ -444,7 +444,7 @@ export default {
|
||||
this.dynacodeData = {
|
||||
seconds: 120,
|
||||
timer: null,
|
||||
codeText: '获取动态码',
|
||||
codeText: this.$lang('loginPage.dynamicCode'),
|
||||
isSend: false
|
||||
};
|
||||
},
|
||||
@@ -455,23 +455,23 @@ export default {
|
||||
let rule = [{
|
||||
name: 'mobile',
|
||||
checkType: 'required',
|
||||
errorMsg: '请输入手机号'
|
||||
errorMsg: this.$lang('loginPage.phoneRequired')
|
||||
}, {
|
||||
name: 'mobile',
|
||||
checkType: 'phoneno',
|
||||
errorMsg: '请输入正确的手机号'
|
||||
errorMsg: this.$lang('loginPage.phoneInvalid')
|
||||
}];
|
||||
if (this.isOpenCaptcha == 1) {
|
||||
if (this.captcha.id != '') rule.push({
|
||||
name: 'captcha_code',
|
||||
checkType: 'required',
|
||||
errorMsg: '请输入验证码'
|
||||
errorMsg: this.$lang('loginPage.verificationCodeRequired')
|
||||
});
|
||||
}
|
||||
rule.push({
|
||||
name: 'code',
|
||||
checkType: 'required',
|
||||
errorMsg: '请输入动态码'
|
||||
errorMsg: this.$lang('loginPage.dynamicCodeRequired')
|
||||
});
|
||||
|
||||
var checkRes = validate.check(data, rule);
|
||||
@@ -603,7 +603,7 @@ export default {
|
||||
// 授权登录
|
||||
authLogin(data, type = 'authLogin') {
|
||||
uni.showLoading({
|
||||
title: '登录中'
|
||||
title: this.$lang('loginPage.loggingIn')
|
||||
});
|
||||
uni.setStorageSync('authInfo', data);
|
||||
if (uni.getStorageSync('source_member')) data.source_member = uni.getStorageSync('source_member');
|
||||
@@ -643,7 +643,7 @@ export default {
|
||||
fail: () => {
|
||||
uni.hideLoading();
|
||||
this.$util.showToast({
|
||||
title: '登录失败'
|
||||
title: this.$lang('loginPage.loginFailed')
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -669,12 +669,12 @@ export default {
|
||||
// 微信小程序保存数据
|
||||
saveMp() {
|
||||
if (this.formData.mobile === '') {
|
||||
this.$util.showToast({ title: '请授权您的手机号码' });
|
||||
this.$util.showToast({ title: this.$lang('loginPage.phoneAuthRequired') });
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.nickName.length == 0 && this.enableNickAndAvatar) {
|
||||
this.$util.showToast({ title: '请输入昵称' });
|
||||
this.$util.showToast({ title: this.$lang('loginPage.nicknameRequired') });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -715,7 +715,7 @@ export default {
|
||||
},
|
||||
fail: () => {
|
||||
this.$util.showToast({
|
||||
title: '头像拉取失败'
|
||||
title: this.$lang('loginPage.avatarFetchFailed')
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<view :class="['box', 'align-left']" :style="item._boxAlignStyle">
|
||||
<input
|
||||
type="text"
|
||||
:placeholder="item.value.placeholder || '请输入提示语'"
|
||||
:placeholder="item.value.placeholder || $lang('form.inputPlaceholder')"
|
||||
placeholder-class="placeholder color-tip"
|
||||
v-model="item.val"
|
||||
/>
|
||||
@@ -28,7 +28,7 @@
|
||||
</view>
|
||||
<view :class="['box', 'align-left']" :style="item._boxAlignStyle">
|
||||
<textarea
|
||||
:placeholder="item.value.placeholder || '请输入提示语'"
|
||||
:placeholder="item.value.placeholder || $lang('form.inputPlaceholder')"
|
||||
placeholder-class="placeholder color-tip"
|
||||
v-model="item.val"
|
||||
></textarea>
|
||||
@@ -50,7 +50,7 @@
|
||||
</view>
|
||||
<view :class="['box', 'box-flex', 'align-right']">
|
||||
<text v-if="item.val != ''">{{ item.val }}</text>
|
||||
<text v-else class="color-tip">{{ item.value.placeholder || '请选择' }}</text>
|
||||
<text v-else class="color-tip">{{ item.value.placeholder || $lang('form.selectPlaceholder') }}</text>
|
||||
<text class="iconfont icon-right"></text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -146,7 +146,7 @@
|
||||
@change="bindDateChange($event, index)"
|
||||
>
|
||||
<view :class="['uni-input', !item.val ? 'color-tip' : '']">
|
||||
{{ item.val ? item.val : (item.value.placeholder || '请选择日期') }}
|
||||
{{ item.val ? item.val : (item.value.placeholder || $lang('form.selectDate')) }}
|
||||
</view>
|
||||
</picker>
|
||||
<text class="iconfont icon-right"></text>
|
||||
@@ -170,7 +170,7 @@
|
||||
>
|
||||
<view class="picker-box">
|
||||
<view :class="['uni-input', !item.start_date ? 'color-tip' : '']">
|
||||
{{ item.start_date ? item.start_date : (item.value.placeholder_start || '开始日期') }}
|
||||
{{ item.start_date ? item.start_date : (item.value.placeholder_start || $lang('form.startDate')) }}
|
||||
</view>
|
||||
</view>
|
||||
</picker>
|
||||
@@ -184,7 +184,7 @@
|
||||
>
|
||||
<view class="picker-box">
|
||||
<view :class="['uni-input', !item.end_date ? 'color-tip' : '']">
|
||||
{{ item.end_date ? item.end_date : (item.value.placeholder_end || '结束日期') }}
|
||||
{{ item.end_date ? item.end_date : (item.value.placeholder_end || $lang('form.endDate')) }}
|
||||
</view>
|
||||
</view>
|
||||
</picker>
|
||||
@@ -207,7 +207,7 @@
|
||||
@change="bindTimeChange($event, index)"
|
||||
>
|
||||
<view :class="['uni-input', !item.val ? 'color-tip' : '']">
|
||||
{{ item.val ? item.val : (item.value.placeholder || '请选择时间') }}
|
||||
{{ item.val ? item.val : (item.value.placeholder || $lang('form.selectTime')) }}
|
||||
</view>
|
||||
</picker>
|
||||
<text class="iconfont icon-right"></text>
|
||||
@@ -231,7 +231,7 @@
|
||||
>
|
||||
<view class="picker-box">
|
||||
<view :class="['uni-input', !item.start_time ? 'color-tip' : '']">
|
||||
{{ item.start_time ? item.start_time : (item.value.placeholder_start || '开始时间') }}
|
||||
{{ item.start_time ? item.start_time : (item.value.placeholder_start || $lang('form.startTime')) }}
|
||||
</view>
|
||||
</view>
|
||||
</picker>
|
||||
@@ -245,7 +245,7 @@
|
||||
>
|
||||
<view class="picker-box">
|
||||
<view :class="['uni-input', !item.end_time ? 'color-tip' : '']">
|
||||
{{ item.end_time ? item.end_time : (item.value.placeholder_end || '结束时间') }}
|
||||
{{ item.end_time ? item.end_time : (item.value.placeholder_end || $lang('form.endTime')) }}
|
||||
</view>
|
||||
</view>
|
||||
</picker>
|
||||
@@ -268,7 +268,7 @@
|
||||
@getRegions="handleGetRegions($event, index)"
|
||||
>
|
||||
<view :class="['select-address', !item.val ? 'empty' : '', !item.val ? 'color-tip' : '']">
|
||||
{{ item.val ? item.val : (item.value.placeholder || (item.value.default_type == 1 ? '请选择省市' : '请选择省市区')) }}
|
||||
{{ item.val ? item.val : (item.value.placeholder || (item.value.default_type == 1 ? $lang('form.selectProvinceCity') : $lang('form.selectProvinceCityDistrict'))) }}
|
||||
</view>
|
||||
</pick-regions>
|
||||
<text class="iconfont icon-right"></text>
|
||||
@@ -788,89 +788,89 @@ export default {
|
||||
|
||||
if (item.controller == 'Text') {
|
||||
if (item.value.required && !item.val) {
|
||||
this.$util.showToast({ title: '请输入' + item.value.title });
|
||||
this.$util.showToast({ title: this.$lang('form.inputRequired') + item.value.title });
|
||||
return false;
|
||||
}
|
||||
|
||||
if (item.name == 'ID_CARD' && !/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(item.val)) {
|
||||
if (!item.value.required) {
|
||||
this.$util.showToast({ title: '身份证输入不合法' });
|
||||
this.$util.showToast({ title: this.$lang('form.idCardInvalid') });
|
||||
return false;
|
||||
}
|
||||
if (item.val != '') {
|
||||
this.$util.showToast({ title: '身份证输入不合法' });
|
||||
this.$util.showToast({ title: this.$lang('form.idCardInvalid') });
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (item.name == 'MOBILE' && !this.$util.verifyMobile(item.val)) {
|
||||
if (!item.value.required) {
|
||||
this.$util.showToast({ title: '手机号输入不合法' });
|
||||
this.$util.showToast({ title: this.$lang('form.phoneInvalid') });
|
||||
return false;
|
||||
}
|
||||
if (item.val != '') {
|
||||
this.$util.showToast({ title: '手机号输入不合法' });
|
||||
this.$util.showToast({ title: this.$lang('form.phoneInvalid') });
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (item.controller == 'Textarea' && item.value.required && !item.val) {
|
||||
this.$util.showToast({ title: '请输入' + item.value.title });
|
||||
this.$util.showToast({ title: this.$lang('form.inputRequired') + item.value.title });
|
||||
return false;
|
||||
}
|
||||
|
||||
if (item.controller == 'Select' && item.value.required && !item.val) {
|
||||
this.$util.showToast({ title: '请选择' + item.value.title });
|
||||
this.$util.showToast({ title: this.$lang('form.selectRequired') + item.value.title });
|
||||
return false;
|
||||
}
|
||||
|
||||
if (item.controller == 'Checkbox' && item.value.required && !item.val) {
|
||||
this.$util.showToast({ title: '请至少选择一个' + item.value.title });
|
||||
this.$util.showToast({ title: this.$lang('form.selectAtLeastOne') + item.value.title });
|
||||
return false;
|
||||
}
|
||||
|
||||
if (item.controller == 'Img' && item.value.required && !item.val) {
|
||||
this.$util.showToast({ title: '请至少上传一张' + item.value.title });
|
||||
this.$util.showToast({ title: this.$lang('form.uploadAtLeastOne') + item.value.title });
|
||||
return false;
|
||||
}
|
||||
|
||||
if (item.controller == 'Date' && item.value.required && !item.val) {
|
||||
this.$util.showToast({ title: '请选择' + item.value.title });
|
||||
this.$util.showToast({ title: this.$lang('form.selectRequired') + item.value.title });
|
||||
return false;
|
||||
}
|
||||
|
||||
if (item.controller == 'Datelimit') {
|
||||
if (item.value.required && !item.val) {
|
||||
this.$util.showToast({ title: '请选择' + item.value.title });
|
||||
this.$util.showToast({ title: this.$lang('form.selectRequired') + item.value.title });
|
||||
return false;
|
||||
}
|
||||
|
||||
if (this.$util.timeTurnTimeStamp(item.start_date) > this.$util.timeTurnTimeStamp(item.end_date)) {
|
||||
this.$util.showToast({ title: '结束日期不能小于开始日期' });
|
||||
this.$util.showToast({ title: this.$lang('form.endDateBeforeStart') });
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (item.controller == 'Time' && item.value.required && !item.val) {
|
||||
this.$util.showToast({ title: '请选择' + item.value.title });
|
||||
this.$util.showToast({ title: this.$lang('form.selectRequired') + item.value.title });
|
||||
return false;
|
||||
}
|
||||
|
||||
if (item.controller == 'Timelimit') {
|
||||
if (item.value.required && !item.val) {
|
||||
this.$util.showToast({ title: '请选择' + item.value.title });
|
||||
this.$util.showToast({ title: this.$lang('form.selectRequired') + item.value.title });
|
||||
return false;
|
||||
}
|
||||
|
||||
if (item.start_time >= item.end_time) {
|
||||
this.$util.showToast({ title: '结束时间必须大于开始时间' });
|
||||
this.$util.showToast({ title: this.$lang('form.endTimeBeforeStart') });
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (item.controller == 'City' && item.value.required && !item.val) {
|
||||
this.$util.showToast({ title: '请选择' + item.value.title });
|
||||
this.$util.showToast({ title: this.$lang('form.selectRequired') + item.value.title });
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -902,7 +902,7 @@ export default {
|
||||
if (res.length > 0) {
|
||||
res.forEach(function(img) {
|
||||
if (self.formData[index].img_lists.length >= Number(self.formData[index].value.max_count)) {
|
||||
self.$util.showToast({ title: '最多上传' + self.formData[index].value.max_count + '张图片' });
|
||||
self.$util.showToast({ title: this.$lang('form.maxUploadImages') + self.formData[index].value.max_count + this.$lang('form.images') });
|
||||
return false;
|
||||
}
|
||||
self.formData[index].img_lists.push(img);
|
||||
@@ -916,7 +916,7 @@ export default {
|
||||
addImg(index) {
|
||||
let self = this;
|
||||
if (this.formData[index].img_lists.length >= Number(this.formData[index].value.max_count)) {
|
||||
this.$util.showToast({ title: '最多上传' + this.formData[index].value.max_count + '张图片' });
|
||||
this.$util.showToast({ title: this.$lang('form.maxUploadImages') + this.formData[index].value.max_count + this.$lang('form.images') });
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -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('payment.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('payment.paymentAmount') }}{{ payMoney | moneyFormat }}{{ $lang('sku.unit') }}</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('payment.balanceDeduct') }}</text>
|
||||
<view class="money">{{ $lang('payment.available') }}¥{{ 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('payment.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('payment.confirmPayment') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
@@ -158,12 +158,12 @@ export default {
|
||||
confirm() {
|
||||
if (this.payTypeList.length == 0 && this.payMoney > 0) {
|
||||
this.$util.showToast({
|
||||
title: '请选择支付方式!'
|
||||
title: this.$lang('payment.selectPaymentMethod')
|
||||
});
|
||||
return;
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '支付中...',
|
||||
title: this.$lang('payment.paying'),
|
||||
mask: true
|
||||
});
|
||||
this.$refs.choosePaymentPopup.close();
|
||||
@@ -182,7 +182,7 @@ export default {
|
||||
this.pay();
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '未获取到支付信息!'
|
||||
title: this.$lang('payment.noPaymentInfo')
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
|
||||
@@ -295,7 +295,7 @@ export default {
|
||||
},
|
||||
res => {
|
||||
this.$util.showToast({
|
||||
title: '您已取消支付'
|
||||
title: this.$lang('payment.cancelledPayment')
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.$util.redirectTo('/pages_tool/pay/result', {
|
||||
|
||||
@@ -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('appointment.selectDeliveryTime') }}</block>
|
||||
<block v-if="obj.delivery && obj.delivery.delivery_type == 'store'">{{ $lang('appointment.selectPickupTime') }}</block>
|
||||
<text class="iconfont icon-close" @click="close"></text>
|
||||
</view>
|
||||
<view class="body">
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
autoplay
|
||||
class="video-player"
|
||||
></video>
|
||||
<view v-else class="video-error">视频地址不存在</view>
|
||||
<view v-else class="video-error">{{ $lang('video.videoNotFound') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
@@ -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('payment.paymentMethod') }}</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('payment.paymentAmount') }}{{ payMoney|moneyFormat }}{{ $lang('sku.unit') }}</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('payment.balancePayment') }}</text>
|
||||
<view class="money">{{ $lang('payment.available') }}¥{{ balanceDeduct|moneyFormat }}</view>
|
||||
</view>
|
||||
<ns-switch class="balance-switch" @change="useBalance" :checked="isBalance == 1"></ns-switch>
|
||||
</view>
|
||||
@@ -29,12 +29,12 @@
|
||||
</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="empty">平台尚未配置支付方式!</view>
|
||||
<view class="empty">{{ $lang('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('payment.confirmPayment') }}</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('payment.selectPaymentMethod')
|
||||
});
|
||||
return;
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '支付中...',
|
||||
title: this.$lang('payment.paying'),
|
||||
mask: true
|
||||
});
|
||||
this.pay();
|
||||
@@ -161,7 +161,7 @@
|
||||
})
|
||||
} else {
|
||||
this.$util.showToast({
|
||||
title: '未获取到支付信息!'
|
||||
title: this.$lang('payment.noPaymentInfo')
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -294,7 +294,7 @@
|
||||
},
|
||||
res => {
|
||||
this.$util.showToast({
|
||||
title: '您已取消支付'
|
||||
title: this.$lang('payment.cancelledPayment')
|
||||
});
|
||||
this.resetpay();
|
||||
}
|
||||
|
||||
@@ -2,23 +2,23 @@
|
||||
<view>
|
||||
<view class="privacy-mask" v-if="showPop">
|
||||
<view class="privacy-wrap">
|
||||
<view class="privacy-title">用户隐私保护提示</view>
|
||||
<view class="privacy-title">{{ $lang('privacy.title') }}</view>
|
||||
<view class="privacy-desc">
|
||||
感谢您使用{{ appName }},在使用前您应当阅读并同意
|
||||
{{ $lang('privacy.thanks') }}{{ appName }},{{ $lang('privacy.beforeUse') }}
|
||||
<text class="privacy-link" @tap="openPrivacyContract">{{ privacyContractName }}</text>
|
||||
<!-- #ifdef QUICKAPP-WEBVIEW || H5 -->
|
||||
<text class="privacy-link" @tap="openPrivacyService">{{ privacyServiceName }}</text>
|
||||
<!-- #endif -->
|
||||
,当点击同意并继续时,即表示您已理解并同意该条款内容,该条款将对您产生法律约束力;如您不同意,将无法继续使用{{ appName }}相关功能。
|
||||
{{ $lang('privacy.agreeTip') }}{{ appName }}{{ $lang('privacy.functionTip') }}
|
||||
</view>
|
||||
<view class="privacy-button-flex">
|
||||
<button class="privacy-button-btn bg-disagree" @tap="handleDisagree">不同意</button>
|
||||
<button class="privacy-button-btn bg-disagree" @tap="handleDisagree">{{ $lang('privacy.disagree') }}</button>
|
||||
<!-- #ifdef QUICKAPP-WEBVIEW || MP-WEIXIN -->
|
||||
<button id="agree-btn" class="privacy-button-btn bg-agree" open-type="agreePrivacyAuthorization"
|
||||
@agreeprivacyauthorization="handleAgree">同意并继续</button>
|
||||
@agreeprivacyauthorization="handleAgree">{{ $lang('privacy.agreeAndContinue') }}</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef WEB || H5 -->
|
||||
<button id="agree-btn" class="privacy-button-btn bg-agree" @tap="handleAgree" @click="handleAgree">同意并继续</button>
|
||||
<button id="agree-btn" class="privacy-button-btn bg-agree" @tap="handleAgree" @click="handleAgree">{{ $lang('privacy.agreeAndContinue') }}</button>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -11,59 +11,59 @@
|
||||
<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('reward.pointReward') }}</view>
|
||||
<view class="content">
|
||||
<view class="info">
|
||||
<view>
|
||||
<text class="num">{{ reward.point }}</text>
|
||||
<text class="type">积分</text>
|
||||
<text class="type">{{ $lang('reward.point') }}</text>
|
||||
</view>
|
||||
<view class="desc">用于下单时抵现或兑换商品等</view>
|
||||
<view class="desc">{{ $lang('reward.pointDesc') }}</view>
|
||||
</view>
|
||||
<view class="tip" @click="closeRewardPopup('point')">立即查看</view>
|
||||
<view class="tip" @click="closeRewardPopup('point')">{{ $lang('reward.viewNow') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="reward-item" v-if="reward.growth > 0">
|
||||
<view class="head">成长值</view>
|
||||
<view class="head">{{ $lang('reward.growthReward') }}</view>
|
||||
<view class="content">
|
||||
<view class="info">
|
||||
<view>
|
||||
<text class="num">{{ reward.growth }}</text>
|
||||
<text class="type">成长值</text>
|
||||
<text class="type">{{ $lang('reward.growth') }}</text>
|
||||
</view>
|
||||
<view class="desc">用于提升会员等级</view>
|
||||
<view class="desc">{{ $lang('reward.growthDesc') }}</view>
|
||||
</view>
|
||||
<view class="tip" @click="closeRewardPopup('growth')">立即查看</view>
|
||||
<view class="tip" @click="closeRewardPopup('growth')">{{ $lang('reward.viewNow') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="reward-item" v-if="reward.balance > 0">
|
||||
<view class="head">红包奖励</view>
|
||||
<view class="head">{{ $lang('reward.hongbaoReward') }}</view>
|
||||
<view class="content">
|
||||
<view class="info">
|
||||
<view>
|
||||
<text class="num">{{ reward.balance }}</text>
|
||||
<text class="type">元</text>
|
||||
<text class="type">{{ $lang('reward.yuan') }}</text>
|
||||
</view>
|
||||
<view class="desc">不可提现下单时可用</view>
|
||||
<view class="desc">{{ $lang('reward.hongbaoDesc') }}</view>
|
||||
</view>
|
||||
<view class="tip" @click="closeRewardPopup('balance')">立即查看</view>
|
||||
<view class="tip" @click="closeRewardPopup('balance')">{{ $lang('reward.viewNow') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="reward-item" v-if="reward.coupon_list.length > 0">
|
||||
<view class="head">优惠券奖励</view>
|
||||
<view class="head">{{ $lang('reward.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 }}
|
||||
{{ $lang('reward.full') }}{{ item.at_least }}{{ item.type == 'discount' ? $lang('reward.discount') + item.discount + $lang('reward.zhe') : $lang('reward.minus') + item.money }}
|
||||
</view>
|
||||
<view class="desc" v-else>
|
||||
无门槛,{{ item.type == 'discount' ? '打' + item.discount + '折' : '减' + item.money }}
|
||||
{{ $lang('reward.noThreshold') }},{{ item.type == 'discount' ? $lang('reward.discount') + item.discount + $lang('reward.zhe') : $lang('reward.minus') + item.money }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="tip" @click="closeRewardPopup('coupon')">立即查看</view>
|
||||
<view class="tip" @click="closeRewardPopup('coupon')">{{ $lang('reward.viewNow') }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
<uni-popup ref="confirmPopup" type="center">
|
||||
<view class="confirm-popup">
|
||||
<view class="popup-header">
|
||||
<text>添加企业微信客服</text>
|
||||
<text>{{ $lang('chat.addEnterpriseWeChat') }}</text>
|
||||
</view>
|
||||
<view class="popup-body">
|
||||
<text>点击确定后将跳转至企业微信,添加专业客服为您服务</text>
|
||||
<text>{{ $lang('chat.confirmAddWeChatTip') }}</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('chat.cancel') }}</button>
|
||||
<button class="confirm-btn" @click="confirmAdd">{{ $lang('chat.confirm') }}</button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
Reference in New Issue
Block a user