优惠券相关更新
This commit is contained in:
@@ -31,13 +31,25 @@
|
||||
<!-- 先支付后下单 -->
|
||||
<orderInfoBefore ref="orderInfoBefore" :listinfo="listinfo" v-else></orderInfoBefore>
|
||||
<!-- 充值免单 -->
|
||||
<rechargeFree
|
||||
:rechargeFreeChecked="rechargeFreeChecked"
|
||||
v-if="listinfo.freeDingConfig.enable == 1&&(!listinfo.orderInfo.couponInfoList&&listinfo.orderInfo.pointsDiscountAmount<=0)&&(listinfo.status == 'unpaid' || listinfo.status == 'paying')"
|
||||
ref="rechargeFree"
|
||||
:freeDisabled="freeDisabled"
|
||||
:payAmount="listinfo.payAmount"
|
||||
:freeDingConfig="listinfo.freeDingConfig" :shopUserInfo="amountVIP" @changeFree="changeFree"></rechargeFree>
|
||||
<block v-if="listinfo.useType == 'dine-in-after'">
|
||||
<rechargeFree
|
||||
:rechargeFreeChecked="rechargeFreeChecked"
|
||||
v-if="listinfo.freeDingConfig.enable == 1&&(listinfo.status == 'unpaid' || listinfo.status == 'paying')"
|
||||
ref="rechargeFree"
|
||||
:freeDisabled="freeDisabled"
|
||||
:payAmount="listinfo.payAmount"
|
||||
:freeDingConfig="listinfo.freeDingConfig" :shopUserInfo="amountVIP" @changeFree="changeFree"></rechargeFree>
|
||||
</block>
|
||||
<block v-else>
|
||||
<rechargeFree
|
||||
:rechargeFreeChecked="rechargeFreeChecked"
|
||||
v-if="listinfo.freeDingConfig.enable == 1&&(!listinfo.orderInfo.couponInfoList&&listinfo.orderInfo.pointsDiscountAmount<=0)&&(listinfo.status == 'unpaid' || listinfo.status == 'paying')"
|
||||
ref="rechargeFree"
|
||||
:freeDisabled="freeDisabled"
|
||||
:payAmount="listinfo.payAmount"
|
||||
:freeDingConfig="listinfo.freeDingConfig" :shopUserInfo="amountVIP" @changeFree="changeFree"></rechargeFree>
|
||||
|
||||
</block>
|
||||
|
||||
<paymentMethod ref="paymentMethod" :rechargeFreeChecked="rechargeFreeChecked" v-if="amountVIP&&listinfo.status == 'unpaid' || listinfo.status == 'paying'" :freeCheck="freeCheck" :payAmount="listinfo.payAmount" :amountVIP="amountVIP" @groupChange="groupChange"></paymentMethod>
|
||||
|
||||
@@ -55,10 +67,10 @@
|
||||
</view>
|
||||
</view>
|
||||
<view style="width: 100%;height: 200rpx;"> </view>
|
||||
<u-popup :show="ispws" :round="20" mode="bottom" @close="ispws = false" height="500" :safeAreaInsetBottom="false">
|
||||
<u-popup :show="ispws" :round="20" mode="bottom" @close="payClose" height="500" :safeAreaInsetBottom="false">
|
||||
<view class="pay-info-wrap">
|
||||
<view class="info-wrap flex-between">
|
||||
<view class="close" @click="ispws = false">
|
||||
<view class="close" @click="payClose">
|
||||
<u-icon name="close" color="#999999" size="40"></u-icon>
|
||||
</view>
|
||||
<text class="title">请输入支付密码</text>
|
||||
@@ -102,7 +114,8 @@
|
||||
freeDisabled: false,
|
||||
freeCheck: false,
|
||||
rechargeFreeChecked: false,
|
||||
srcimge: 'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/wx.jpg'
|
||||
srcimge: 'https://czg-qr-order.oss-cn-beijing.aliyuncs.com/wx.jpg',
|
||||
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
@@ -114,8 +127,8 @@
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.orderInfoAfterRef.childOnShow();
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
onUnload() {
|
||||
this.ispws = false
|
||||
@@ -132,7 +145,7 @@
|
||||
methods: {
|
||||
|
||||
setPayAmount(data) {
|
||||
// this.changeFree(this.freeDisabled)
|
||||
console.log(data)
|
||||
this.listinfo.payAmount = data.payAmount
|
||||
this.couopnInfo = data;
|
||||
this.freeDisabled = data.freeDisabled
|
||||
@@ -142,6 +155,7 @@
|
||||
} else {
|
||||
this.freeDisabled = false
|
||||
}
|
||||
|
||||
},
|
||||
/**
|
||||
* 免单状态监听
|
||||
@@ -251,7 +265,17 @@
|
||||
this.getAount();
|
||||
}
|
||||
|
||||
|
||||
let params = {
|
||||
userId: uni.cache.get('userInfo').id,
|
||||
status: 1,
|
||||
orderId: -1,
|
||||
shopId: this.shopId
|
||||
}
|
||||
console.log("params",params)
|
||||
let ress = await this.api.conponList(params)
|
||||
if (ress.code == 0) {
|
||||
let list = ress.data;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -310,13 +334,29 @@
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 取消支付
|
||||
*/
|
||||
payClose () {
|
||||
this.ispws = false;
|
||||
console.log(2)
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '取消支付'
|
||||
})
|
||||
setTimeout(res => {
|
||||
uni.switchTab({
|
||||
url: '/pages/order/order'
|
||||
});
|
||||
}, 500)
|
||||
},
|
||||
|
||||
/**
|
||||
* 余额支付
|
||||
* @param {Object} pwd
|
||||
*/
|
||||
async accountPayevent(pwd) {
|
||||
this.ispws = false;
|
||||
console.log(pwd)
|
||||
let res = await this.api.accountPay({
|
||||
orderId: this.listinfoid,
|
||||
memberId: this.amountVIP.id,
|
||||
|
||||
Reference in New Issue
Block a user