From d5f8911cf86811c1986ef39d22480c189903d85a Mon Sep 17 00:00:00 2001 From: Chishin Date: Thu, 11 Jun 2020 21:43:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B4=A7=E6=80=A5=E4=BF=AE=E5=A4=8D=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E7=99=BB=E9=99=86=E6=8E=A5=E5=8F=A3=E5=8D=8F=E8=AE=AE?= =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/LoginController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Home/Controller/LoginController.class.php b/Application/Home/Controller/LoginController.class.php index 279ede4..ed5ab2d 100644 --- a/Application/Home/Controller/LoginController.class.php +++ b/Application/Home/Controller/LoginController.class.php @@ -198,7 +198,7 @@ public function login_weixin(){ $arrData = array('uid'=>'0','uname'=>'非法访问。'); die(json_encode($arrData)); } - $str_data = post('https://api.weixin.qq.com/sns/jscode2session', array('appid' => C('WX_OPENID'), 'secret' => C('WX_SECRET'),'js_code' => $js_code, 'grant_type' => 'authorization_code')); + $str_data = request('https://api.weixin.qq.com/sns/jscode2session?appid='.C('WX_OPENID').'&secret='.C('WX_SECRET').'&js_code='.$js_code.'&grant_type=authorization_code'); $str_data = substr($str_data, strpos($str_data, '{')); $js_data = json_decode($str_data, true); if ($js_data['openid']) {