diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index 43b3b0b..bb1237b 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -349,7 +349,6 @@ class HttpClient $this->isSSL = false; } } - var_dump($first); $url = '/' . implode('/', $explode); return [$first, $url]; } diff --git a/wchat/qq/SecCheck.php b/wchat/qq/SecCheck.php index ed4c63f..e7a1095 100644 --- a/wchat/qq/SecCheck.php +++ b/wchat/qq/SecCheck.php @@ -15,7 +15,7 @@ class SecCheck extends SmallProgram private $_url = 'https://api.q.qq.com/api/json/security/ImgSecCheck?access_token='; - private $_msgUrl = 'https://api.q.qq.com/api/json/security/MsgSecCheck?access_token='; + private $_msgUrl = '/api/json/security/MsgSecCheck?access_token='; /** * @param string $path @@ -50,10 +50,14 @@ class SecCheck extends SmallProgram $this->request->setErrorField('errCode'); $this->request->setErrorMsgField('errMsg'); $this->request->setData(null); - return $this->request->post($this->_msgUrl . $this->config->getAccessToken(), json_encode([ + $this->request->setHost('api.q.qq.com'); + $this->request->setIsSSL(true); + + $url = $this->_msgUrl . $this->config->getAccessToken(); + return $this->request->post($url, [ 'appid' => $this->config->getAppid(), 'content' => $content - ])); + ]); }