|
@@ -142,6 +142,7 @@ class Login extends Base
|
|
}
|
|
}
|
|
$res = requestGet('https://api.weixin.qq.com/sns/oauth2/access_token?appid='.config('app_program')['app_id'].'&secret='.config('app_program')['secret'].'&code='.$code.'&grant_type=authorization_code');
|
|
$res = requestGet('https://api.weixin.qq.com/sns/oauth2/access_token?appid='.config('app_program')['app_id'].'&secret='.config('app_program')['secret'].'&code='.$code.'&grant_type=authorization_code');
|
|
$res = json_decode($res,true);
|
|
$res = json_decode($res,true);
|
|
|
|
+ var_dump($res);exit();
|
|
$user_info = requestGet('https://api.weixin.qq.com/sns/userinfo?access_token='.$res['access_token'].'&openid='.$res['openid']);
|
|
$user_info = requestGet('https://api.weixin.qq.com/sns/userinfo?access_token='.$res['access_token'].'&openid='.$res['openid']);
|
|
$user_info = json_decode($user_info,true);
|
|
$user_info = json_decode($user_info,true);
|
|
$data['openid'] = $user_info['openid'];
|
|
$data['openid'] = $user_info['openid'];
|