|
@@ -191,7 +191,6 @@ class Topicdongtai extends Api
|
|
|
$topic_id = input('topic_id',0);
|
|
|
$where_exp = [];
|
|
|
if($topic_id){
|
|
|
-// $where['dt.topic_id'] = $topic_id;
|
|
|
$where_exp[] = ['exp',Db::raw("FIND_IN_SET('".$topic_id."',dt.topic_ids)")];
|
|
|
}
|
|
|
//最新
|
|
@@ -226,13 +225,17 @@ class Topicdongtai extends Api
|
|
|
$where_follow .= $where_topic;
|
|
|
}
|
|
|
|
|
|
+ //默认
|
|
|
+ if($where_follow == ''){
|
|
|
+ $where_follow = 'dt.id = 0';
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
|
//附近,根据距离排序
|
|
|
if($order == 'near'){
|
|
|
// $where['dt.cityname'] = $this->auth->cityname;
|
|
|
- $orderby = 'distance asc,dt.toptime desc';
|
|
|
+ $orderby = 'dt.toptime desc,distance asc,';
|
|
|
}
|
|
|
|
|
|
//性别
|