diff --git a/application/api/model/RoomPit.php b/application/api/model/RoomPit.php index 3103045..23679a7 100644 --- a/application/api/model/RoomPit.php +++ b/application/api/model/RoomPit.php @@ -127,7 +127,7 @@ class RoomPit extends Model return ['code' => 0, 'msg' => '当前房间正在pk中', 'data' => null]; } $step = db::name('vs_room')->where(['id' => $room_id, 'type_id' => 7])->value('step'); - if($step && $step != 1 && $pit_number >= 9){ + if($step && $step != 1){ return ['code' => 0, 'msg' => '交友房 此阶段不可操作', 'data' => null]; } $FromUserInfo = db::name('user')->where('id',$user_id)->field('id as user_id,nickname,avatar,sex')->find(); @@ -174,7 +174,7 @@ class RoomPit extends Model return ['code' => 0, 'msg' => '请选择房间', 'data' => null]; } //查询房间状态 - $room_info = db::name('vs_room')->where(['id' => $room_id, 'apply_status' => 2])->field('id,room_status,room_up_pit_type,label_id')->find(); + $room_info = db::name('vs_room')->where(['id' => $room_id, 'apply_status' => 2])->field('id,room_status,room_up_pit_type,label_id,step')->find(); if(!$room_info){ return ['code' => 0, 'msg' => '房间不存在', 'data' => null]; } @@ -191,6 +191,10 @@ class RoomPit extends Model if($pit_infos){ return ['code' => 0, 'msg' => '您已上麦', 'data' => null]; } + + if($room_info['label_id'] == 5 && $room_info['step'] != 1){ + return ['code' => 0, 'msg' => '交友房 此阶段不可操作', 'data' => null]; + } //自由麦 if($room_info['room_up_pit_type'] == 2){