body, true); } /** * @notes 通过授权信息获取用户信息 * @param $accessToken * @param $openId * @return mixed * @author 段誉 * @date 2022/10/21 10:21 */ public static function getUserInfoByAuth($accessToken, $openId) { $url = 'https://api.weixin.qq.com/sns/userinfo'; $url .= '?access_token=' . $accessToken . '&openid=' . $openId; $response = Requests::get($url); return json_decode($response->body, true); } }