修改人脸识别拍照图片质量和添加场馆灯管费用支付
This commit is contained in:
@ -138,9 +138,14 @@
|
||||
<block v-if="item.order_status == 3 && item.fp_status == 0">
|
||||
<button class="theme-btn pay-btn" @click="toInvoice(item.id)">去开票</button>
|
||||
</block>
|
||||
|
||||
<!-- 在网球场下且订单是已预约和进行中有个购买灯光 -->
|
||||
<!-- <block v-if="(item.order_status == 1 || item.order_status == 2) && ballType == 1">
|
||||
<button class="theme-btn pay-btn" @click="onBuyLight(item.id, item.room_id, item.ground_id, item.order_status)">购买灯光</button>
|
||||
</block> -->
|
||||
|
||||
<!-- 在篮球场下且订单是已预约有个人脸录入 -->
|
||||
<block v-if="item.order_status == 1 && ballType == 2 && item.face_status == 0">
|
||||
<!-- 在篮球场下且订单是已预约和进行中有个人脸录入 -->
|
||||
<block v-if="(item.order_status == 1 || item.order_status == 2) && ballType == 2 && item.face_status == 0">
|
||||
<button class="theme-btn pay-btn" @click="onTakePhoto(item.id)">人脸录入</button>
|
||||
</block>
|
||||
</block>
|
||||
@ -604,6 +609,92 @@
|
||||
url: `/pages/order/invoice?order_id=${order_id}`
|
||||
});
|
||||
},
|
||||
|
||||
// 购买灯光
|
||||
onBuyLight(order_id, room_id, ground_id, order_status) {
|
||||
console.log("🚀 ~ order_status:", order_status)
|
||||
if (order_status == 1) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您已支付过灯光费用,是否再次支付?',
|
||||
success: function() {
|
||||
this.payLight(order_id, room_id, ground_id, order_status);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.payLight(order_id, room_id, ground_id, order_status);
|
||||
}
|
||||
},
|
||||
|
||||
payLight(order_id, room_id, ground_id, order_status) {
|
||||
let self = this;
|
||||
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您确定要购买灯光费用吗?',
|
||||
success: function(o) {
|
||||
if (o.confirm) {
|
||||
uni.showLoading({
|
||||
title: '正在处理'
|
||||
});
|
||||
self._post(
|
||||
'order.GroundOrder/addLightStoreOrder', {
|
||||
order_id,
|
||||
room_id,
|
||||
ground_id,
|
||||
content: ''
|
||||
},
|
||||
function(res) {
|
||||
uni.hideLoading();
|
||||
|
||||
uni.showLoading({
|
||||
title: '支付中'
|
||||
});
|
||||
const payId = res.data.id;
|
||||
|
||||
self._post(
|
||||
'user.groundOrder/lightPay', {
|
||||
order_id: payId,
|
||||
},
|
||||
function(pay) {
|
||||
console.log("🚀 ~ pay:", pay)
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay',
|
||||
timeStamp: pay.data.payment.timeStamp,
|
||||
nonceStr: pay.data.payment.nonceStr,
|
||||
package: 'prepay_id=' + pay.data.payment.prepay_id,
|
||||
signType: 'MD5',
|
||||
paySign: pay.data.payment.paySign,
|
||||
success: res => {
|
||||
self.result = 'success'
|
||||
uni.hideLoading();
|
||||
setTimeout(() => {
|
||||
uni.showToast({
|
||||
title: '支付成功',
|
||||
icon: 'none'
|
||||
});
|
||||
}, 100);
|
||||
},
|
||||
fail: res => {
|
||||
console.log("🚀 ~ pay error res:", res)
|
||||
self.result = 'fail'
|
||||
uni.hideLoading();
|
||||
setTimeout(() => {
|
||||
uni.showToast({
|
||||
title: '支付失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}, 100);
|
||||
},
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user