check_login(); $type = input('type',0); //1:banner列表 2:导航列表 3:推荐列表 $attention = input('attention',0); //1:我关注的 $result = Topics::topicList($type,$attention); $this->success($result['msg'],$result['data']); } /** * 关注话题 */ public function attention_topic(){ $this->check_login(); $topic_id = input('topic_id'); //话题ID if (!$topic_id) $this->error('参数错误'); $result = Topics::attentionTopic($topic_id); if ($result['code']){ $this->success($result['msg']); }else{ $this->error($result['msg']); } } /** * 取消关注话题 */ public function del_attention_topic(){ $this->check_login(); $topic_id = input('topic_id'); //话题ID if (!$topic_id) $this->error('参数错误'); $result = Topics::delAttentionTopic($topic_id); if ($result['code']){ $this->success($result['msg']); }else{ $this->error($result['msg']); } } /** * 话题主页 */ public function topic_detail(){ $this->check_login(); $topic_id = input('topic_id'); //话题ID if (!$topic_id) $this->error('参数错误'); $result = Topics::topicDetail($topic_id); $this->success($result['msg'],$result['data']); } }