diff --git a/wchat/wx/PublicTemplate.php b/wchat/wx/PublicTemplate.php index b7c92a0..0a36ba5 100644 --- a/wchat/wx/PublicTemplate.php +++ b/wchat/wx/PublicTemplate.php @@ -142,11 +142,14 @@ class PublicTemplate extends SmallProgram if (!empty($this->miniprogram)) { $default['miniprogram'] = $this->miniprogram; } + + $params = json_encode($default, JSON_UNESCAPED_UNICODE); + $this->request->setIsSSL(true); $this->request->addHeader('Content-Type', 'application/json'); $this->request->setErrorField('errcode'); $this->request->setErrorMsgField('errmsg'); - $result = $this->request->post($url, $default); + $result = $this->request->post($url, $params); $result->append('postBody', $default); return $result;