From 01f842911055d80d283095e27f933127d8e6c4f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 22 May 2020 15:27:32 +0800 Subject: [PATCH] add clear --- wchat/wx/PublicTemplate.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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;