| xqd
@@ -193,7 +193,7 @@ class AuthController extends Controller
|
|
|
$openid='';
|
|
|
if(!isset($arr['errcode']))$openid = $arr['openid'];
|
|
|
if(!empty($openid)){
|
|
|
- $url = "https://api.weixin.qq.com/sns/userinfo?access_token=".$access_token."&openid=".$openid."&lang=zh_CN";
|
|
|
+ $url = "https://api.weixin.qq.com/sns/userinfo?access_token=".$arr['access_token']."&openid=".$openid."&lang=zh_CN";
|
|
|
$userInfoJson = file_get_contents($url); //file_get_contents获取指定路由返回的数据
|
|
|
$userInfo = json_decode($userInfoJson, true);
|
|
|
\Log::info('userInfo: ' . $userInfo);
|