|
@@ -61,6 +61,8 @@ class Topicdongtai extends Api
|
|
|
|
|
|
if(!empty($list)){
|
|
|
foreach($list as $key => &$val){
|
|
|
+
|
|
|
+ //追加点赞
|
|
|
$val['isgood'] = $this->is_good($val['id'],$this->auth->id);
|
|
|
|
|
|
//创建视频缩略图
|
|
@@ -71,7 +73,14 @@ class Topicdongtai extends Api
|
|
|
$val['images_thumb'] = join('.', $images_url) . '_0.jpg';
|
|
|
}
|
|
|
|
|
|
+ //时间
|
|
|
$val['createtime_text'] = get_last_time($val['createtime']);
|
|
|
+
|
|
|
+ //关注
|
|
|
+ $val['is_follow'] = $this->is_follow($val['user_id'],$this->auth->id);
|
|
|
+
|
|
|
+ //评论
|
|
|
+ $val['answernumber'] = Db::name('topic_dongtai_answer')->where(['dt_id'=>$val['id'],'level'=>1])->count();
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -147,7 +156,7 @@ class Topicdongtai extends Api
|
|
|
$info['createtime_text'] = get_last_time($info['createtime']);
|
|
|
|
|
|
//关注
|
|
|
- $val['is_follow'] = $this->is_follow($info['user_id'],$this->auth->id);
|
|
|
+ $info['is_follow'] = $this->is_follow($info['user_id'],$this->auth->id);
|
|
|
|
|
|
//评论
|
|
|
$info['answernumber'] = Db::name('topic_dongtai_answer')->where(['dt_id'=>$id,'level'=>1])->count();
|