|
@@ -482,24 +482,24 @@ class Topicdongtai extends Api
|
|
|
|
|
|
//某个圈子里的动态列表,最新,推荐
|
|
//某个圈子里的动态列表,最新,推荐
|
|
public function topic_list(){
|
|
public function topic_list(){
|
|
|
|
+ $where = [];
|
|
$topic_id = input('topic_id',0);
|
|
$topic_id = input('topic_id',0);
|
|
- $order = input('orderby','new');
|
|
|
|
|
|
+ if($topic_id){
|
|
|
|
+ $where['dt.topic_id'] = $topic_id;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
+ $order = input('orderby','new');
|
|
$orderby = 'dt.id desc';
|
|
$orderby = 'dt.id desc';
|
|
if($order == 'hot'){
|
|
if($order == 'hot'){
|
|
$orderby = 'dt.goodnum desc';
|
|
$orderby = 'dt.goodnum desc';
|
|
}
|
|
}
|
|
|
|
|
|
- $where = [];
|
|
|
|
- if($topic_id){
|
|
|
|
- $where['dt.topic_id'] = $topic_id;
|
|
|
|
- }
|
|
|
|
|
|
|
|
if($order == 'follow'){
|
|
if($order == 'follow'){
|
|
- $follow_user_ids = Db::name('user_fans_follow')->where(['fans_id'=>$this->auth->id])->column('user_id');
|
|
|
|
|
|
+ $follow_user_ids = Db::name('user_follow')->where(['uid'=>$this->auth->id])->column('follow_uid');
|
|
$where['dt.user_id'] = ['IN',$follow_user_ids];
|
|
$where['dt.user_id'] = ['IN',$follow_user_ids];
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+////
|
|
//排除屏蔽的
|
|
//排除屏蔽的
|
|
$screen_ids = Db::name('topic_dongtai_screen')->where('user_id',$this->auth->id)->column('dt_id');
|
|
$screen_ids = Db::name('topic_dongtai_screen')->where('user_id',$this->auth->id)->column('dt_id');
|
|
if(!empty($screen_ids)){
|
|
if(!empty($screen_ids)){
|