From 04349ae7f0795966e4d435ea8130b11ad80b4257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Tue, 16 Dec 2025 16:54:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=8F=E6=97=A5=E4=BB=BB=E5=8A=A1=20?= =?UTF-8?q?=E7=BB=83=E6=AD=8C=E6=88=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/RoomSong.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/application/api/model/RoomSong.php b/application/api/model/RoomSong.php index 0b4f3689..42d334e8 100644 --- a/application/api/model/RoomSong.php +++ b/application/api/model/RoomSong.php @@ -362,6 +362,11 @@ class RoomSong extends Model ->order('sort desc')->select(); //结束本首歌 $now_song = db::name('vs_room_song')->where('did',$now_room_song_id)->update(['status'=>3]); + 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); + } if(empty($data)){ Cache::rm("api:room:song:nextInfo:" . $room_id); $text = [ @@ -423,11 +428,6 @@ 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]; }