From 2d08ed945af34cb4cd427d72458b366cf2a976e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 3 Apr 2020 17:53:17 +0800 Subject: [PATCH] add clear --- wchat/common/HttpClient.php | 1 - wchat/qq/SecCheck.php | 10 +++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) 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 - ])); + ]); }