Browse Source

零元购不调支付接口

zhaoxw 4 years ago
parent
commit
b2b493f41f
1 changed files with 14 additions and 0 deletions
  1. 14 0
      pagesGood/orderPay.vue

+ 14 - 0
pagesGood/orderPay.vue

@@ -253,6 +253,7 @@
 						type: 'warning',
 					})
 				} else {
+					let paySum = this.orderType == 1 ? this.getAllGoodsPrice() : this.paySum
 					NET.request(API.submitOrder, {
 						//  会员
 						mid: this.userData.userId,
@@ -299,6 +300,19 @@
 						if (res.isSuccess) {
 							if (res.data) {
 								this.orderId = res.data.orderId
+								debugger
+								if (paySum == '0.00') {
+								    this.$refs.uTips.show({
+								    	title: '购买成功',
+								    	type: 'success',
+								    })
+								    setTimeout(() => {
+								    	uni.redirectTo({
+								    	    url: '/pagesMain/orderDetail?orderId=' + this.orderId + '&orderStatus=' + 1
+								    	});
+								    }, 1000)
+									return;
+								}
 								uni.requestPayment({
 									provider: 'wxpay',
 									timeStamp: res.data.timeStamp,