diff --git a/qq/Account.php b/qq/Account.php index 2717903..f40a24f 100644 --- a/qq/Account.php +++ b/qq/Account.php @@ -48,6 +48,10 @@ class Account extends Miniprogarampage $param['js_code'] = $code; $param['grant_type'] = 'authorization_code'; + if (empty($code)) { + return new Result(['code' => 404, 'message' => '临时登录凭证不能为空.']); + } + $this->request->setHost('api.q.qq.com'); $this->request->setMethod(WxClient::GET); $this->request->addHeader('Content-Type', 'text/xml'); @@ -64,8 +68,8 @@ class Account extends Miniprogarampage { $query = [ 'access_token' => $this->getAccessToken(), - 'openid' => $openid, - 'lang' => 'zh_CN' + 'openid' => $openid, + 'lang' => 'zh_CN' ]; $this->request->setMethod(WxClient::GET); diff --git a/qq/QqSDK.php b/qq/QqSDK.php index 598065d..323e916 100644 --- a/qq/QqSDK.php +++ b/qq/QqSDK.php @@ -106,7 +106,7 @@ class QqSDK /** - * @return WxClient + * @return Token */ public function getAccessToken() {