From 56a845848d9e027708cf25d9138110fd73a1a0ab Mon Sep 17 00:00:00 2001 From: devil_gong Date: Mon, 17 Jun 2019 15:23:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E5=B0=8F=E7=A8=8B=E5=BA=8F?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E5=BC=82=E5=B8=B8=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/payment/Weixin.php | 7 +++++-- public/appmini/old/weixin/app.js | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/extend/payment/Weixin.php b/extend/payment/Weixin.php index d92be2a2f..89b2d46f5 100755 --- a/extend/payment/Weixin.php +++ b/extend/payment/Weixin.php @@ -161,9 +161,12 @@ class Weixin } // 微信中打开 - if(!empty($_SERVER['HTTP_USER_AGENT']) && stripos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false && empty($params['user']['weixin_web_openid'])) + if(in_array(APPLICATION_CLIENT_TYPE, ['pc', 'h5'])) { - exit(header('location:'.PluginsHomeUrl('weixinwebauthorization', 'pay', 'index', input()))); + if(!empty($_SERVER['HTTP_USER_AGENT']) && stripos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false && empty($params['user']['weixin_web_openid'])) + { + exit(header('location:'.PluginsHomeUrl('weixinwebauthorization', 'pay', 'index', input()))); + } } // 获取支付参数 diff --git a/public/appmini/old/weixin/app.js b/public/appmini/old/weixin/app.js index 65656c018..7862e205f 100755 --- a/public/appmini/old/weixin/app.js +++ b/public/appmini/old/weixin/app.js @@ -60,7 +60,7 @@ App({ // 请求地址 request_url: "{{request_url}}", - //request_url: 'https://test.shopxo.net/', + request_url: 'https://test.shopxo.net/', // 基础信息 application_title: "{{application_title}}",