浏览代码

派对优化

lizhen_gitee 1 年之前
父节点
当前提交
e8ce9284ac
共有 1 个文件被更改,包括 9 次插入20 次删除
  1. 9 20
      application/api/controller/Party.php

+ 9 - 20
application/api/controller/Party.php

@@ -435,7 +435,7 @@ class Party extends Api
                 'waitsing_list'  => json_encode([]),//清空房间待唱列表
                 'online_user_num' => 0,//当前房间在线的人
             ];
-            $easemob = new easemob();
+            $easemob = new Easemob();
             $easemob->room_setRoomCustomAttributeForced($partyInfo['easemob_room_id'],$partyInfo['user_id'],$matedata);
 
             //重置麦位
@@ -886,6 +886,7 @@ class Party extends Api
         $matedata = [
             'online_user_num'  => count($this->redis->hGetAll("online_".$party_id)),
         ];
+
         $easemob->room_setRoomCustomAttributeForced($partyInfo['easemob_room_id'],$partyInfo['user_id'],$matedata);
 
         return $this->success("加入成功!",$lsetList);
@@ -2127,18 +2128,6 @@ class Party extends Api
                 $this->redis->set($this->roomTypeArr[$room_type]."_".$partyInfo["id"],json_encode($redPartyInfo));
             }
 
-
-//                // 发送tcp
-//                $tcpArr = [];
-//                $tcpArr['type'] = "changeRoomHot";
-//                $tcpArr['data'] = [
-//                    'room_id' => $party_id,
-//                    'value' => $party_hot_value,
-//                ];
-//                $tcpJson = json_encode($tcpArr);
-//                $client = stream_socket_client(config("tcp"));
-//                $buffer2 = base64_encode($tcpJson)."****";
-//                fwrite($client, $buffer2);
         }
         return $party_hot_value;
     }
@@ -2167,7 +2156,7 @@ class Party extends Api
         }
 
         //[环信]更新财富榜前3。
-        $easemob = new easemob();
+        $easemob = new Easemob();
         $matedata = [
             'wealth_top3_userlist'  => json_encode($avatarArr),
         ];
@@ -2205,7 +2194,7 @@ class Party extends Api
     private function updateSeatCharm($easemob_room_id,$seatnum,$giftValue,$party_info) {
         //获取已有信息
         $key = 'seat'.$seatnum;
-        $easemob = new easemob();
+        $easemob = new Easemob();
         $seatdata = $easemob->room_getRoomCustomAttribute($easemob_room_id,[$key]);
 
         if(empty($seatdata)){
@@ -2307,7 +2296,7 @@ class Party extends Api
             $this->error();
         }
         $easemob_room_id = $party_info['easemob_room_id'];
-        $easemob = new easemob();
+        $easemob = new Easemob();
 
         $singlist = $easemob->room_getRoomCustomAttribute($easemob_room_id,['waitsing_list']);
         if(empty($singlist)){
@@ -2342,7 +2331,7 @@ class Party extends Api
         $sing_json['sort']    = time();//附加新参数:排序
 
         //获取已有列表
-        $easemob = new easemob();
+        $easemob = new Easemob();
         $singlist = $easemob->room_getRoomCustomAttribute($easemob_room_id,['waitsing_list']);
         if(empty($singlist)){
             //默认为空
@@ -2394,7 +2383,7 @@ class Party extends Api
         $sing_no = input('sing_no','');
 
         //获取已有列表
-        $easemob = new easemob();
+        $easemob = new Easemob();
         $singlist = $easemob->room_getRoomCustomAttribute($easemob_room_id,['waitsing_list']);
         if(empty($singlist)){
             //默认为空
@@ -2436,7 +2425,7 @@ class Party extends Api
         $sing_no = input('sing_no','');
 
         //获取已有列表
-        $easemob = new easemob();
+        $easemob = new Easemob();
         $singlist = $easemob->room_getRoomCustomAttribute($easemob_room_id,['waitsing_list']);
         if(empty($singlist)){
             //默认为空
@@ -2477,7 +2466,7 @@ class Party extends Api
         exit;
         $ids = Db::name('party')->select();
 
-        $easemob = new easemob();
+        $easemob = new Easemob();
         foreach($ids as $key => $party){
 
             //[环信]初始化房间