进入房间

This commit is contained in:
2026-01-26 11:28:43 +08:00
parent 4974ea58b9
commit 1325a5ad12
2 changed files with 8 additions and 2 deletions

View File

@@ -18,7 +18,7 @@ class Room extends Model
}
//创建房间 创建
public function user_create_room($uid, $room_name,$room_cover,$room_intro,$type = 0,$need_apply=1)
public function user_create_room($uid, $room_name,$room_cover,$room_intro,$type = 0,$need_apply=1,$password = '')
{
$user_mobile = model('api/User')->where('id', $uid)->value('mobile');
if ($user_mobile == null) {
@@ -62,6 +62,9 @@ class Room extends Model
$data['is_open_blind_box_turntable'] = 1;
}
$data['label_id'] = 1;
if(!empty($password)){
$data['room_password'] = $password;
}
}elseif ($type == 7){//互娱房创建的私密电影屋
$data['room_number'] = $this->get_user_code();
$data['type_id'] = 6;//cp电影房
@@ -173,6 +176,8 @@ class Room extends Model
}
if($password){
$data['room_password'] = $password;
}else{
$data['room_password'] = '';
}
if(!empty($data)){
$reslut = $this->where('id', $room_id)->update($data);