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()) {