Skip to content

Commit

Permalink
紧急修复微信登陆接口协议变更
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxinpro committed Jun 11, 2020
1 parent 9640b78 commit 6863e7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Application/Home/Controller/LoginController.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,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']) {
Expand Down

0 comments on commit 6863e7a

Please sign in to comment.