diff --git a/wchat/wx/Message.php b/wchat/wx/Message.php index 88716ad..3be9acb 100644 --- a/wchat/wx/Message.php +++ b/wchat/wx/Message.php @@ -16,8 +16,8 @@ class Message extends SmallProgram const MINIPROGRAMPAGE = 6; const WXCARD = 7; - private $openid = ''; - private $msgData = []; + private string $openid = ''; + private array $msgData = []; /** @@ -302,6 +302,7 @@ class Message extends SmallProgram $this->request->setMethod(HttpClient::POST); $this->request->setErrorField('errcode'); $this->request->setErrorMsgField('errmsg'); + $this->request->setHost('api.weixin.qq.com'); /** @var Result $body */ $body = $this->request->post($url, $data);