diff --git a/pages/order_details/stay.vue b/pages/order_details/stay.vue index 2e7bb70..663e932 100644 --- a/pages/order_details/stay.vue +++ b/pages/order_details/stay.vue @@ -363,7 +363,7 @@ }, mapGetters(['isLogin', 'uid', 'viewColor', 'keyColor', ])), onLoad: function(options) { - console.log('11111111') + this.credit_buy = options.credit_buy // console.log(options.product_type) if (options.product_type) { diff --git a/pages/users/payment/payment.vue b/pages/users/payment/payment.vue index 9aa4184..1777648 100644 --- a/pages/users/payment/payment.vue +++ b/pages/users/payment/payment.vue @@ -172,7 +172,7 @@ }, getOrderInfo() { groupOrderDetail(this.order_id, this.product_type).then(res => { - console.log(res) + this.couponData = res.data this.$nextTick(() => { if (this.couponData.interest !== null) { @@ -189,6 +189,7 @@ pay_type: this.payType } ).then(res => { + if (res.data.paid === false) { //拉起微信支付 @@ -204,7 +205,7 @@ }, 1000) } }).catch(err => { - + uni.showToast({ title: err.message }) @@ -213,7 +214,10 @@ orderPay(this.order_id, { type: this.payType }).then(res => { + + let jsConfig = res.data.result.config + if (res.data.status === 'weixinApp') { //拉起微信支付 // #ifdef APP-PLUS @@ -257,16 +261,35 @@ }); // #endif + } else { + if (res.status == 200) { + + // uni.navigateBack({ + // delta: 1 + // }) + + uni.showToast({ + icon: 'none', + title: res.message + }) + setTimeout(() => { + uni.navigateTo({ + url:'/pages/users/order_list/index?status=2' + }) + }, 1000) + } + } + // setTimeout(() => { // uni.navigateBack({ // delta: 1 // }) // }, 1000) - uni.showToast({ - icon:'none' , - title: res.message - }) + // uni.showToast({ + // icon:'none' , + // title: res.message + // }) }) }