From d7189c3db8f43cd9ab8596f66d125b49911097fc Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Mon, 16 Mar 2020 18:55:02 +0800 Subject: [PATCH] add clear --- wchat/officialaccount/Tag.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wchat/officialaccount/Tag.php b/wchat/officialaccount/Tag.php index 99e5130..a373d7c 100644 --- a/wchat/officialaccount/Tag.php +++ b/wchat/officialaccount/Tag.php @@ -23,11 +23,12 @@ class Tag extends AfficialAccount */ public function generate($tagName) { - $params['tag'] = ['name' => $tagName]; + $params['tag[name]'] = $tagName; $config = $this->config->getAccessToken(); - $result = $this->request->post($this->generate_url . $config, $params); + $this->request->setData(json_encode($params)); + $result = $this->request->post($this->generate_url . $config); $this->request->setErrorField('errcode'); $this->request->setErrorMsgField('errmsg'); if (!$result->isResultsOK()) {