后台-添加房间功能
This commit is contained in:
@@ -20,7 +20,7 @@ class Room extends Model
|
|||||||
//创建房间 创建
|
//创建房间 创建
|
||||||
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)
|
||||||
{
|
{
|
||||||
$user_mobile = model('User')->where('id', $uid)->value('mobile');
|
$user_mobile = model('api/User')->where('id', $uid)->value('mobile');
|
||||||
if ($user_mobile == null) {
|
if ($user_mobile == null) {
|
||||||
return ['code' => 0, 'msg' => '请先绑定手机号', 'data' => null];
|
return ['code' => 0, 'msg' => '请先绑定手机号', 'data' => null];
|
||||||
}
|
}
|
||||||
@@ -88,7 +88,7 @@ class Room extends Model
|
|||||||
|
|
||||||
if($type <= 0){
|
if($type <= 0){
|
||||||
//创建房间麦位默认点唱10个麦位
|
//创建房间麦位默认点唱10个麦位
|
||||||
$reslut1 = model('RoomPit')->create_room_pit(1,$room_id);
|
$reslut1 = model('api/RoomPit')->create_room_pit(1,$room_id);
|
||||||
if($reslut1['code'] == 0){
|
if($reslut1['code'] == 0){
|
||||||
Db::rollback();
|
Db::rollback();
|
||||||
return ['code' => 0, 'msg' => '创建失败', 'data' => null];
|
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){
|
if($reslut['code'] != 1){
|
||||||
Db::rollback();
|
Db::rollback();
|
||||||
return['code' => 0, 'msg' => $reslut['msg'], 'data' => null];
|
return['code' => 0, 'msg' => $reslut['msg'], 'data' => null];
|
||||||
|
|||||||
Reference in New Issue
Block a user