浏览代码

派对,重建

lizhen_gitee 1 年之前
父节点
当前提交
c07076bfc2
共有 1 个文件被更改,包括 2 次插入47 次删除
  1. 2 47
      application/admin/controller/party/Party.php

+ 2 - 47
application/admin/controller/party/Party.php

@@ -3,8 +3,6 @@
 namespace app\admin\controller\party;
 
 use app\common\controller\Backend;
-use tencentim\tencentim;
-use getusersig\getusersig;
 use think\Db;
 use Redis;
 /**
@@ -175,53 +173,10 @@ class Party extends Backend
      * 踢出房间内所有用户
      */
     private function outMemberFromRoom($party_id) {
-        if($party_id <= 0) return false;
-        $message = [];
-        $message["type"] = "91";
-        $message["content"] = "房间已被管理员关闭!详情请联系客服!";
-
-        $msgData = [];
-        $msgData["version"] = "1.0";
-        $msgData["action"] = 301;
-        $msgData["command"] = "";
-        $msgData["message"] = json_encode($message);
-
-
-        $random = rand(10000000,99999999);
-        $usersig = $this->usersig("administrator");
-        // 获取配置信息
-        $config = config("tencent_im");
-        $url = "https://console.tim.qq.com/v4/group_open_http_svc/send_group_msg";
-        $url .= "?sdkappid=".$config["sdkappid"];
-        $url .= "&identifier=administrator";
-        $url .= "&usersig=".$usersig;
-        $url .= "&random=".$random;
-        $url .= "&contenttype=json";
-        $tencentObj = new tencentim($url);
-
-        $data = [];
-        $data["GroupId"] = $party_id;
-        $data["Random"] = rand(1000000,9999999);
-
-        $data["MsgBody"][] = [
-            "MsgType" => "TIMCustomElem",
-            "MsgContent" => [
-                "Data"=> json_encode($msgData)
-            ],
-        ];
-        $tencentObj->toSend($data);
-    }
 
-    /**
-     * 获取usersig签名-具体操作
-     */
-    private function usersig($user_id) {
-        // 获取配置信息
-        $config = config("tencent_im");
-        $usersigObj = new getusersig($config["sdkappid"],$config["key"]);
-        $usersig = $usersigObj->genUserSig($user_id);
-        return $usersig;
     }
 
 
+
+
 }