From a9bec3b019e1a2c1f6c3709d5556c4041af09a72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=BB=E6=AC=A2?= Date: Fri, 18 Apr 2025 10:09:23 +0800 Subject: [PATCH] =?UTF-8?q?:fire:=20=E7=A7=BB=E9=99=A4=E5=8F=91=E9=80=81?= =?UTF-8?q?=E5=A5=BD=E5=8F=8B=E8=AF=B7=E6=B1=82=E6=8E=A5=E5=8F=A3=E5=8F=8A?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- friend/api.go | 9 ++++----- friend/impl.go | 30 ------------------------------ 2 files changed, 4 insertions(+), 35 deletions(-) diff --git a/friend/api.go b/friend/api.go index 73161b4..ebdcc10 100644 --- a/friend/api.go +++ b/friend/api.go @@ -3,11 +3,10 @@ package friend import "github.com/go-resty/resty/v2" type API interface { - SendFriendRequest(scene int, v1, v2, verifyContent string) (username string, err error) // 发送好友请求 - AcceptFriend(scene int, v1, v2 string) (err error) // 接受好友请求 - GetContact(wxIds []string) (contactList []ContactListItem, err error) // 通过wxid获取联系人详情 - GetContractDetail(wxIds []string) (contactList []ContactListItem, err error) // 获取联系人详情 - GetContractList(clearSystemAccount bool) (wxIds []string, err error) // 获取联系人列表 + AcceptFriend(scene int, v1, v2 string) (err error) // 接受好友请求 + GetContact(wxIds []string) (contactList []ContactListItem, err error) // 通过wxid获取联系人详情 + GetContractDetail(wxIds []string) (contactList []ContactListItem, err error) // 获取联系人详情 + GetContractList(clearSystemAccount bool) (wxIds []string, err error) // 获取联系人列表 } type service struct { diff --git a/friend/impl.go b/friend/impl.go index 7a751c9..8f6899c 100644 --- a/friend/impl.go +++ b/friend/impl.go @@ -7,36 +7,6 @@ import ( "strings" ) -// SendFriendRequest -// @description: 发送好友请求 -// @receiver s -// @param scene -// @param v1 -// @param v2 -// @param verifyContent -// @return username -// @return err -func (s service) SendFriendRequest(scene int, v1, v2, verifyContent string) (username string, err error) { - if err = base.PreCheck(s.wxId); err != nil { - return - } - - var result base.Response[base.EmptyResponse] - _, err = s.client.R(). - SetResult(&result). - SetBody(map[string]any{ - "Wxid": s.wxId, - "Scene": scene, - "V1": v1, - "V2": v2, - "VerifyContent": verifyContent, - }).Post("/SendFriendRequest") - if err = result.CheckError(err); err != nil { - return - } - return -} - // AcceptFriend // @description: 接受好友请求 // @receiver s