From cb0c4114bd8631844a64cc255b91546409e5054a Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Fri, 15 Mar 2024 15:01:27 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=80=EF=B8=8F=20fix:=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- coupon/myOrder.html | 20 +++++++++----------- paysuccess.html | 41 +++++++++++++++++++++++------------------ 2 files changed, 32 insertions(+), 29 deletions(-) diff --git a/coupon/myOrder.html b/coupon/myOrder.html index 60f518a..bfacd1d 100644 --- a/coupon/myOrder.html +++ b/coupon/myOrder.html @@ -355,7 +355,7 @@ if (res.goods.channel == 2) { if (res.goods.is_webview == 1) { /* 公众号 */ - this.publicCollection(res.code_batch_id); + this.publicCollection(res.order_number); } else if (ua.indexOf("dingtalk") > -1) { //在钉钉内置环境打开,不能唤起微信小程序 window.location.href = res.wechat_redirect_url; @@ -367,24 +367,22 @@ }, /* 公众号领取 */ - publicCollection (code_batch_id) { + publicCollection (order_number) { let params = { - token: localStorage.getItem('token'), - code_batch_id: code_batch_id, + order_number, + channel: 2, channel_user_id: this.openId, is_webview: 1 }; - req.axiosPost("/voucher/groupVoucherGrant", params) + req.axiosPost("/voucher/grant", params) .then((res) => { if (res.code == 200) { - this.message = '领取成功'; - this.getProductDetail(); + this.popFunction({ title: '温馨提示', text: '领取成功', status: 1, b_text: '我知道了', show: true }); + this.getOrderList(); } else { - this.axiosErrorFun(res.code, res.message); + this.popFunction({ title: '温馨提示', text: res.message, status: 3, b_text: '我知道了', show: true }); } - }) - .catch((err) => { this.loading = false; }); - ; + }); }, // 单条弹框 diff --git a/paysuccess.html b/paysuccess.html index ebaf9b1..326d5cf 100644 --- a/paysuccess.html +++ b/paysuccess.html @@ -47,7 +47,7 @@