退出房间
This commit is contained in:
@@ -1242,6 +1242,8 @@ class Room extends Model
|
|||||||
$apply_type = 3;
|
$apply_type = 3;
|
||||||
}elseif($room_type == 6 && $room_label == 5){ //交友私密屋
|
}elseif($room_type == 6 && $room_label == 5){ //交友私密屋
|
||||||
$apply_type = 4;
|
$apply_type = 4;
|
||||||
|
}elseif ($room_type == 10){//签约房不能退出
|
||||||
|
$apply_type = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($apply_type == 1){
|
if($apply_type == 1){
|
||||||
@@ -1282,8 +1284,13 @@ class Room extends Model
|
|||||||
}
|
}
|
||||||
}elseif ($apply_type == 4){
|
}elseif ($apply_type == 4){
|
||||||
model('api/Friend')->outRoom($uid, $room_id);
|
model('api/Friend')->outRoom($uid, $room_id);
|
||||||
|
}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{
|
}else{
|
||||||
//在麦位上 移除用户
|
//在麦位上 移除用户
|
||||||
$room_pit = db::name('vs_room_pit')->where(['room_id' => $room_id, 'user_id' => $user_id])->find();
|
$room_pit = db::name('vs_room_pit')->where(['room_id' => $room_id, 'user_id' => $user_id])->find();
|
||||||
if (isset($room_pit)) {
|
if (isset($room_pit)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user