|
|
@@ -16,7 +16,9 @@
|
|
|
<radio-group @change="handlePayTypeChange">
|
|
|
<view class="item">
|
|
|
<view class="left">
|
|
|
- <image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/wecha_pay.png" mode=""></image>
|
|
|
+ <image
|
|
|
+ src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/wecha_pay.png"
|
|
|
+ mode=""></image>
|
|
|
<text class="text">微信支付</text>
|
|
|
</view>
|
|
|
<label>
|
|
|
@@ -26,7 +28,8 @@
|
|
|
<!-- #ifdef APP-PLUS||H5 -->
|
|
|
<view class="item">
|
|
|
<view class="left">
|
|
|
- <image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/zfb.png" mode=""></image>
|
|
|
+ <image src="https://bjzmky-1323137866.cos.ap-chongqing.myqcloud.com/userapp/images/zfb.png"
|
|
|
+ mode=""></image>
|
|
|
<text class="text">支付宝</text>
|
|
|
</view>
|
|
|
<label>
|
|
|
@@ -72,6 +75,9 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import {
|
|
|
+ clearPayType
|
|
|
+ } from '@/api/storeOrder'
|
|
|
import dayjs from 'dayjs';
|
|
|
import {
|
|
|
weChatPayment
|
|
|
@@ -86,7 +92,7 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- type:'',
|
|
|
+ type: '',
|
|
|
payPrice: null,
|
|
|
newOrder: {},
|
|
|
payType: 2,
|
|
|
@@ -97,7 +103,8 @@
|
|
|
config: null,
|
|
|
payType: 1,
|
|
|
user: null,
|
|
|
- couponUserId: null
|
|
|
+ couponUserId: null,
|
|
|
+ payParams:null
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -133,6 +140,9 @@
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ onUnload() {
|
|
|
+ this.clearPayTypeFun()
|
|
|
+ },
|
|
|
// //发送给朋友
|
|
|
// onShareAppMessage(res) {
|
|
|
// const combinationOrderId = this.combinationOrderId ?
|
|
|
@@ -145,6 +155,9 @@
|
|
|
|
|
|
// },
|
|
|
methods: {
|
|
|
+ async clearPayTypeFun() {
|
|
|
+ this.payParams && this.payParams.orderId && await clearPayType(this.payParams)
|
|
|
+ },
|
|
|
weixinPayOrder() {
|
|
|
var data = {
|
|
|
orderId: this.order.orderId,
|
|
|
@@ -210,7 +223,7 @@
|
|
|
payOrder() {
|
|
|
if (this.type == 'win') {
|
|
|
this.toPayConfirmReward()
|
|
|
-
|
|
|
+
|
|
|
} else {
|
|
|
if (this.payType == 1) {
|
|
|
console.log("这个order", this.order)
|
|
|
@@ -236,8 +249,8 @@
|
|
|
console.log('当前选中:', this.payType);
|
|
|
},
|
|
|
toPayConfirmReward() {
|
|
|
- let data={
|
|
|
- orderId:this.order.orderId
|
|
|
+ let data = {
|
|
|
+ orderId: this.order.orderId
|
|
|
}
|
|
|
payConfirmReward(data).then(
|
|
|
res => {
|
|
|
@@ -304,6 +317,7 @@
|
|
|
orderId: this.orderId,
|
|
|
payType: payType
|
|
|
};
|
|
|
+ this.payParams = data
|
|
|
var that = this;
|
|
|
uni.showLoading();
|
|
|
editPayType(data).then(
|