From ae295dd35a607cfa010078cd6a701dfa97a2d25c Mon Sep 17 00:00:00 2001 From: lixiaoyu <1906596264@qq.com> Date: Fri, 22 Sep 2023 17:02:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=88=A4=E6=96=AD=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E6=94=AF=E4=BB=98=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile/blankmini.php | 61 --------------------------------- mobile/plugins/payment/wxpay.php | 15 ++++---- mobile/source/apps/flow/views/done.html | 1 + 3 files changed, 8 insertions(+), 69 deletions(-) delete mode 100644 mobile/blankmini.php diff --git a/mobile/blankmini.php b/mobile/blankmini.php deleted file mode 100644 index 7149743..0000000 --- a/mobile/blankmini.php +++ /dev/null @@ -1,61 +0,0 @@ - \ No newline at end of file diff --git a/mobile/plugins/payment/wxpay.php b/mobile/plugins/payment/wxpay.php index cd7915e..b09d303 100755 --- a/mobile/plugins/payment/wxpay.php +++ b/mobile/plugins/payment/wxpay.php @@ -238,14 +238,12 @@ class wxpay }; function callpay() { - wx.miniProgram.getEnv(function(res) { - - if(res.miniprogram){ - console.log(123); - // true代表在小程序里 - + var ua = navigator.userAgent.toLowerCase(); + if(ua.match(/MicroMessenger/i)=="micromessenger") { + wx.miniProgram.getEnv((res)=>{ + if (res.miniprogram) { + // 在微信小程序中打开 }else{ - console.log(456); //false代表在公众号里 if (typeof WeixinJSBridge == "undefined") { @@ -262,7 +260,8 @@ class wxpay jsApiCall(); } } - }) + }) + } } '; // window.location.href = "{U(\'flow/index/done\')}"; diff --git a/mobile/source/apps/flow/views/done.html b/mobile/source/apps/flow/views/done.html index 50b3603..0a9e86d 100755 --- a/mobile/source/apps/flow/views/done.html +++ b/mobile/source/apps/flow/views/done.html @@ -1,4 +1,5 @@ {include file="page_header"} +