|
@@ -306,10 +306,6 @@ class Party extends Common
|
|
|
}
|
|
|
|
|
|
//[环信]初始化房间
|
|
|
- $online_user_num = [
|
|
|
- 'online_num' => 0,
|
|
|
- 'user_list' => [],
|
|
|
- ];
|
|
|
$matedata = [
|
|
|
'seatnum'=> $seatnum,//麦位数量
|
|
|
'waitsing_list' => json_encode([]),//已点歌曲列表
|
|
@@ -317,7 +313,8 @@ class Party extends Common
|
|
|
'party_logo' => $party_logo,//logo
|
|
|
'is_public' => $is_public,//是否公开
|
|
|
'room_type' => $room_type,//房间类型
|
|
|
- 'online_user_num' => json_encode($online_user_num),//当前房间在线的人
|
|
|
+ 'online_user_num' => 0,//当前房间在线的人
|
|
|
+ 'wealth_top3_userlist' => json_encode([]),//财富榜前3个人列表
|
|
|
];
|
|
|
$rs = $easemob->room_setRoomCustomAttributeForced($easemob_room_id,$this->auth->id,$matedata);
|
|
|
|
|
@@ -430,14 +427,9 @@ class Party extends Common
|
|
|
if(!empty($easemob_room_id)){
|
|
|
|
|
|
//重置自定义属性
|
|
|
- $online_user_num = [
|
|
|
- 'online_num' => 0,
|
|
|
- 'user_list' => [],
|
|
|
- ];
|
|
|
-
|
|
|
$matedata = [
|
|
|
'waitsing_list' => json_encode([]),//清空房间待唱列表
|
|
|
- 'online_user_num' => json_encode($online_user_num),//当前房间在线的人
|
|
|
+ 'online_user_num' => 0,//当前房间在线的人
|
|
|
];
|
|
|
$easemob = new easemob();
|
|
|
$easemob->room_setRoomCustomAttributeForced($partyInfo['easemob_room_id'],$partyInfo['user_id'],$matedata);
|
|
@@ -829,14 +821,14 @@ class Party extends Common
|
|
|
}
|
|
|
|
|
|
// 公会管理员和工会长激活派对厅
|
|
|
- $guildInfo = \app\common\model\Guild::where(['user_id' => $partyInfo['user_id'], 'status' => 1])->find();
|
|
|
+ /* $guildInfo = \app\common\model\Guild::where(['user_id' => $partyInfo['user_id'], 'status' => 1])->find();
|
|
|
if ($guildInfo) {
|
|
|
// 获取公会管理员
|
|
|
$guildMemberInfo = \app\common\model\GuildMember::where(["user_id" => $user_id, "guild_id" => $guildInfo['id'], 'status' => 1])->find();
|
|
|
- if ($guildMemberInfo && $guildMemberInfo['role'] == 0) {
|
|
|
+ if ($guildMemberInfo && $guildMemberInfo['role'] == 0 && $partyInfo['is_online'] == 0) {
|
|
|
//$this->error("当前直播已结束!");//这种情况理论上不存在
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
// // 如果是房主自己进入房间,则更新用户 为在线状态
|
|
|
// if ($partyInfo["user_id"] == $user_id) {
|
|
|
// if ($room_type == 2)
|
|
@@ -885,6 +877,8 @@ class Party extends Common
|
|
|
//声网三个token
|
|
|
$lsetList['shengwang_token'] = $this->shengwang_token($partyInfo['easemob_room_id'],1);
|
|
|
|
|
|
+ //更新聊天室自定义属性 用户列表
|
|
|
+
|
|
|
return $this->success("加入成功!",$lsetList);
|
|
|
}
|
|
|
|
|
@@ -2511,10 +2505,6 @@ class Party extends Common
|
|
|
foreach($ids as $key => $party){
|
|
|
|
|
|
//[环信]初始化房间
|
|
|
- $online_user_num = [
|
|
|
- 'online_num' => 0,
|
|
|
- 'user_list' => [],
|
|
|
- ];
|
|
|
$matedata = [
|
|
|
'seatnum'=> $party['seatnum'],//麦位数量
|
|
|
'waitsing_list' => json_encode([]),//已点歌曲列表
|
|
@@ -2523,6 +2513,7 @@ class Party extends Common
|
|
|
'is_public' => $party['is_public'],//是否公开
|
|
|
'room_type' => $party['room_type'],//房间类型
|
|
|
'online_user_num' => json_encode($online_user_num),//当前房间在线的人
|
|
|
+ 'wealth_top3_userlist' => json_encode([]),//财富榜前3个人列表
|
|
|
];
|
|
|
$rs = $easemob->room_setRoomCustomAttributeForced($party['easemob_room_id'],$party['user_id'],$matedata);
|
|
|
|