mirror of
https://github.com/silenceper/wechat.git
synced 2026-02-10 15:52:26 +08:00
企业微信内部开发API:消息推送与接收,以及回调处理
This commit is contained in:
30
work/message/template_card.go
Normal file
30
work/message/template_card.go
Normal file
@@ -0,0 +1,30 @@
|
||||
package message
|
||||
|
||||
//UpdateButton 模板卡片按钮
|
||||
type UpdateButton struct {
|
||||
CommonToken `json:"-"`
|
||||
Button struct {
|
||||
ReplaceName string `xml:"ReplaceName" json:"replace_name"`
|
||||
} `xml:"Button" json:"button"`
|
||||
}
|
||||
|
||||
//NewUpdateButton 更新点击用户的按钮文案
|
||||
func NewUpdateButton(replaceName string) *UpdateButton {
|
||||
btn := new(UpdateButton)
|
||||
btn.Button.ReplaceName = replaceName
|
||||
return btn
|
||||
}
|
||||
|
||||
//TemplateCard 被动回复模板卡片
|
||||
//https://open.work.weixin.qq.com/api/doc/90000/90135/90241
|
||||
type TemplateCard struct {
|
||||
CommonToken `json:"-"`
|
||||
TemplateCard interface{} `xml:"TemplateCard" json:"template_card"`
|
||||
}
|
||||
|
||||
// NewTemplateCard 更新点击用户的整张卡片
|
||||
func NewTemplateCard(cardXml interface{}) *TemplateCard {
|
||||
card := new(TemplateCard)
|
||||
card.TemplateCard = cardXml
|
||||
return card
|
||||
}
|
||||
Reference in New Issue
Block a user