Browse Source

确认订单优化

test
Enzo 4 years ago
parent
commit
aa781a60c6
  1. 8
      pages/order/confirm_order.vue

8
pages/order/confirm_order.vue

@ -153,6 +153,13 @@
this.ifPay = false; this.ifPay = false;
this.$http(this.API.API_CREATEORDER,{id: this.goods_id,num: 1,pay_type: this.pay_type,name:this.contact,mobile:this.phone}).then(res => { this.$http(this.API.API_CREATEORDER,{id: this.goods_id,num: 1,pay_type: this.pay_type,name:this.contact,mobile:this.phone}).then(res => {
this.order_id = res.data.id this.order_id = res.data.id
console.log(res)
if(this.pay_type == 3) {
this.ifPay = true
this.$url('/pages/payState/paystate?ifSuccess=1&order_id='+this.order_id,{type: 'redirect'})
}else {
uni.requestPayment({ uni.requestPayment({
orderInfo: res.data.order_num, orderInfo: res.data.order_num,
timeStamp: res.data.timeStamp, timeStamp: res.data.timeStamp,
@ -169,6 +176,7 @@
this.$url('/pages/payState/paystate?ifSuccess=2&order_id='+this.order_id,{type: 'redirect'}) this.$url('/pages/payState/paystate?ifSuccess=2&order_id='+this.order_id,{type: 'redirect'})
}, },
}) })
}
}).catch(err => { }).catch(err => {
this.ifPay = true this.ifPay = true

Loading…
Cancel
Save