每日任务 练歌房

This commit is contained in:
2025-12-16 14:58:26 +08:00
parent 5722486bc5
commit 820468263f
3 changed files with 21 additions and 2 deletions

View File

@@ -354,7 +354,7 @@ class RoomSong extends Model
}
//切歌
public function change_song($room_id,$now_room_song_id){
public function change_song($room_id,$now_room_song_id,$is_auto_next = 0){
//根据传过来的参数查询当前场次
$times = db::name('vs_room_song')->where('did',$now_room_song_id)->value('times');
//查询下一首歌曲
@@ -423,6 +423,12 @@ class RoomSong extends Model
'nextInfo' => $next_song_info
];
model('Chat')->sendMsg(1013,$room_id,$text);
if($is_auto_next == 1){
$uid = db::name('vs_room_song')->where('did',$now_room_song_id)->value('user_id');
//任务33-每日增加练歌房唱5首歌
model('Tasks')->tasks_complete($uid,33);
}
return ['code'=>1,'msg'=>'切歌成功','data'=>null];
}