|
@@ -492,7 +492,7 @@ class Party extends Common
|
|
|
*/
|
|
|
public function joinParty() {
|
|
|
$party_id = $this->request->request('party_id',0,"intval"); // 直播间ID 逻辑ID
|
|
|
- $room_type = 1;
|
|
|
+ $room_type = $this->request->request('room_type',1); // 房间类型:1=派对2=直播
|
|
|
$party_pass = $this->request->request("party_pass");//
|
|
|
if (!$party_id || !in_array($room_type,[1,2])) {
|
|
|
$this->error(__('Invalid parameters'));
|
|
@@ -523,6 +523,7 @@ class Party extends Common
|
|
|
// 判断当前用户是否被该房间设置限制 //项目:1=房管,2=禁言,3=拉黑,4=踢出
|
|
|
$lsetList = [];
|
|
|
|
|
|
+ if($room_type == 1){
|
|
|
for($i=1;$i<=4;$i++) {
|
|
|
$hgetlist = $redis->hGet("party_manage_".$party_id,$user_id."-".$i);
|
|
|
|
|
@@ -546,6 +547,7 @@ class Party extends Common
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
// 判断派对密码
|
|
|
$partyInfo = $redis->get($this->roomTypeArr[$room_type]."_".$party_id);
|
|
@@ -556,21 +558,21 @@ class Party extends Common
|
|
|
if($partyInfo["is_close"] == 1) $this->error("该房间已被关闭!");
|
|
|
// if($partyInfo["status"] != 1) $this->error("该房间为预创建房间,请联系管理员正式开通!");
|
|
|
|
|
|
- if(isset($partyInfo["party_pass"]) && $partyInfo["party_pass"] && $partyInfo["user_id"] != $user_id) {
|
|
|
+ if(isset($partyInfo["party_pass"]) && $partyInfo["party_pass"] && $partyInfo["user_id"] != $user_id && $room_type == 1) {
|
|
|
if(($party_pass != $partyInfo["party_pass"] || strlen($party_pass) != 4)) {
|
|
|
$this->error("派对密码不正确!");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// 公会管理员和工会长激活派对厅
|
|
|
- $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 && $partyInfo['is_online'] == 0) {
|
|
|
$this->error("当前直播已结束!");
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
// // 如果是房主自己进入房间,则更新用户 为在线状态
|
|
|
// if ($partyInfo["user_id"] == $user_id) {
|
|
|
// if ($room_type == 2)
|
|
@@ -1080,7 +1082,7 @@ class Party extends Common
|
|
|
*/
|
|
|
public function savePartyNotice() {
|
|
|
$party_id = $this->request->request('party_id',0,"intval"); // 直播间ID
|
|
|
- $room_type = 1; // 房间类型:1=派对2=直播
|
|
|
+ $room_type = $this->request->request('room_type',1); // 房间类型:1=派对2=直播
|
|
|
$party_notice = $this->request->request('party_notice'); // 公告标题
|
|
|
$party_notice_detail = $this->request->request('party_notice_detail'); // 公告内容
|
|
|
if (!$party_id || !$party_notice || !$party_notice_detail) {
|