This commit is contained in:
xl
2023-11-14 12:39:28 +08:00
parent c3326a9b5a
commit f92fdab692
15 changed files with 245 additions and 272 deletions
+18 -1
View File
@@ -25,7 +25,24 @@ class Account extends SmallProgram
$param['js_code'] = $code;
$param['grant_type'] = 'authorization_code';
return $this->get('/sns/jscode2session', $param);
return $this->get('api.q.qq.com', '/sns/jscode2session', $param);
}
/**
* @param string $code
* @return Result
*/
public function appLogin(string $code): Result
{
$param['appid'] = $this->payConfig->appId;
$param['secret'] = $this->payConfig->appSecret;
$param['js_code'] = $code;
$param['grant_type'] = 'authorization_code';
$this->host = 'graph.qq.com';
return $this->get('api.q.qq.com', '/user/get_user_info', $param);
}
}