后台-添加房间功能

This commit is contained in:
2025-12-16 16:18:19 +08:00
parent 287b108ce6
commit 19d2b6c9f6

View File

@@ -20,7 +20,7 @@ class Room extends Model
//创建房间 创建
public function user_create_room($uid, $room_name,$room_cover,$room_intro,$type = 0)
{
$user_mobile = model('User')->where('id', $uid)->value('mobile');
$user_mobile = model('api/User')->where('id', $uid)->value('mobile');
if ($user_mobile == null) {
return ['code' => 0, 'msg' => '请先绑定手机号', 'data' => null];
}
@@ -88,7 +88,7 @@ class Room extends Model
if($type <= 0){
//创建房间麦位默认点唱10个麦位
$reslut1 = model('RoomPit')->create_room_pit(1,$room_id);
$reslut1 = model('api/RoomPit')->create_room_pit(1,$room_id);
if($reslut1['code'] == 0){
Db::rollback();
return ['code' => 0, 'msg' => '创建失败', 'data' => null];
@@ -103,7 +103,7 @@ class Room extends Model
}
//创建腾讯云群组
$reslut = model('Tencent')->create_group($uid,'room'.$room_id);
$reslut = model('api/Tencent')->create_group($uid,'room'.$room_id);
if($reslut['code'] != 1){
Db::rollback();
return['code' => 0, 'msg' => $reslut['msg'], 'data' => null];