点唱后端数据操作 api 添加分页
This commit is contained in:
@@ -87,6 +87,8 @@ class SingerSong extends BaseCom
|
||||
//获取房间内麦位上歌手歌曲
|
||||
public function getSong()
|
||||
{
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 30);
|
||||
$room_id = input('room_id', 0);
|
||||
//用户ID
|
||||
$user_id = input('user_id', 0);
|
||||
@@ -94,7 +96,7 @@ class SingerSong extends BaseCom
|
||||
if (!$room_id && !$user_id) {
|
||||
return V(0, '请选择房间或歌手');
|
||||
}
|
||||
$reslut = model('SingerSong')->getSong($user_id, $room_id);
|
||||
$reslut = model('SingerSong')->getSong($user_id, $room_id, $page, $page_limit);
|
||||
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
@@ -118,12 +120,14 @@ class SingerSong extends BaseCom
|
||||
//点歌列表
|
||||
public function singerSongList()
|
||||
{
|
||||
$page = input('page', 1);
|
||||
$page_limit = input('page_limit', 30);
|
||||
$room_id = input('room_id', 0);
|
||||
if (!$room_id) {
|
||||
return V(0, '请选择房间');
|
||||
}
|
||||
$type = input('type', 1);//1:已点列表,2:今日列表,3:昨日列表,4:本周列表,5:本月列表
|
||||
$reslut = model('SingerSong')->singerSongList($room_id,$type);
|
||||
$reslut = model('SingerSong')->singerSongList($room_id,$type,$page,$page_limit);
|
||||
return V($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user