From badc547797ca643d0b50e1304f14e976dfb69ae2 Mon Sep 17 00:00:00 2001 From: duan <1004387497@qq.com> Date: Wed, 12 Jun 2024 11:43:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/order/order_detail.vue | 4 -- pages/order_detail/order_detail.vue | 75 ++++++++++++++++------------- 2 files changed, 41 insertions(+), 38 deletions(-) diff --git a/pages/order/order_detail.vue b/pages/order/order_detail.vue index b1cbcc7..ff4bebb 100644 --- a/pages/order/order_detail.vue +++ b/pages/order/order_detail.vue @@ -127,10 +127,6 @@ console.log(e) this.orderId = e.orderId this.orderorderInfo() - - - - }, onShow() { if (this.orderId) { diff --git a/pages/order_detail/order_detail.vue b/pages/order_detail/order_detail.vue index 3ba5898..5f358b3 100644 --- a/pages/order_detail/order_detail.vue +++ b/pages/order_detail/order_detail.vue @@ -171,7 +171,8 @@ 以优惠¥{{emitorderfoodform.couponsPrice}} - + + 立即付款 @@ -396,22 +397,8 @@ }, showpopupclickdd() { - console.log('调试1') - // setTimeout(() => { - uni.requestSubscribeMessage({ - tmplIds: ['z0fUG7-jhSfYCrw6poOvSRzh4_hgnPkm_5C7E5s5bCQ'], - success(){ - console.log(1) - }, - fail(){ - console.log(2) - }, - complete(){ - console.log(3) - }, - }) - // },1500) - return + + // radiovalue1为1是微信支付 if (this.radiovalue1 == 1) { this.showpopupclickdds() //微信支付 @@ -454,20 +441,35 @@ signType: res.data.signType, //固定值 paySign: res.data.paySign, //签名 success: (res) => { - uni.showToast({ - title: "支付成功" - }) let _this = this + uni.requestSubscribeMessage({ + tmplIds: ['z0fUG7-jhSfYCrw6poOvSRzh4_hgnPkm_5C7E5s5bCQ'], + complete() { + + uni.showToast({ + title: "支付成功" + }) + + uni.cache.set('shopUser', '') //删除shopUser + this.paymodfiyOrderInfo() + + + uni.redirectTo({ + url: '/pages/order/order_detail?orderId=' + _this + .listinfo.id + }); + }, + }) - uni.cache.set('shopUser', '') //删除shopUser - this.paymodfiyOrderInfo() - setTimeout(() => { - uni.redirectTo({ - url: '/pages/order/order_detail?orderId=' + _this - .listinfo.id - }); - }, 700) + + + // setTimeout(() => { + // uni.redirectTo({ + // url: '/pages/order/order_detail?orderId=' + _this + // .listinfo.id + // }); + // }, 700) }, }); // #endif @@ -489,12 +491,17 @@ if (res.data == 1) { this.showToastUppop('支付成功') let _this = this - setTimeout(() => { - uni.redirectTo({ - url: '/pages/order/order_detail?orderId=' + _this - .listinfo.id - }); - }, 700) + + uni.requestSubscribeMessage({ + tmplIds: ['z0fUG7-jhSfYCrw6poOvSRzh4_hgnPkm_5C7E5s5bCQ'], + complete() { + uni.redirectTo({ + url: '/pages/order/order_detail?orderId=' + _this + .listinfo.id + }); + }, + }) + } else if (res.data == 2) { this.showToastUppop('余额不足') setTimeout(() => {