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"} +