Browse Source

初始化房间自定义信息

lizhen_gitee 1 year ago
parent
commit
c0c9c587f3
2 changed files with 52 additions and 9 deletions
  1. 6 9
      application/api/controller/Party.php
  2. 46 0
      public/gitpull.php

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

@@ -147,15 +147,12 @@ class Party extends Common
 
             //[环信]初始化房间
             $matedata = [
-                //麦位数量
-                'seatnum'=> $seatnum,
-                //已点歌曲列表
-                'waitsing_list'  => json_encode([]),
-                //房名字、logo
-                'party_name' => $party_name,
-                'party_logo' => $party_logo,
-                'is_public'  => $is_public,
-                'room_type'  => $room_type,
+                'seatnum'=> $seatnum,//麦位数量
+                'waitsing_list'  => json_encode([]),//已点歌曲列表
+                'party_name' => $party_name,//房名字
+                'party_logo' => $party_logo,//logo
+                'is_public'  => $is_public,//是否公开
+                'room_type'  => $room_type,//房间类型
             ];
             $rs = $easemob->room_setRoomCustomAttributeForced($easemob_room_id,$this->auth->id,$matedata);
 

+ 46 - 0
public/gitpull.php

@@ -0,0 +1,46 @@
+<?php
+/**
+ * Created by lizhen.
+ */
+$root_path = dirname(__DIR__);
+chdir($root_path);
+//////////////////////////////////////
+$cmd = 'sudo -uroot git reset --hard';
+$result = [];
+exec($cmd, $result);
+$str = '';
+foreach ($result as $k => $v)
+{
+    $str .= $k.' : '.$v."\n";
+}
+echo $str;
+/////////////////////////////////////
+$cmd = 'sudo -uroot git pull;';
+$result = [];
+exec($cmd, $result);
+$str = '';
+foreach ($result as $k => $v)
+{
+    $str .= $k.' : '.$v."\n";
+}
+echo $str;
+//////////////////////////////////////////////////
+$cmd = 'sudo -uroot chown -R www:www '.$root_path;
+$result = [];
+exec($cmd, $result);
+$str = '';
+foreach ($result as $k => $v)
+{
+    $str .= $k.' : '.$v."\n";
+}
+echo $str;
+//////////////////////////////////////////////////
+$cmd = "sudo -uroot chmod -R 777 *";
+$result = [];
+exec($cmd, $result);
+$str = '';
+foreach ($result as $k => $v)
+{
+    $str .= $k.' : '.$v."\n";
+}
+echo $str;