add clear

This commit is contained in:
as2252258@163.com
2019-10-25 15:29:10 +08:00
parent 4784354c22
commit af316b799b
2 changed files with 7 additions and 3 deletions
+6 -2
View File
@@ -48,6 +48,10 @@ class Account extends Miniprogarampage
$param['js_code'] = $code; $param['js_code'] = $code;
$param['grant_type'] = 'authorization_code'; $param['grant_type'] = 'authorization_code';
if (empty($code)) {
return new Result(['code' => 404, 'message' => '临时登录凭证不能为空.']);
}
$this->request->setHost('api.q.qq.com'); $this->request->setHost('api.q.qq.com');
$this->request->setMethod(WxClient::GET); $this->request->setMethod(WxClient::GET);
$this->request->addHeader('Content-Type', 'text/xml'); $this->request->addHeader('Content-Type', 'text/xml');
@@ -64,8 +68,8 @@ class Account extends Miniprogarampage
{ {
$query = [ $query = [
'access_token' => $this->getAccessToken(), 'access_token' => $this->getAccessToken(),
'openid' => $openid, 'openid' => $openid,
'lang' => 'zh_CN' 'lang' => 'zh_CN'
]; ];
$this->request->setMethod(WxClient::GET); $this->request->setMethod(WxClient::GET);
+1 -1
View File
@@ -106,7 +106,7 @@ class QqSDK
/** /**
* @return WxClient * @return Token
*/ */
public function getAccessToken() public function getAccessToken()
{ {