refactor: 将页面硬编码文本替换为国际化语言包

统一替换积分商城、分销页面的硬编码字符串为多语言key,包括订单状态、按钮文案、提示信息等,提升项目多语言适配能力
This commit is contained in:
2026-06-22 15:09:19 +08:00
parent d6633b698a
commit a7541d0598
6 changed files with 163 additions and 164 deletions

View File

@@ -211,8 +211,8 @@
<ns-copyright></ns-copyright> <ns-copyright></ns-copyright>
<view class="empty" v-if="!info.fenxiao_id > 0 && showEmpty"> <view class="empty" v-if="!info.fenxiao_id > 0 && showEmpty">
<image :src="$util.img('public/uniapp/fenxiao/index/no-fenxiao.png')" mode="widthFix" show-menu-by-longpress></image> <image :src="$util.img('public/uniapp/fenxiao/index/no-fenxiao.png')" mode="widthFix" show-menu-by-longpress></image>
<text>您还不是{{ fenxiaoWords.fenxiao_name }},请先提交申请</text> <text>{{ $lang('fenxiao.notFenxiao', { fenxiao_name: fenxiaoWords.fenxiao_name }) }},{{ $lang('fenxiao.applyNow') }}</text>
<view @click="$util.redirectTo('/pages_promotion/fenxiao/apply')" class="color-base-bg">立即加入</view> <view @click="$util.redirectTo('/pages_promotion/fenxiao/apply')" class="color-base-bg">{{ $lang('fenxiao.joinNow') }}</view>
</view> </view>
<loading-cover ref="loadingCover"></loading-cover> <loading-cover ref="loadingCover"></loading-cover>
<ns-login ref="login"></ns-login> <ns-login ref="login"></ns-login>
@@ -220,7 +220,7 @@
<uni-popup ref="taskPopup" type="bottom"> <uni-popup ref="taskPopup" type="bottom">
<view class="task-popup popup-layer" v-if="levelInfo"> <view class="task-popup popup-layer" v-if="levelInfo">
<view class="head-wrap"> <view class="head-wrap">
<text>快速升级技巧</text> <text>{{ $lang('fenxiao.quickUpgradeTip') }}</text>
<text class="iconfont icon-close" @click="$refs.taskPopup.close()"></text> <text class="iconfont icon-close" @click="$refs.taskPopup.close()"></text>
</view> </view>
<view class="body-wrap"> <view class="body-wrap">
@@ -228,7 +228,7 @@
<text class="subordinate-consumption"> <text class="subordinate-consumption">
{{ item.title }} {{ item.title }}
<text class="iconfont icon-wenhao" @click="openTips(item)"></text> <text class="iconfont icon-wenhao" @click="openTips(item)"></text>
<text class="incomplete">{{ item.progress == 100 ? '已完成' : '未完成' }}</text> <text class="incomplete">{{ item.progress == 100 ? $lang('fenxiao.completed') : $lang('fenxiao.incomplete') }}</text>
</text> </text>
<view class="circle"> <view class="circle">
<progress :percent="item.progress" activeColor="#E7B667" stroke-width="4" /> <progress :percent="item.progress" activeColor="#E7B667" stroke-width="4" />
@@ -236,7 +236,7 @@
<text class="zero">{{ item.value }}</text> <text class="zero">{{ item.value }}</text>
<text>/{{ item.condition }}</text> <text>/{{ item.condition }}</text>
<text class="to-complete-box" @click="$util.redirectTo('/pages_promotion/fenxiao/promote')"> <text class="to-complete-box" @click="$util.redirectTo('/pages_promotion/fenxiao/promote')">
<text class="to-complete">{{ item.progress == 100 ? '已完成' : '去完成' }}</text> <text class="to-complete">{{ item.progress == 100 ? $lang('fenxiao.completed') : $lang('fenxiao.toComplete') }}</text>
</text> </text>
</view> </view>
</view> </view>
@@ -246,12 +246,12 @@
<uni-popup type="bottom" ref="tips"> <uni-popup type="bottom" ref="tips">
<view class="popup"> <view class="popup">
<view class="popup-header"> <view class="popup-header">
<text class="tit">提示</text> <text class="tit">{{ $lang('fenxiao.hint') }}</text>
<text class="iconfont icon-close" @click="$refs.tips.close()"></text> <text class="iconfont icon-close" @click="$refs.tips.close()"></text>
</view> </view>
<view class="popup-body"> <view class="popup-body">
<view>{{ tips }}</view> <view>{{ tips }}</view>
<view v-if="levelInfo">{{ levelInfo.upgrade_type == 1 ? '满足任意一条件即可升级' : '满足全部条件才能进行升级' }}</view> <view v-if="levelInfo">{{ levelInfo.upgrade_type == 1 ? $lang('fenxiao.upgradeConditionAny') : $lang('fenxiao.upgradeConditionAll') }}</view>
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
@@ -307,7 +307,7 @@ export default {
setTimeout(() => { setTimeout(() => {
if (!this.addonIsExist.fenxiao) { if (!this.addonIsExist.fenxiao) {
this.$util.showToast({ this.$util.showToast({
title: '商家未开启分销', title: this.$lang('fenxiao.merchantNotOpenFenxiao'),
mask: true, mask: true,
duration: 2000 duration: 2000
}); });
@@ -348,7 +348,7 @@ export default {
this.getFenxiaoDetail(); this.getFenxiaoDetail();
} else { } else {
this.$util.showToast({ this.$util.showToast({
title: '商家未开启分销', title: this.$lang('fenxiao.merchantNotOpenFenxiao'),
mask: true, mask: true,
duration: 2000 duration: 2000
}); });
@@ -368,7 +368,7 @@ export default {
if (res.data) { if (res.data) {
if (res.data.status == -1) { if (res.data.status == -1) {
this.$util.showToast({ this.$util.showToast({
title: '当前分销商已冻结' title: this.$lang('fenxiao.fenxiaoFrozen')
}); });
setTimeout(() => { setTimeout(() => {
this.$util.redirectTo(this.$util.MEMBER_PAGE_URL); this.$util.redirectTo(this.$util.MEMBER_PAGE_URL);
@@ -480,9 +480,9 @@ export default {
if (level.one_fenxiao_order_num > 0) { if (level.one_fenxiao_order_num > 0) {
let task = { let task = {
title: '下级消费', title: this.$lang('fenxiao.subordinateConsume'),
desc: '下级消费单数满' + level.one_fenxiao_order_num + '单', desc: this.$lang('fenxiao.subordinateConsumeCount') + level.one_fenxiao_order_num + this.$lang('fenxiao.orders'),
tips: '分销商自己购买和自己推荐的直属会员购买的订单次数', tips: this.$lang('fenxiao.subordinateConsumeCountTip'),
condition: level.one_fenxiao_order_num, condition: level.one_fenxiao_order_num,
value: this.info.one_fenxiao_order_num, value: this.info.one_fenxiao_order_num,
progress: parseFloat(this.info.one_fenxiao_order_num) > parseFloat(level.one_fenxiao_order_num) ? progress: parseFloat(this.info.one_fenxiao_order_num) > parseFloat(level.one_fenxiao_order_num) ?
@@ -494,9 +494,9 @@ export default {
} }
if (level.one_fenxiao_total_order > 0) { if (level.one_fenxiao_total_order > 0) {
let task = { let task = {
title: '下级消费', title: this.$lang('fenxiao.subordinateConsume'),
desc: '下级消费金额满' + this.moneyFormat(level.one_fenxiao_total_order) + '元', desc: this.$lang('fenxiao.subordinateConsumeMoney') + this.moneyFormat(level.one_fenxiao_total_order) + this.$lang('fenxiao.yuan'),
tips: '分销商自己购买和推荐的直属会员购买的订单的总额', tips: this.$lang('fenxiao.subordinateConsumeMoneyTip'),
condition: this.moneyFormat(level.one_fenxiao_total_order), condition: this.moneyFormat(level.one_fenxiao_total_order),
value: this.info.one_fenxiao_total_order, value: this.info.one_fenxiao_total_order,
progress: parseFloat(this.info.one_fenxiao_total_order) > parseFloat(level.one_fenxiao_total_order) ? progress: parseFloat(this.info.one_fenxiao_total_order) > parseFloat(level.one_fenxiao_total_order) ?
@@ -508,10 +508,10 @@ export default {
} }
if (level.one_fenxiao_order_money > 0) { if (level.one_fenxiao_order_money > 0) {
let task = { let task = {
title: '下级消费', title: this.$lang('fenxiao.subordinateConsume'),
desc: '下级消费产生' + this.fenxiaoWords.account + '总额满' + this.moneyFormat(level desc: this.$lang('fenxiao.subordinateConsumeCommission', { account: this.fenxiaoWords.account }) + this.moneyFormat(level
.one_fenxiao_order_money) + '元', .one_fenxiao_order_money) + this.$lang('fenxiao.yuan'),
tips: '分销商自己购买和自己推荐的直属会员购买的订单' + this.fenxiaoWords.account + '总额', tips: this.$lang('fenxiao.subordinateConsumeCommissionTip', { account: this.fenxiaoWords.account }),
condition: this.moneyFormat(level.one_fenxiao_order_money), condition: this.moneyFormat(level.one_fenxiao_order_money),
value: this.info.one_fenxiao_order_money, value: this.info.one_fenxiao_order_money,
progress: parseFloat(this.info.one_fenxiao_order_money) > parseFloat(level.one_fenxiao_order_money) ? progress: parseFloat(this.info.one_fenxiao_order_money) > parseFloat(level.one_fenxiao_order_money) ?
@@ -523,9 +523,9 @@ export default {
} }
if (level.order_num > 0) { if (level.order_num > 0) {
let task = { let task = {
title: '自身消费', title: this.$lang('fenxiao.selfConsume'),
desc: '自身消费单数满' + level.order_num + '单', desc: this.$lang('fenxiao.selfConsumeCount') + level.order_num + this.$lang('fenxiao.orders'),
tips: '分销商自己购买的订单次数', tips: this.$lang('fenxiao.selfConsumeCountTip'),
condition: level.order_num, condition: level.order_num,
value: this.info.order_num, value: this.info.order_num,
progress: parseFloat(this.info.order_num) > parseFloat(level.order_num) ? 100 : ((parseFloat(this.info.order_num) / parseFloat(level.order_num)) * 100).toFixed(2) progress: parseFloat(this.info.order_num) > parseFloat(level.order_num) ? 100 : ((parseFloat(this.info.order_num) / parseFloat(level.order_num)) * 100).toFixed(2)
@@ -535,9 +535,9 @@ export default {
} }
if (level.order_money > 0) { if (level.order_money > 0) {
let task = { let task = {
title: '自身消费', title: this.$lang('fenxiao.selfConsume'),
desc: '自身消费金额满' + this.moneyFormat(level.order_money) + '元', desc: this.$lang('fenxiao.selfConsumeMoney') + this.moneyFormat(level.order_money) + this.$lang('fenxiao.yuan'),
tips: '分销商自己购买的订单总额', tips: this.$lang('fenxiao.selfConsumeMoneyTip'),
condition: this.moneyFormat(level.order_money), condition: this.moneyFormat(level.order_money),
value: this.info.order_money, value: this.info.order_money,
progress: parseFloat(this.info.order_money) > parseFloat(level.order_money) ? progress: parseFloat(this.info.order_money) > parseFloat(level.order_money) ?
@@ -549,9 +549,9 @@ export default {
} }
if (level.one_child_num > 0) { if (level.one_child_num > 0) {
let task = { let task = {
title: '邀请好友', title: this.$lang('fenxiao.inviteFriend'),
desc: '邀请好友人数达到' + level.one_child_num + '人', desc: this.$lang('fenxiao.inviteFriendCount') + level.one_child_num + this.$lang('fenxiao.people'),
tips: '分销商的直属下级会员人数(包含已经申请成为分销商的)', tips: this.$lang('fenxiao.inviteFriendTip'),
condition: level.one_child_num, condition: level.one_child_num,
value: this.info.one_child_num, value: this.info.one_child_num,
progress: parseFloat(this.info.one_child_num) > parseFloat(level.one_child_num) ? progress: parseFloat(this.info.one_child_num) > parseFloat(level.one_child_num) ?
@@ -563,9 +563,9 @@ export default {
} }
if (level.one_child_fenxiao_num > 0) { if (level.one_child_fenxiao_num > 0) {
let task = { let task = {
title: '邀请好友', title: this.$lang('fenxiao.inviteFriend'),
desc: '邀请好友成为分销商人数达到' + level.one_child_fenxiao_num + '人', desc: this.$lang('fenxiao.inviteFenxiaoCount') + level.one_child_fenxiao_num + this.$lang('fenxiao.people'),
tips: '分销商的直属下级分销商人数', tips: this.$lang('fenxiao.inviteFenxiaoTip'),
condition: level.one_child_fenxiao_num, condition: level.one_child_fenxiao_num,
value: this.info.one_child_fenxiao_num, value: this.info.one_child_fenxiao_num,
progress: parseFloat(this.info.one_child_fenxiao_num) > parseFloat(level.one_child_fenxiao_num) ? progress: parseFloat(this.info.one_child_fenxiao_num) > parseFloat(level.one_child_fenxiao_num) ?

View File

@@ -35,7 +35,7 @@
</view> </view>
<view class="group-wrap padding-top"> <view class="group-wrap padding-top">
<view class="goods-module-wrap"> <view class="goods-module-wrap">
<text class="price-symbol ">{{ pointInfo.point }}积分</text> <text class="price-symbol ">{{ pointInfo.point }}{{ $lang('point.point') }}</text>
<template v-if="pointInfo.exchange_price != '0.00' && pointInfo.pay_type > 0"> <template v-if="pointInfo.exchange_price != '0.00' && pointInfo.pay_type > 0">
<text class="price-symbol ">+{{ $lang('common.currencySymbol') }}{{ pointInfo.exchange_price <text class="price-symbol ">+{{ $lang('common.currencySymbol') }}{{ pointInfo.exchange_price
}}</text> }}</text>
@@ -48,10 +48,10 @@
<view class="follow-and-share" <view class="follow-and-share"
v-if="pointInfo.stock_show == 1 || pointInfo.stock_show == undefined"> v-if="pointInfo.stock_show == 1 || pointInfo.stock_show == undefined">
<text class="color-tip" v-if="pointInfo.pointCoupon != 1">库存:{{ pointInfo.stock }}{{ <text class="color-tip" v-if="pointInfo.pointCoupon != 1">{{ $lang('point.stockLabel') }}:{{ pointInfo.stock }}{{
pointInfo.stock >= 0 ? pointInfo.stock >= 0 ?
pointInfo.unit : '' }}</text> pointInfo.unit : '' }}</text>
<text class="color-tip" v-else>库存:无限{{ pointInfo.stock >= 0 ? pointInfo.unit : '' }}</text> <text class="color-tip" v-else>{{ $lang('point.stockLabel') }}:{{ $lang('point.unlimitedStock') }}{{ pointInfo.stock >= 0 ? pointInfo.unit : '' }}</text>
</view> </view>
</view> </view>
<view class="goods-module-wrap info"> <view class="goods-module-wrap info">
@@ -61,21 +61,21 @@
<text class="sku-name-wrap" v-else>{{ pointInfo.name }}</text> <text class="sku-name-wrap" v-else>{{ pointInfo.name }}</text>
</view> </view>
<view class="coupon-desc"> <view class="coupon-desc">
<view v-if="pointInfo.balance && pointInfo.balance > 0" class="color-tip">内含{{ pointInfo.balance <view v-if="pointInfo.balance && pointInfo.balance > 0" class="color-tip">{{ $lang('point.contains') }}{{ pointInfo.balance
}}元</view> }}{{ $lang('common.yuan') }}</view>
<view v-if="pointInfo.coupon_type == 'random'" class="color-tip">无门槛优惠券</view> <view v-if="pointInfo.coupon_type == 'random'" class="color-tip">{{ $lang('point.noThresholdCoupon') }}</view>
<view v-if="pointInfo.coupon_type == 'reward'" class="color-tip">{{ '满' + pointInfo.at_least + <view v-if="pointInfo.coupon_type == 'reward'" class="color-tip">{{ $lang('form.full') + pointInfo.at_least +
'减' + pointInfo.money $lang('common.yuan') + $lang('order.fullReduceDesc', { limit: pointInfo.at_least, type: '', money: pointInfo.money })
}}</view> }}</view>
<view v-if="pointInfo.coupon_type == 'discount'" class="color-tip"> <view v-if="pointInfo.coupon_type == 'discount'" class="color-tip">
满{{ pointInfo.at_least }}元 {{ $lang('form.full') }}{{ pointInfo.at_least }}{{ $lang('common.yuan') }}
<text>{{ pointInfo.discount }}折</text> <text>{{ pointInfo.discount }}{{ $lang('common.discount') }}</text>
</view> </view>
<view v-if="pointInfo.coupon_type == 'discount'" class="color-tip">最多优惠{{ <view v-if="pointInfo.coupon_type == 'discount'" class="color-tip">{{ $lang('point.maxDiscount') }}{{
pointInfo.discount_limit }}元</view> pointInfo.discount_limit }}{{ $lang('common.yuan') }}</view>
<view class="time color-tip" v-if="pointInfo.coupon_type"> <view class="time color-tip" v-if="pointInfo.coupon_type">
{{ pointInfo.validity_type == 1 ? '领取之日起' + pointInfo.fixed_term + '天内有效' : {{ pointInfo.validity_type == 1 ? $lang('point.fromReceive') + pointInfo.fixed_term + $lang('point.daysValid') :
$util.timeStampTurnTime(pointInfo.end_time) + '到期' }} $util.timeStampTurnTime(pointInfo.end_time) + $lang('point.expireAt') }}
</view> </view>
</view> </view>
</view> </view>
@@ -88,7 +88,7 @@
<view class="community-txt">{{ pointInfo.qr_data.community_describe }}</view> <view class="community-txt">{{ pointInfo.qr_data.community_describe }}</view>
</view> </view>
</view> </view>
<view class="community-btn" @click="onCommunity()">添加</view> <view class="community-btn" @click="onCommunity()">{{ $lang('point.add') }}</view>
</view> </view>
<!-- 促销 --> <!-- 促销 -->
@@ -96,7 +96,7 @@
v-show="isCommunity"> v-show="isCommunity">
<view class="community-model-content" @click.stop> <view class="community-model-content" @click.stop>
<view class="community-model-content-radius"> <view class="community-model-content-radius">
<view>添加社群</view> <view>{{ $lang('point.add') }}{{ $lang('point.community') }}</view>
</view> </view>
<view class="community-model-content-draw" v-if="pointInfo.qr_data && pointInfo.qr_data.qr_img"> <view class="community-model-content-draw" v-if="pointInfo.qr_data && pointInfo.qr_data.qr_img">
<image :src="pointInfo.qr_data.qr_img != '' && pointInfo.qr_data.qr_state == 1 <image :src="pointInfo.qr_data.qr_img != '' && pointInfo.qr_data.qr_state == 1
@@ -104,7 +104,7 @@
: $util.img('public/uniapp/goods/detail_erweiImage.png') : $util.img('public/uniapp/goods/detail_erweiImage.png')
" mode="aspectFill" show-menu-by-longpress /> " mode="aspectFill" show-menu-by-longpress />
</view> </view>
<view class="community-model-content-text">长按识别二维码,添加社群</view> <view class="community-model-content-text">{{ $lang('point.longPressQrCode') }}</view>
</view> </view>
<view class="community-model-close" @click.stop="onCloseCommunity()"><text <view class="community-model-close" @click.stop="onCloseCommunity()"><text
class="iconfont icon-close"></text> class="iconfont icon-close"></text>
@@ -115,7 +115,7 @@
<view class="newdetail margin-bottom"> <view class="newdetail margin-bottom">
<!-- 已选规格 --> <!-- 已选规格 -->
<view class="item selected-sku-spec" v-if="pointInfo.sku_spec_format" @click="exchange"> <view class="item selected-sku-spec" v-if="pointInfo.sku_spec_format" @click="exchange">
<view class="label">选择</view> <view class="label">{{ $lang('point.select') }}</view>
<view class="box"> <view class="box">
<text v-for="(item, index) in pointInfo.sku_spec_format" :key="index">{{ item.spec_name <text v-for="(item, index) in pointInfo.sku_spec_format" :key="index">{{ item.spec_name
}}/{{ }}/{{
@@ -126,7 +126,7 @@
<view class="item goods-attribute" @click="openAttributePopup()" <view class="item goods-attribute" @click="openAttributePopup()"
v-if="pointInfo.goods_attr_format && pointInfo.goods_attr_format.length > 0"> v-if="pointInfo.goods_attr_format && pointInfo.goods_attr_format.length > 0">
<view class="label">属性</view> <view class="label">{{ $lang('point.attribute') }}</view>
<view class="box"> <view class="box">
<text v-for="(item, index) in pointInfo.goods_attr_format" :key="index" <text v-for="(item, index) in pointInfo.goods_attr_format" :key="index"
v-if="index < 2">{{ v-if="index < 2">{{
@@ -141,7 +141,7 @@
<uni-popup ref="attributePopup" type="bottom"> <uni-popup ref="attributePopup" type="bottom">
<view class="goods-attribute-popup-layer popup-layer"> <view class="goods-attribute-popup-layer popup-layer">
<view class="head-wrap" @click="closeAttributePopup()"> <view class="head-wrap" @click="closeAttributePopup()">
<text>商品属性</text> <text>{{ $lang('point.goodsAttribute') }}</text>
<text class="iconfont icon-close"></text> <text class="iconfont icon-close"></text>
</view> </view>
<scroll-view scroll-y class="goods-attribute-body"> <scroll-view scroll-y class="goods-attribute-body">
@@ -152,7 +152,7 @@
</view> </view>
</scroll-view> </scroll-view>
<view class="button-box"><button type="primary" <view class="button-box"><button type="primary"
@click="closeAttributePopup()">确定</button></view> @click="closeAttributePopup()">{{ $lang('point.confirm') }}</button></view>
</view> </view>
</uni-popup> </uni-popup>
</view> </view>
@@ -161,7 +161,7 @@
<uni-popup ref="merchantsServicePopup" type="bottom"> <uni-popup ref="merchantsServicePopup" type="bottom">
<view class="goods-merchants-service-popup-layer popup-layer"> <view class="goods-merchants-service-popup-layer popup-layer">
<view class="head-wrap" @click="closeMerchantsServicePopup()"> <view class="head-wrap" @click="closeMerchantsServicePopup()">
<text>商品服务</text> <text>{{ $lang('point.goodsService') }}</text>
<text class="iconfont icon-close"></text> <text class="iconfont icon-close"></text>
</view> </view>
<scroll-view scroll-y> <scroll-view scroll-y>
@@ -175,7 +175,7 @@
</view> </view>
</scroll-view> </scroll-view>
<view class="button-box"><button type="primary" <view class="button-box"><button type="primary"
@click="closeMerchantsServicePopup()">确定</button></view> @click="closeMerchantsServicePopup()">{{ $lang('point.confirm') }}</button></view>
</view> </view>
</uni-popup> </uni-popup>
</view> </view>
@@ -184,7 +184,7 @@
<!-- 详情 --> <!-- 详情 -->
<view class="goods-detail-tab"> <view class="goods-detail-tab">
<view class="detail-tab"> <view class="detail-tab">
<view class="tab-item">兑换详情</view> <view class="tab-item">{{ $lang('point.exchangeDetail') }}</view>
</view> </view>
<view class="detail-content"> <view class="detail-content">
@@ -192,7 +192,7 @@
<view class="goods-details" v-if="pointInfo.content"><rich-text <view class="goods-details" v-if="pointInfo.content"><rich-text
:nodes="pointInfo.content"></rich-text> :nodes="pointInfo.content"></rich-text>
</view> </view>
<view class="goods-details active" v-else>暂无兑换详情!</view> <view class="goods-details active" v-else>{{ $lang('point.noExchangeDetail') }}</view>
</view> </view>
</view> </view>
</view> </view>
@@ -205,14 +205,14 @@
</view> </view>
<view class="detail-swap" @click="exchange()" :class="{ 'position-bottom': isIphoneX }" v-if="!isLogin"><button <view class="detail-swap" @click="exchange()" :class="{ 'position-bottom': isIphoneX }" v-if="!isLogin"><button
type="primary">登录之后方可兑换</button></view> type="primary">{{ $lang('point.loginToExchange') }}</button></view>
<block v-else> <block v-else>
<view class="detail-swap" :class="{ 'position-bottom': isIphoneX }" v-if="pointInfo.stock == 0"><button <view class="detail-swap" :class="{ 'position-bottom': isIphoneX }" v-if="pointInfo.stock == 0"><button
disabled>库存不足</button></view> disabled>{{ $lang('point.insufficientStock') }}</button></view>
<view class="detail-swap" :class="{ 'position-bottom': isIphoneX }" v-else-if="enough"><button <view class="detail-swap" :class="{ 'position-bottom': isIphoneX }" v-else-if="enough"><button
disabled>积分不足</button></view> disabled>{{ $lang('point.insufficientPoint') }}</button></view>
<view class="detail-swap" @click="exchange()" :class="{ 'position-bottom': isIphoneX }" v-else><button <view class="detail-swap" @click="exchange()" :class="{ 'position-bottom': isIphoneX }" v-else><button
type="primary" hover-class="none">兑换</button></view> type="primary" hover-class="none">{{ $lang('point.exchange') }}</button></view>
</block> </block>
<loading-cover ref="loadingCover"></loading-cover> <loading-cover ref="loadingCover"></loading-cover>

View File

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

View File

@@ -16,10 +16,10 @@
<view class="order-item" v-for="(orderItem, orderIndex) in orderList" :key="orderIndex" <view class="order-item" v-for="(orderItem, orderIndex) in orderList" :key="orderIndex"
@click="detail(orderItem)"> @click="detail(orderItem)">
<view class="order-header"> <view class="order-header">
<text class="order-no">订单号:{{ orderItem.order_no }}</text> <text class="order-no">{{ $lang('point.orderNo') }}:{{ orderItem.order_no }}</text>
<text class="status-name"> <text class="status-name">
{{ orderItem.order_status == 0 ? '待支付' : orderItem.order_status == 1 ? '已完成' : {{ orderItem.order_status == 0 ? $lang('point.waitPay') : orderItem.order_status == 1 ? $lang('order.completed') :
orderItem.order_status == -1 ? '已关闭' : '' }} orderItem.order_status == -1 ? $lang('order.closed') : '' }}
</text> </text>
</view> </view>
<view class="order-body"> <view class="order-body">
@@ -46,7 +46,7 @@
<view class="goods-sub-section"> <view class="goods-sub-section">
<text class="goods-price"> <text class="goods-price">
<text class="price-style large">{{ orderItem.point }}</text> <text class="price-style large">{{ orderItem.point }}</text>
<text class="unit price-style small">积分</text> <text class="unit price-style small">{{ $lang('point.point') }}</text>
<block v-if="orderItem.price > 0"> <block v-if="orderItem.price > 0">
+ +
<text class="unit price-style small">{{ <text class="unit price-style small">{{
@@ -69,20 +69,20 @@
<view class="order-footer"> <view class="order-footer">
<view class="order-action" v-if="orderItem.order_status == 0 && orderItem.type == 1"> <view class="order-action" v-if="orderItem.order_status == 0 && orderItem.type == 1">
<view class="order-box-btn font-size-tag" <view class="order-box-btn font-size-tag"
@click.stop="orderClose(orderItem.order_id, orderIndex)">关闭</view> @click.stop="orderClose(orderItem.order_id, orderIndex)">{{ $lang('point.close') }}</view>
<view class="order-box-btn color-base-bg color-base-border" <view class="order-box-btn color-base-bg color-base-border"
@click.stop="openChoosePayment(orderItem.out_trade_no, orderItem.price)">支付</view> @click.stop="openChoosePayment(orderItem.out_trade_no, orderItem.price)">{{ $lang('point.pay') }}</view>
</view> </view>
<view class="order-action" v-else> <view class="order-action" v-else>
<view class="order-box-btn font-size-tag">查看详情</view> <view class="order-box-btn font-size-tag">{{ $lang('point.viewDetail') }}</view>
</view> </view>
</view> </view>
</view> </view>
</block> </block>
<block v-if="showEmpty && !orderList.length"> <block v-if="showEmpty && !orderList.length">
<view class="cart-empty"> <view class="cart-empty">
<ns-empty :isIndex="true" :emptyBtn="{ url: '/pages_promotion/point/list', text: '去逛逛' }" <ns-empty :isIndex="true" :emptyBtn="{ url: '/pages_promotion/point/list', text: $lang('point.goShopping') }"
text="暂无积分兑换订单"></ns-empty> :text="$lang('point.noPointOrder')"></ns-empty>
</view> </view>
</block> </block>
</block> </block>
@@ -104,9 +104,9 @@ export default {
outTradeNo: '', outTradeNo: '',
payMoney: 0, payMoney: 0,
statusList: [ statusList: [
{ status: 'all', id: 'all', name: '全部' }, { status: 'all', id: 'all', name: this.$lang('order.all') },
{ status: 0, id: 'pay', name: '待支付' }, { status: 0, id: 'pay', name: this.$lang('point.waitPay') },
{ status: 1, id: 'complete', name: '已完成' }, { status: 1, id: 'complete', name: this.$lang('order.completed') },
], ],
orderStatus: 'all', orderStatus: 'all',
}; };
@@ -115,7 +115,7 @@ export default {
setTimeout(() => { setTimeout(() => {
if (!this.addonIsExist.pointexchange) { if (!this.addonIsExist.pointexchange) {
this.$util.showToast({ this.$util.showToast({
title: '商家未开启积分商城', title: this.$lang('point.notOpenPointMall'),
mask: true, mask: true,
duration: 2000 duration: 2000
}); });
@@ -182,8 +182,8 @@ export default {
}, },
orderClose(order_id, index) { orderClose(order_id, index) {
uni.showModal({ uni.showModal({
title: '提示', title: this.$lang('common.reminder'),
content: '确定关闭此次兑换?', content: this.$lang('point.confirmClose'),
success: res => { success: res => {
if (res.confirm) { if (res.confirm) {
this.$api.sendRequest({ this.$api.sendRequest({
@@ -195,7 +195,7 @@ export default {
if (res.code >= 0) { if (res.code >= 0) {
this.orderList[index].order_status = -1; this.orderList[index].order_status = -1;
this.$util.showToast({ this.$util.showToast({
title: '关闭成功' title: this.$lang('point.closeSuccess')
}); });
this.$forceUpdate(); this.$forceUpdate();
} }

View File

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

View File

@@ -92,7 +92,7 @@ export default {
uni.removeStorageSync("pay_flag"); uni.removeStorageSync("pay_flag");
} else { } else {
this.$util.showToast({ this.$util.showToast({
title: '未获取到创建订单所需数据!' title: this.$lang('point.notGetData')
}); });
setTimeout(() => { setTimeout(() => {
this.$util.redirectTo(this.$util.INDEX_PAGE_URL); this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
@@ -119,7 +119,7 @@ export default {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
} else { } else {
this.$util.showToast({ this.$util.showToast({
title: '未获取到创建订单所需数据!' title: this.$lang('point.notGetData')
}); });
setTimeout(() => { setTimeout(() => {
this.$util.redirectTo(this.$util.INDEX_PAGE_URL); this.$util.redirectTo(this.$util.INDEX_PAGE_URL);
@@ -280,9 +280,9 @@ export default {
this.isSub = false; this.isSub = false;
if (res.data.error_code == 10 || res.data.error_code == 12) { if (res.data.error_code == 10 || res.data.error_code == 12) {
uni.showModal({ uni.showModal({
title: '订单未创建', title: this.$lang('common.tip'),
content: res.message, content: res.message,
confirmText: '去设置', confirmText: this.$lang('member.toSet'),
success: res => { success: res => {
if (res.confirm) { if (res.confirm) {
this.selectAddress(); this.selectAddress();
@@ -309,13 +309,13 @@ export default {
if (this.orderPaymentData.is_virtual == 1) { if (this.orderPaymentData.is_virtual == 1) {
if (!this.orderCreateData.member_address.mobile.length) { if (!this.orderCreateData.member_address.mobile.length) {
this.$util.showToast({ this.$util.showToast({
title: '请输入您的手机号码' title: this.$lang('member.inputPhone')
}); });
return false; return false;
} }
if (!this.$util.verifyMobile(this.orderCreateData.member_address.mobile)) { if (!this.$util.verifyMobile(this.orderCreateData.member_address.mobile)) {
this.$util.showToast({ this.$util.showToast({
title: '请输入正确的手机号码' title: this.$lang('member.inputMobileCorrect')
}); });
return false; return false;
} }
@@ -324,7 +324,7 @@ export default {
if (this.orderPaymentData.is_virtual == 0) { if (this.orderPaymentData.is_virtual == 0) {
if (!this.orderCreateData.delivery || !this.orderCreateData.delivery.delivery_type) { if (!this.orderCreateData.delivery || !this.orderCreateData.delivery.delivery_type) {
this.$util.showToast({ this.$util.showToast({
title: '商家未设置配送方式' title: this.$lang('order.notSetDelivery')
}); });
return false; return false;
} }
@@ -332,7 +332,7 @@ export default {
if (this.orderCreateData.delivery.delivery_type != 'store') { if (this.orderCreateData.delivery.delivery_type != 'store') {
if (!this.orderCreateData.member_address) { if (!this.orderCreateData.member_address) {
this.$util.showToast({ this.$util.showToast({
title: '请先选择您的收货地址' title: this.$lang('order.pleaseSelectAddress')
}); });
return false; return false;
} }
@@ -341,26 +341,26 @@ export default {
if (this.orderCreateData.delivery.delivery_type == 'store') { if (this.orderCreateData.delivery.delivery_type == 'store') {
if (!this.orderCreateData.delivery.store_id) { if (!this.orderCreateData.delivery.store_id) {
this.$util.showToast({ this.$util.showToast({
title: '没有可提货的门店,请选择其他配送方式' title: this.$lang('order.noPickupStoreForDelivery')
}); });
return false; return false;
} }
if (!this.member_address.mobile) { if (!this.member_address.mobile) {
this.$util.showToast({ this.$util.showToast({
title: '请输入预留手机' title: this.$lang('member.reservePhone')
}); });
return false; return false;
} }
if (!this.$util.verifyMobile(this.member_address.mobile)) { if (!this.$util.verifyMobile(this.member_address.mobile)) {
this.$util.showToast({ this.$util.showToast({
title: '请输入正确的预留手机' title: this.$lang('member.inputMobileCorrect')
}); });
return false; return false;
} }
if (!this.orderCreateData.delivery.buyer_ask_delivery_time.start_date || !this.orderCreateData.delivery.buyer_ask_delivery_time.end_date) { if (!this.orderCreateData.delivery.buyer_ask_delivery_time.start_date || !this.orderCreateData.delivery.buyer_ask_delivery_time.end_date) {
this.$util.showToast({ this.$util.showToast({
title: '请选择自提时间' title: this.$lang('order.pleaseSelectPickupTime')
}); });
return false; return false;
} }
@@ -369,13 +369,13 @@ export default {
if (this.orderCreateData.delivery.delivery_type == 'local') { if (this.orderCreateData.delivery.delivery_type == 'local') {
if (!this.orderCreateData.delivery.store_id) { if (!this.orderCreateData.delivery.store_id) {
this.$util.showToast({ this.$util.showToast({
title: '没有可配送的门店,请选择其他配送方式' title: this.$lang('order.noDeliveryStore')
}); });
return false; 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)) { 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({ this.$util.showToast({
title: '请选择配送时间' title: this.$lang('order.pleaseSelectDeliverTime')
}); });
return false; return false;
} }