[更新]修正获取用户资料不能指定语言的问题

This commit is contained in:
Anyon 2019-10-29 17:14:09 +08:00
parent 5789420f58
commit 5fdc20c4a4

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);
}