Bläddra i källkod

房间解散,和h5注册

lizhen_gitee 1 år sedan
förälder
incheckning
15887d140d

+ 11 - 4
application/api/controller/Party.php

@@ -214,15 +214,16 @@ class Party extends Api
             Db::commit();
 
         } else {
-            if($sqlPartyInfo["is_close"] == 1) $this->error("该房间已被关闭!");
+            //if($sqlPartyInfo["is_close"] == 1) $this->error("该房间已被关闭!");
 
             // 如果是房主并且房间处于离线状态下激活
-            if ($sqlPartyInfo['user_id'] != $user_id) {
+            /*if ($sqlPartyInfo['user_id'] != $user_id) {
                 $this->error("当前直播已结束!");
-            }
+            }*/
 
             $partyInfo = $sqlPartyInfo;
             $partyInfo["is_new"] = 0;
+            $partyInfo["status"] = 1;
             //naming avatar type_name
 
             if(empty($sqlPartyInfo['easemob_room_id'])){
@@ -369,6 +370,11 @@ class Party extends Api
             $this->error('房主才能解散');
         }
 
+        //房间从首页列表消失
+        $update = [
+            'status' => 3,
+        ];
+        Db::name('party')->where('id',$party_id)->update($update);
 
         //用户魅力榜,清空
         $this->redis->zRemRangeByRank("hourCharm_".$party_id, 0,-1);
@@ -769,7 +775,8 @@ class Party extends Api
         if($partyInfo) {
             $partyInfo = json_decode($partyInfo,true);
 
-            if($partyInfo["is_close"] == 1) $this->error("该房间已被关闭!");
+            if($partyInfo["status"] != 1) $this->error("该房间已被解散!");
+//            if($partyInfo["is_close"] == 1) $this->error("该房间已被关闭!");
             //if($partyInfo["status"] != 1) $this->error("该房间为预创建房间,请联系管理员正式开通!");
             $partyManage = $this->redis->hGet("party_manage_".$party_id,$user_id."-1");
             if(isset($partyInfo["party_pass"]) && $partyInfo["party_pass"] && $partyInfo["user_id"] != $user_id && empty($partyManage)) {

+ 7 - 1
application/api/controller/Userintro.php

@@ -29,10 +29,16 @@ class Userintro extends Api
     public function haibao($player_id,$data){
 
         //下载页二维码,没必要保留
-        $httpStr = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'];
+        /*$httpStr = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'];
         $params = [
             'text' => $httpStr.'/index/index/appdownload?code=' . $data['invite_no'],
+        ];*/
+
+        $httpStr = config('h5register_url');
+        $params = [
+            'text' => $httpStr . $data['invite_no'],
         ];
+
         $qrCode = \addons\qrcode\library\Service::qrcode($params);
         $qrcode_path = 'uploads/hbplayer/'.date('Ymd');
         mk_dir($qrcode_path);

+ 1 - 0
application/config.php

@@ -391,6 +391,7 @@ return [
 
     //支付宝账号,海知伴,仅用来备份
     'pay_notify_url' => 'https://kge.huxiukeji.cn',
+    'h5register_url' => 'https://kgeweb.huxiukeji.cn/?invite_no=',
     'alipay' => [
         //appid
         'app_id'   => '2021004127617098',