Skip to content

Commit

Permalink
feat:支持企微新版登录
Browse files Browse the repository at this point in the history
  • Loading branch information
jatyPeng authored Oct 29, 2024
1 parent 4e6e576 commit c21bed5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/OpenWork/Corp/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,18 +186,24 @@ public function getOAuthRedirectUrl(string $redirectUri = '', string $scope = 's
* 第三方根据code获取企业成员信息.
*
* @param string $code
* @param bool $serviceWwlogin
*
* @return mixed
*
* @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function getUserByCode(string $code)
public function getUserByCode(string $code, bool $serviceWwlogin = false)
{
$params = [
'code' => $code,
];

// 新版企微登录
if ($serviceWwlogin) {
return $this->httpGet('cgi-bin/service/auth/getuserinfo3rd', $params);
}

return $this->httpGet('cgi-bin/service/getuserinfo3rd', $params);
}

Expand Down

0 comments on commit c21bed5

Please sign in to comment.