feat: 新增多语言文案与组件国际化适配
本次提交完成了大量多语言相关的新增与优化工作: 1. 新增充值、案例、会员资产、订单等页面的中文/英文翻译文案 2. 新增企业微信客服、时间选择、支付弹窗等组件的多语言包 3. 优化工具函数与自定义页面的多语言适配,替换硬编码提示文案 4. 新增会员等级规则、积分商品、退款管理等页面的国际化支持 5. 修复企业微信JS-SDK的错误提示文案硬编码问题
This commit is contained in:
@@ -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 != '') {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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'
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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
|
||||
});
|
||||
|
||||
@@ -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
|
||||
});
|
||||
|
||||
@@ -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
|
||||
});
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user