修复使用 getUserInfo 方法在获取单个粉丝用户信息时指定语言版本无效的问题

This commit is contained in:
TianQi 2019-10-25 22:55:06 +08:00
parent 5789420f58
commit 43bf643cee

View File

@ -49,7 +49,7 @@ class User extends BasicWeChat
*/
public function getUserInfo($openid, $lang = 'zh_CN')
{
$url = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=ACCESS_TOKEN&openid={$openid}&lang=zh_CN";
$url = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=ACCESS_TOKEN&openid={$openid}&lang={$lang}";
$this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpGetForJson($url);
}