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 {
// 第二步:其它环境 微信小程序