|
@@ -30,10 +30,13 @@ class Topichub extends Api
|
|
|
$is_follow = Db::name('user_follow_topic')->where(['uid'=>$this->auth->id,'topic_id'=>$id])->find();
|
|
|
$info['is_follow'] = !empty($is_follow) ? 1 : 0;
|
|
|
|
|
|
+ //增加话题浏览次数
|
|
|
+ Db::name('topic_hub')->where(['status'=>1,'id'=>$id])->setInc('look_number');
|
|
|
+
|
|
|
$this->success('success',$info);
|
|
|
}
|
|
|
|
|
|
- //关注某人
|
|
|
+ //关注话题
|
|
|
public function follow_one(){
|
|
|
$topic_id = input('topic_id',0);
|
|
|
if(!$topic_id){
|