[更新]修正接口URL地址

This commit is contained in:
Anyon 2018-01-29 11:26:51 +08:00
parent 464c3b5551
commit cc0c53d93d
3 changed files with 4 additions and 3 deletions

View File

@ -184,7 +184,7 @@ class Custom extends Wechat
*/ */
public function massGet($msg_id) public function massGet($msg_id)
{ {
$url = "https://api.weixin.qq.com/cgi-bin/message/mass/preview?access_token=ACCESS_TOKEN"; $url = "https://api.weixin.qq.com/cgi-bin/message/mass/get?access_token=ACCESS_TOKEN";
$this->registerApi($url, __FUNCTION__, func_get_args()); $this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['msg_id' => $msg_id]); return $this->httpPostForJson($url, ['msg_id' => $msg_id]);
} }

View File

@ -34,7 +34,7 @@ class Qrcode extends Wechat
*/ */
public function create($scene, $expire_seconds = 0) public function create($scene, $expire_seconds = 0)
{ {
if (is_numeric($scene)) { if (is_integer($scene)) {
$data = ['action_name' => 'QR_LIMIT_SCENE', 'action_info' => ['scene' => ['scene_id' => $scene]]]; $data = ['action_name' => 'QR_LIMIT_SCENE', 'action_info' => ['scene' => ['scene_id' => $scene]]];
} else { } else {
$data = ['action_name' => 'QR_LIMIT_STR_SCENE', 'action_info' => ['scene' => ['scene_str' => $scene]]]; $data = ['action_name' => 'QR_LIMIT_STR_SCENE', 'action_info' => ['scene' => ['scene_str' => $scene]]];

View File

@ -42,11 +42,12 @@ class User extends Wechat
/** /**
* 获取用户基本信息包括UnionID机制 * 获取用户基本信息包括UnionID机制
* @param string $openid * @param string $openid
* @param string $lang
* @return array * @return array
* @throws Exceptions\InvalidResponseException * @throws Exceptions\InvalidResponseException
* @throws Exceptions\LocalCacheException * @throws Exceptions\LocalCacheException
*/ */
public function getUserInfo($openid) 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=zh_CN";
$this->registerApi($url, __FUNCTION__, func_get_args()); $this->registerApi($url, __FUNCTION__, func_get_args());