From 6ab1491301ccef2c9c4f6e150db2ed11e45d1b77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Mon, 1 Dec 2025 18:01:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E5=87=BA=E6=88=BF=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/Room.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/application/api/model/Room.php b/application/api/model/Room.php index a6195a9..429e7d4 100644 --- a/application/api/model/Room.php +++ b/application/api/model/Room.php @@ -1242,6 +1242,8 @@ class Room extends Model $apply_type = 3; }elseif($room_type == 6 && $room_label == 5){ //交友私密屋 $apply_type = 4; + }elseif ($room_type == 10){//签约房不能退出 + $apply_type = 5; } if($apply_type == 1){ @@ -1282,8 +1284,13 @@ class Room extends Model } }elseif ($apply_type == 4){ model('api/Friend')->outRoom($uid, $room_id); - } - else{ + }elseif ($apply_type == 5){ + //是否签约麦位 + $vs_room_sign = db::name('vs_room_sign')->where(['room_id' => $room_id, 'sign_user_id' => $user_id,'sign_type'=>1])->find(); + if($vs_room_sign){ + return ['code' => 0, 'msg' => '在签约麦不能退出', 'data' => null]; + } + }else{ //在麦位上 移除用户 $room_pit = db::name('vs_room_pit')->where(['room_id' => $room_id, 'user_id' => $user_id])->find(); if (isset($room_pit)) {