From ee85ae59e895c92d2262d93ff07d2ee9961d89e0 Mon Sep 17 00:00:00 2001 From: Apple <> Date: Wed, 2 Nov 2022 17:45:27 +0800 Subject: [PATCH] =?UTF-8?q?test:=E5=BE=AE=E4=BF=A1JSAPI=E8=81=94=E8=B0=83?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=EF=BC=8C=E5=8A=A0=E5=AF=86openid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- coupon/details.html | 4 ++-- index.html | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/coupon/details.html b/coupon/details.html index ada945e..084aeb9 100644 --- a/coupon/details.html +++ b/coupon/details.html @@ -579,11 +579,12 @@ //优惠券订单支付 createdPay (orderNumber) { let open_id = localStorage.getItem('code_weixin') + console.log(582,open_id); let data={ token: localStorage.getItem('token'), } if(open_id){ - data.open_id=open_id; + data.open_id=encodeURIComponent(open_id); } req.axiosGet('/key/coupon/createPay/' + orderNumber, data).then(res => { if (res.code == 200) { @@ -593,7 +594,6 @@ } }).catch(err => { }); }, - //根据环境去执行 payWayRun (result) { if (this.payType == 1) {// 1微信支付 2 支付宝支付 diff --git a/index.html b/index.html index 2e23a64..827a7f9 100644 --- a/index.html +++ b/index.html @@ -195,7 +195,7 @@ center.style.height = img.clientHeight + "px"; } }) - localStorage.clear() + // localStorage.clear() }, computed: { bindInputStyle () { @@ -235,8 +235,12 @@ getweixin() { let code_weixin = this.getQueryString('openid'); let code_weixin_history = localStorage.getItem('code_weixin') + console.log('code_weixin_history',code_weixin_history); + console.log(238,code_weixin); if (code_weixin) { if (code_weixin != code_weixin_history) { + console.log(2381,code_weixin); + localStorage.setItem('code_weixin', code_weixin); //(储存code) } }else{