Browse Source

动态列表不显示

zhangxiaobin 1 year ago
parent
commit
8dd1a8f631
2 changed files with 31 additions and 0 deletions
  1. 28 0
      application/api/controller/Tenim.php
  2. 3 0
      application/api/controller/Topicdongtai.php

+ 28 - 0
application/api/controller/Tenim.php

@@ -1062,4 +1062,32 @@ exit;
         $result = $memberList;
         $this->success('操作成功',$result);
     }
+
+    /**
+     * 获取房间用户
+     */
+    public function getGroupAttr() {
+        $partyId = $this->request->param('party_id','');
+        if (!empty($partyIds)) {
+            $this->error('参数错误');
+        }
+        $random = rand(10000000,99999999);
+        $usersig = $this->usersig("administrator");
+        // 获取配置信息
+        $config = config("tencent_im");
+        $url = "https://console.tim.qq.com/v4/group_open_attr_http_svc/get_group_attr";
+        $url .= "?sdkappid=".$config["sdkappid"];
+        $url .= "&identifier=administrator";
+        $url .= "&usersig=".$usersig;
+        $url .= "&random=".$random;
+        $url .= "&contenttype=json";
+        $tencentObj = new tencentim($url);
+
+        $result = [];
+        if(!empty($partyId)) {
+            $data["GroupId"] = $partyId;
+            $result = $tencentObj->toSend($data);
+        }
+        $this->success('操作成功',$result);
+    }
 }

+ 3 - 0
application/api/controller/Topicdongtai.php

@@ -51,6 +51,9 @@ class Topicdongtai extends Api
     public function my_lists(){
 
         $uid = input('uid',$this->auth->id);
+        if (empty($uid)) {
+            $uid = $this->auth->id;
+        }
         $list = Db::name('topic_dongtai')->alias('dt')
             ->join('user','dt.user_id = user.id','LEFT')
             ->join('topic_hub topic','dt.topic_id = topic.id','LEFT')