退出房间

This commit is contained in:
2025-12-01 18:30:54 +08:00
parent bcd691bbf4
commit 0779bfce73

View File

@@ -1214,6 +1214,8 @@ class Room extends Model
$apply_type = 4;
}elseif ($room_type == 10){//签约房不能退出
$apply_type = 5;
}elseif ($room_type == 2){
$apply_type = 6;
}
if($apply_type == 1){
@@ -1244,11 +1246,6 @@ class Room extends Model
$text['pit_number'] = '';
model('api/Chat')->sendMsg(1004,$room_id,$text);
}
//获取拍卖位信息
$auction_id = $catdc = Cache::get('auction_user_'.$room_id);
if($auction_id == $user_id){
return ['code' => 0, 'msg' => '正在拍卖中,不能退出', 'data' => null];
}
}elseif ($apply_type == 3){
$roomInfoStep = db::name('vs_room')->where(['id' => $room_id])->value('step');
$room_pit = db::name('vs_room_pit')->where(['room_id' => $room_id, 'user_id' => $user_id])->find();
@@ -1267,6 +1264,11 @@ class Room extends Model
if($vs_room_sign){
return ['code' => 0, 'msg' => '在签约麦不能退出', 'data' => null];
}
}elseif ($apply_type == 6){
$auction_user_id = Cache::get('auction_user_'.$room_id);
if($auction_user_id == $user_id){
return ['code' => 0, 'msg' => '拍卖位麦不能退出', 'data' => null];
}
}else{
//在麦位上 移除用户
$room_pit = db::name('vs_room_pit')->where(['room_id' => $room_id, 'user_id' => $user_id])->find();