Пример #1
0
 public function delCollect()
 {
     //验证是否登录
     $this->getLoginInfo();
     //验证token
     $this->checkToken(Utils::GetValue("tokenkey"), $this->uin);
     //检查请求来源
     $this->checkRefer();
     $collectionModel = new CollectionModel();
     if ($collectionModel->delCollection($this->uin, $this->comicId)) {
         ActionHelper::UpdateUserStat($this->uin, COLL, '-');
         ActionHelper::UpdateComicStat($this->comicId, 'coll_count', '-');
         ActionHelper::RecordUserAction($this->uin, DEL_COLL_ACT, $this->comicId);
         echo '{"status":10}';
     } else {
         echo '{"status":-10}';
     }
     exit;
 }