Compare commits
No commits in common. "master" and "v0.0.3" have entirely different histories.
23
client.go
23
client.go
@ -324,26 +324,3 @@ func (w *WxHelper) GetChatRoomMember(param ChatRoomId) (members *ChatRoomMembers
|
|||||||
_ = json.Unmarshal(data, &members)
|
_ = json.Unmarshal(data, &members)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetChatRoomMemberProfile
|
|
||||||
// @description: 获取群成员详细信息
|
|
||||||
// @receiver w
|
|
||||||
// @return memberProfile
|
|
||||||
// @return err
|
|
||||||
func (w *WxHelper) GetChatRoomMemberProfile(param WxId) (memberProfile *ChatRoomMemberProfile, err error) {
|
|
||||||
req := w.client.R()
|
|
||||||
req.Header.Set("Content-Type", "application/json")
|
|
||||||
req.SetBody(param)
|
|
||||||
_, err = req.SetResult(&w.tmpResult).Post(w.GetAddr("/api/getContactProfile"))
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("获取群成员详细信息失败: %v", err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
if w.tmpResult.Code <= 0 {
|
|
||||||
return nil, fmt.Errorf("获取群成员详细信息失败: %v", w.tmpResult.Msg)
|
|
||||||
}
|
|
||||||
|
|
||||||
data, _ := json.Marshal(w.tmpResult.Data)
|
|
||||||
_ = json.Unmarshal(data, &memberProfile)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
@ -58,9 +58,3 @@ type ForwardMsg struct {
|
|||||||
Wxid string `json:"wxid"`
|
Wxid string `json:"wxid"`
|
||||||
MsgId string `json:"msgId"`
|
MsgId string `json:"msgId"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// WxId
|
|
||||||
// @description: 微信ID
|
|
||||||
type WxId struct {
|
|
||||||
WxId string `json:"wxId"`
|
|
||||||
}
|
|
||||||
|
15
response.go
15
response.go
@ -85,18 +85,3 @@ func (r *ChatRoomMembers) String() string {
|
|||||||
data, _ := json.Marshal(r)
|
data, _ := json.Marshal(r)
|
||||||
return string(data)
|
return string(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ChatRoomMemberProfile
|
|
||||||
// @description: 获取群成员详细信息
|
|
||||||
type ChatRoomMemberProfile struct {
|
|
||||||
Account string `json:"account"`
|
|
||||||
HeadImage string `json:"headImage"`
|
|
||||||
Nickname string `json:"nickname"`
|
|
||||||
V3 string `json:"v3"`
|
|
||||||
Wxid string `json:"wxid"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (r *ChatRoomMemberProfile) String() string {
|
|
||||||
data, _ := json.Marshal(r)
|
|
||||||
return string(data)
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user