浏览代码

创建房间类型调整

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

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

@@ -39,6 +39,7 @@ class Party extends Common
 
         $user_id = $this->auth->id;
         // 开直播时,判断当前用户是否为主播
+        $anchorInfo = [];
         if($room_type == 2) {
             $anchorInfo = \app\common\model\UserAnchor::where(["user_id"=>$user_id])->find();
 
@@ -99,7 +100,7 @@ class Party extends Common
 
             $party_name = $this->auth->u_id."的房间"; // 派对名称
             $party_logo = "/assets/api/party_logo.png"; // 派对logo
-            $party_type = 0; // 派对类型(情感互动,心动点单 等)
+            $party_type = isset($anchorInfo['party_type_id']) ? $anchorInfo['party_type_id'] : 0; // 派对类型(情感互动,心动点单 等)
             $party_notice = "请编辑房间公告"; // 派对公告
             $party_notice_detail = "请编辑房间公告内容!"; // 派对公告详情
             if (!$party_name || !$party_logo || !$party_notice) {