后台-添加房间功能跳过审核

This commit is contained in:
2025-12-16 16:56:43 +08:00
parent 19d2b6c9f6
commit dcf926e496
2 changed files with 7 additions and 3 deletions

View File

@@ -813,7 +813,7 @@ class Room extends adminApi
if(!$user_id){
return V(0,"用户不存在");
}
$reslut = model('api/Room')->user_create_room($user_id, $room_name, $room_cover, $room_intro);
$reslut = model('api/Room')->user_create_room($user_id, $room_name, $room_cover, $room_intro,0);
if($reslut['code'] == 0){
return V(0,$reslut['msg']);
}

View File

@@ -18,7 +18,7 @@ class Room extends Model
$this->redis = \think\Cache::store('redis')->handler();
}
//创建房间 创建
public function user_create_room($uid, $room_name,$room_cover,$room_intro,$type = 0)
public function user_create_room($uid, $room_name,$room_cover,$room_intro,$type = 0,$need_apply=1)
{
$user_mobile = model('api/User')->where('id', $uid)->value('mobile');
if ($user_mobile == null) {
@@ -52,7 +52,11 @@ class Room extends Model
if($type <= 0){
$data['room_number'] = $this->get_user_code();
$data['type_id'] = 1;
$data['apply_status'] = 1;
if($need_apply == 1){
$data['apply_status'] = 1;
}else{
$data['apply_status'] = 2;
}
$data['label_id'] = 1;
}elseif ($type == 7){
$data['room_number'] = $this->get_user_code();