Browse Source

初始化房间

lizhen_gitee 1 year ago
parent
commit
4a285f8f11
1 changed files with 15 additions and 1 deletions
  1. 15 1
      application/api/controller/Party.php

+ 15 - 1
application/api/controller/Party.php

@@ -135,6 +135,21 @@ class Party extends Common
                 $this->error('创建房间失败');
             }
 
+            //[环信]初始化8个麦位
+            //[环信]初始化已点歌曲列表
+            $matedata = [
+                'seat1'  => json_decode([]),
+                'seat2'  => json_decode([]),
+                'seat3'  => json_decode([]),
+                'seat4'  => json_decode([]),
+                'seat5'  => json_decode([]),
+                'seat6'  => json_decode([]),
+                'seat7'  => json_decode([]),
+                'seat8'  => json_decode([]),
+                'waitsing_list'  => json_decode([]),
+            ];
+            $rs = $easemob->room_setRoomCustomAttributeForced($easemob_room_id,$this->auth->id,$matedata);
+
             Db::startTrans();
             //写入派对
             $data = [];
@@ -1220,7 +1235,6 @@ class Party extends Common
         if($list) {
             foreach($list as $k => $v) if(bcadd($v["createtime"],$v["time"]) <= $time && $v["item"] > 1) unset($list[$k]);
             if($list) $list = array_values($list);
-
         }
 
         $this->success("获取成功!",$list);