add clear

This commit is contained in:
2020-04-03 18:41:06 +08:00
parent 06c93400b4
commit 7ed51596da
2 changed files with 4 additions and 5 deletions
+3 -4
View File
@@ -282,7 +282,7 @@ class HttpClient
{
$data = $this->paramEncode($data);
if ($this->use_swoole) {
return $this->coroutine($this->host, $this->matchHost($url), $data);
return $this->coroutine($this->matchHost($url), $data);
} else {
return $this->useCurl($url, $data);
}
@@ -452,16 +452,15 @@ class HttpClient
/**
* @param $ip
* @param $url
* @param array $data
* @return array|mixed|Result
* @throws \Exception
* 使用swoole协程方式请求
*/
private function coroutine($ip, $url, $data = [])
private function coroutine($url, $data = [])
{
$client = $this->generate_client($ip, $url, $data);
$client = $this->generate_client($this->host, $url, $data);
if ($client->statusCode < 0) {
throw new \Exception($client->errMsg);
}
+1 -1
View File
@@ -53,7 +53,7 @@ class SecCheck extends SmallProgram
// $this->request->setHost('api.q.qq.com');
$this->request->setIsSSL(true);
$url = 'https://api.q.qq.com'.$this->_msgUrl . $this->config->getAccessToken();
$url = 'https://api.q.qq.com/' . ltrim($this->_msgUrl, '/') . $this->config->getAccessToken();
return $this->request->post($url, json_encode([
'appid' => $this->config->getAppid(),
'content' => $content