add clear

This commit is contained in:
as2252258@163.com
2020-03-16 18:49:18 +08:00
parent 5a4968d3b1
commit 50d2cbcd24
+16
View File
@@ -28,6 +28,8 @@ class Tag extends AfficialAccount
$config = $this->config->getAccessToken(); $config = $this->config->getAccessToken();
$result = $this->request->post($this->generate_url . $config, $url); $result = $this->request->post($this->generate_url . $config, $url);
$this->request->setErrorField('errcode');
$this->request->setErrorMsgField('errmsg');
if (!$result->isResultsOK()) { if (!$result->isResultsOK()) {
throw new \Exception($result->getMessage()); throw new \Exception($result->getMessage());
} }
@@ -48,6 +50,8 @@ class Tag extends AfficialAccount
$config = $this->config->getAccessToken(); $config = $this->config->getAccessToken();
$result = $this->request->post($this->tag_edit . $config, $url); $result = $this->request->post($this->tag_edit . $config, $url);
$this->request->setErrorField('errcode');
$this->request->setErrorMsgField('errmsg');
if (!$result->isResultsOK()) { if (!$result->isResultsOK()) {
throw new \Exception($result->getMessage()); throw new \Exception($result->getMessage());
} }
@@ -68,6 +72,8 @@ class Tag extends AfficialAccount
$config = $this->config->getAccessToken(); $config = $this->config->getAccessToken();
$result = $this->request->post($this->tag_delete . $config, $url); $result = $this->request->post($this->tag_delete . $config, $url);
$this->request->setErrorField('errcode');
$this->request->setErrorMsgField('errmsg');
if (!$result->isResultsOK()) { if (!$result->isResultsOK()) {
throw new \Exception($result->getMessage()); throw new \Exception($result->getMessage());
} }
@@ -89,6 +95,8 @@ class Tag extends AfficialAccount
$config = $this->config->getAccessToken(); $config = $this->config->getAccessToken();
$result = $this->request->post($this->user_batch_add_tag . $config, $url); $result = $this->request->post($this->user_batch_add_tag . $config, $url);
$this->request->setErrorField('errcode');
$this->request->setErrorMsgField('errmsg');
if (!$result->isResultsOK()) { if (!$result->isResultsOK()) {
throw new \Exception($result->getMessage()); throw new \Exception($result->getMessage());
} }
@@ -110,6 +118,8 @@ class Tag extends AfficialAccount
$config = $this->config->getAccessToken(); $config = $this->config->getAccessToken();
$result = $this->request->post($this->user_batch_remove_tag . $config, $url); $result = $this->request->post($this->user_batch_remove_tag . $config, $url);
$this->request->setErrorField('errcode');
$this->request->setErrorMsgField('errmsg');
if (!$result->isResultsOK()) { if (!$result->isResultsOK()) {
throw new \Exception($result->getMessage()); throw new \Exception($result->getMessage());
} }
@@ -126,6 +136,8 @@ class Tag extends AfficialAccount
$config = $this->config->getAccessToken(); $config = $this->config->getAccessToken();
$result = $this->request->get($this->tag_lists . $config); $result = $this->request->get($this->tag_lists . $config);
$this->request->setErrorField('errcode');
$this->request->setErrorMsgField('errmsg');
if (!$result->isResultsOK()) { if (!$result->isResultsOK()) {
throw new \Exception($result->getMessage()); throw new \Exception($result->getMessage());
} }
@@ -141,6 +153,8 @@ class Tag extends AfficialAccount
{ {
$config = $this->config->getAccessToken(); $config = $this->config->getAccessToken();
$result = $this->request->get($this->tag_fans_list . $config); $result = $this->request->get($this->tag_fans_list . $config);
$this->request->setErrorField('errcode');
$this->request->setErrorMsgField('errmsg');
if (!$result->isResultsOK()) { if (!$result->isResultsOK()) {
throw new \Exception($result->getMessage()); throw new \Exception($result->getMessage());
} }
@@ -159,6 +173,8 @@ class Tag extends AfficialAccount
$result = $this->request->post($this->user_tag . $config, [ $result = $this->request->post($this->user_tag . $config, [
'openid' => $openid 'openid' => $openid
]); ]);
$this->request->setErrorField('errcode');
$this->request->setErrorMsgField('errmsg');
if (!$result->isResultsOK()) { if (!$result->isResultsOK()) {
throw new \Exception($result->getMessage()); throw new \Exception($result->getMessage());
} }