@@ -184,7 +184,7 @@ class Model_Home extends PhalApi_Model_NotORM {
...
@@ -184,7 +184,7 @@ class Model_Home extends PhalApi_Model_NotORM {
}
}
/* 关注列表 */
/* 关注列表 */
publicfunctiongetFollow($uid,$p){
publicfunctiongetFollow($uid,$p,$name){
$rs=array(
$rs=array(
'title'=>'你还没有关注任何主播',
'title'=>'你还没有关注任何主播',
'des'=>'赶快去关注自己喜欢的主播吧~',
'des'=>'赶快去关注自己喜欢的主播吧~',
...
@@ -205,24 +205,33 @@ class Model_Home extends PhalApi_Model_NotORM {
...
@@ -205,24 +205,33 @@ class Model_Home extends PhalApi_Model_NotORM {
if($touid){
if($touid){
$rs['title']='你关注的主播没有开播';
$rs['title']='你关注的主播没有开播';
$rs['des']='赶快去看看其他主播的直播吧~';
$rs['des']='赶快去看看其他主播的直播吧~';
$where=" islive='1' ";
$where=" ul.islive='1' ";
if($p!=1){
if($p!=1){
$endtime=$_SESSION['follow_starttime'];
$endtime=$_SESSION['follow_starttime'];
if($endtime){
if($endtime){
$start=0;
$start=0;
$where.=" and starttime < {$endtime}";
$where.=" and ul.starttime < {$endtime}";
}
}
}
}
$touids=array_column($touid,"touid");
$touids=array_column($touid,"touid");
$touidss=implode(",",$touids);
$touidss=implode(",",$touids);
$where.=" and uid in ({$touidss})";
$where.=" and ul.uid in ({$touidss})";
if(!empty($name)){
$where.=" and u.user_nicename like '%".$name."%'";
}
$sql="select ul.uid,ul.title,ul.city,ul.stream,ul.pull,ul.thumb,ul.isvideo,ul.type,ul.type_val,ul.game_action,ul.goodnum,ul.anyway,ul.starttime from cmf_users_live as ul left join cmf_users as u on u.id = ul.uid where {$where}";