This commit is contained in:
2025-03-22 22:46:52 +08:00
parent e58dd8acb5
commit acc513a33d
32 changed files with 248 additions and 76 deletions

View File

@@ -23,22 +23,21 @@ class GechatroomLogic extends BaseLogic
*/
function getChatroomList()
{
$this->getChatroomMemberList();die;
//$this->getChatroomMemberList();die;
//去查询群名称
$wxids_arr = (new GewechatFriendsLogic())->getFriendWxIdsList();
$chatrooms = $wxids_arr['data']['chatrooms'];
dump($chatrooms);
$url = '/group/getChatroomInfo';
Tools::log_to_write_txt(['获取群列表[带群名称],包含了群成员列表,入参:$chatrooms'=>$chatrooms]);
$arr = [];
foreach ($chatrooms as $v){
$post_data = ['chatroomId'=>$v];
$res = self::curl_post_json($url, $post_data);
dump($res);die;
//群号=>群信息[含群成员列表]
$arr[$v] = array_merge($res['data'],[
$arr[] = array_merge($res['data'],[
'id'=>$v,
'name'=>$res['data']['nickName']
'name'=>isset($res['data']['nickName'])?$res['data']['nickName']:'null',
'chatroomId'=>$v,
]);
}
Tools::log_to_write_txt(['获取群列表[带群名称],包含了群成员列表,出参:$res'=>count($arr)]);