diff --git a/wchat/qq/SecCheck.php b/wchat/qq/SecCheck.php index 2d34cf6..ed4c63f 100644 --- a/wchat/qq/SecCheck.php +++ b/wchat/qq/SecCheck.php @@ -27,7 +27,7 @@ class SecCheck extends SmallProgram return $this->sendError('文件不存在', 404); } $this->request->setUseSwoole(false); - $this->request->setHeader(['Content-Type' => 'multipart/form-data']); + $this->request->setHeader('Content-Type', 'multipart/form-data'); $this->request->setErrorField('errCode'); $this->request->setErrorMsgField('errMsg'); return $this->request->post($this->_url . $this->config->getAccessToken(), [ @@ -49,11 +49,11 @@ class SecCheck extends SmallProgram $this->request->addHeader('Content-Type', 'application/json'); $this->request->setErrorField('errCode'); $this->request->setErrorMsgField('errMsg'); - $this->request->setData(json_encode([ - 'appid' => $this->config->getAppid(), + $this->request->setData(null); + return $this->request->post($this->_msgUrl . $this->config->getAccessToken(), json_encode([ + 'appid' => $this->config->getAppid(), 'content' => $content ])); - return $this->request->post($this->_msgUrl . $this->config->getAccessToken()); }