add clear
This commit is contained in:
@@ -27,13 +27,10 @@ class Tag extends AfficialAccount
|
||||
|
||||
$config = $this->config->getAccessToken();
|
||||
|
||||
$result = $this->request->post($this->generate_url . $config, $params);
|
||||
$this->request->setErrorField('errcode');
|
||||
$this->request->setErrorMsgField('errmsg');
|
||||
if (!$result->isResultsOK()) {
|
||||
throw new \Exception($result->getMessage());
|
||||
}
|
||||
return $result->getData();
|
||||
|
||||
return $this->request->post($this->generate_url . $config, $params);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -49,13 +46,11 @@ 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());
|
||||
}
|
||||
return $result->getData();
|
||||
|
||||
return $this->request->post($this->tag_edit . $config, $url);
|
||||
}
|
||||
|
||||
|
||||
@@ -70,14 +65,9 @@ class Tag extends AfficialAccount
|
||||
$url['tag[id]'] = $id;
|
||||
|
||||
$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());
|
||||
}
|
||||
return $result->getData();
|
||||
return $this->request->post($this->tag_delete . $config, $url);
|
||||
}
|
||||
|
||||
|
||||
@@ -94,13 +84,9 @@ 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());
|
||||
}
|
||||
return $result->getData();
|
||||
return $this->request->post($this->user_batch_add_tag . $config, $url);
|
||||
}
|
||||
|
||||
|
||||
@@ -117,13 +103,9 @@ 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());
|
||||
}
|
||||
return $result->getData();
|
||||
return $this->request->post($this->user_batch_remove_tag . $config, $url);
|
||||
}
|
||||
|
||||
|
||||
@@ -135,13 +117,9 @@ 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());
|
||||
}
|
||||
return $result->getData();
|
||||
return $this->request->get($this->tag_lists . $config);
|
||||
}
|
||||
|
||||
|
||||
@@ -152,13 +130,9 @@ class Tag extends AfficialAccount
|
||||
public function tag_fans_list()
|
||||
{
|
||||
$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());
|
||||
}
|
||||
return $result->getData();
|
||||
return $this->request->get($this->tag_fans_list . $config);
|
||||
}
|
||||
|
||||
|
||||
@@ -170,15 +144,11 @@ class Tag extends AfficialAccount
|
||||
public function user_tag($openid)
|
||||
{
|
||||
$config = $this->config->getAccessToken();
|
||||
$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());
|
||||
}
|
||||
return $result->getData();
|
||||
return $this->request->post($this->user_tag . $config, [
|
||||
'openid' => $openid
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user