From 4c999ca9bdbd93fbd477de6f7112555ec8ad0297 Mon Sep 17 00:00:00 2001 From: zhangds Date: Thu, 25 Apr 2024 10:04:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=8E=AF=E5=A2=83?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 2 +- xw-pages/homepage.html | 4 +--- xw-pages/reduce.html | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 9803b71..ee84ba9 100644 --- a/index.html +++ b/index.html @@ -222,7 +222,7 @@ // debugger // xw 模块 if (data.is_voucher_auto) { - let goto_url = "/xw-pages/homepage.html"; + const goto_url = "/xw-pages/homepage.html"; setTimeout(() => { if (type) { window.location.replace(goto_url); diff --git a/xw-pages/homepage.html b/xw-pages/homepage.html index ceb479d..e5e52b5 100644 --- a/xw-pages/homepage.html +++ b/xw-pages/homepage.html @@ -605,11 +605,9 @@ * receive_mode: 1 支付宝 2 H5 * recharge_type 2 组合立减金 1立减金 */ - // mozilla/5.0 (iphone; cpu iphone os 11_0 like mac os x) applewebkit/604.1.38 (khtml, like gecko) version/11.0 mobile/15a372 safari/604.1 wechatdevtools/1.06.2308310 micromessenger/8.0.5 language/zh_cn webview/17140096225665648 webdebugger port/60203 token/b278ea8cbbdfa79d02f5eab56caf3a7f if (type == 2) { // 微信公众号授权 - const ua = navigator.userAgent.toLowerCase(); - if (ua.match(/MicroMessenger/i) === "micromessenger") { + if (navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1) { // this.publicCollection(res.data.order_number); let wxauth_url = "https://openapi.1688sup.com/wechat/oauth"; wxauth_url = `${wxauth_url}?jump=${location.origin}/xw-pages/reduce.html`; diff --git a/xw-pages/reduce.html b/xw-pages/reduce.html index 4fd0149..2344ec4 100644 --- a/xw-pages/reduce.html +++ b/xw-pages/reduce.html @@ -256,7 +256,7 @@ this.orderId = res.data.order_number; const ua = navigator.userAgent.toLowerCase(); // 第一步:是否是微信环境 -> 公众号授权 - if (ua.match(/MicroMessenger/i) === "micromessenger") { + if (navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1) { this.publicCollection(res.data.order_number); } else { // 第二步:其它环境 微信小程序