-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
/** * 获取用户信息 * @return array||bool * @throws \Exception */ public function getUserInfo(){ $params['uid'] = $this->openid(); $response = $this->call('users/show',$params); if ($response['ret'] == 0) { $userInfo['openid'] = $this->openid(); $userInfo['username'] = $response['screen_name']; $userInfo['avatar'] = $response['profile_image_url']; $userInfo['sex'] = $response['gender']=='m'?1:2; return $userInfo; } else { return false; } }
if ($response['ret'] == 0) {
应该改为:
if ($response['error_code'] == 0) {
Metadata
Metadata
Assignees
Labels
No labels