/** * 隐藏动态 * @return <type> */ public function hide() { $post = $this->get_data(); $statuses_id = $post['id']; if (empty($statuses_id)) { $this->send_response(400, NULL, '400:对象id为空'); } $doc = $this->feedModel->findFeed($statuses_id); if (!$doc) { $this->send_response(404, NULL, '该动态不存在'); } $act = $post['act']; if ($act != 'add' && $act != 'del') { $this->send_response(400, NULL, '400:参数不正确'); } if ($act == 'add') { if ($this->feedModel->addHidden($statuses_id)) { $this->send_response(200); } $this->send_response(500, NULL, '隐藏失败'); } else { if ($this->feedModel->delHidden($statuses_id)) { $this->send_response(200); } $this->send_response(500, NULL, '取消隐藏失败'); } }