diff --git a/wchat/officialaccount/Tag.php b/wchat/officialaccount/Tag.php index 7e896c1..0b779c2 100644 --- a/wchat/officialaccount/Tag.php +++ b/wchat/officialaccount/Tag.php @@ -28,6 +28,8 @@ class Tag extends AfficialAccount $config = $this->config->getAccessToken(); $result = $this->request->post($this->generate_url . $config, $url); + $this->request->setErrorField('errcode'); + $this->request->setErrorMsgField('errmsg'); if (!$result->isResultsOK()) { throw new \Exception($result->getMessage()); } @@ -48,6 +50,8 @@ class Tag extends AfficialAccount $config = $this->config->getAccessToken(); $result = $this->request->post($this->tag_edit . $config, $url); + $this->request->setErrorField('errcode'); + $this->request->setErrorMsgField('errmsg'); if (!$result->isResultsOK()) { throw new \Exception($result->getMessage()); } @@ -68,6 +72,8 @@ class Tag extends AfficialAccount $config = $this->config->getAccessToken(); $result = $this->request->post($this->tag_delete . $config, $url); + $this->request->setErrorField('errcode'); + $this->request->setErrorMsgField('errmsg'); if (!$result->isResultsOK()) { throw new \Exception($result->getMessage()); } @@ -89,6 +95,8 @@ class Tag extends AfficialAccount $config = $this->config->getAccessToken(); $result = $this->request->post($this->user_batch_add_tag . $config, $url); + $this->request->setErrorField('errcode'); + $this->request->setErrorMsgField('errmsg'); if (!$result->isResultsOK()) { throw new \Exception($result->getMessage()); } @@ -110,6 +118,8 @@ class Tag extends AfficialAccount $config = $this->config->getAccessToken(); $result = $this->request->post($this->user_batch_remove_tag . $config, $url); + $this->request->setErrorField('errcode'); + $this->request->setErrorMsgField('errmsg'); if (!$result->isResultsOK()) { throw new \Exception($result->getMessage()); } @@ -126,6 +136,8 @@ class Tag extends AfficialAccount $config = $this->config->getAccessToken(); $result = $this->request->get($this->tag_lists . $config); + $this->request->setErrorField('errcode'); + $this->request->setErrorMsgField('errmsg'); if (!$result->isResultsOK()) { throw new \Exception($result->getMessage()); } @@ -141,6 +153,8 @@ class Tag extends AfficialAccount { $config = $this->config->getAccessToken(); $result = $this->request->get($this->tag_fans_list . $config); + $this->request->setErrorField('errcode'); + $this->request->setErrorMsgField('errmsg'); if (!$result->isResultsOK()) { throw new \Exception($result->getMessage()); } @@ -159,6 +173,8 @@ class Tag extends AfficialAccount $result = $this->request->post($this->user_tag . $config, [ 'openid' => $openid ]); + $this->request->setErrorField('errcode'); + $this->request->setErrorMsgField('errmsg'); if (!$result->isResultsOK()) { throw new \Exception($result->getMessage()); }