Documentation ¶
Overview ¶
Package template 模版消息
Index ¶
- func Add(id, token string, keywordIDList []uint) (string, error)
- func Delete(id, token string) error
- func Send(openid, template, page, formID string, data Message, ...) error
- type Data
- type Keyword
- type KeywordItem
- type MPTemplateMsg
- type Message
- type Miniprogram
- type Template
- type Templates
- type UniformMsg
- type WeappTemplateMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add 组合模板并添加至帐号下的个人模板库
@id 模板ID @token 微信 aceess_token @keywordIDList 关键词 ID 列表 返回新建模板ID和错误信息
Types ¶
type KeywordItem ¶
type KeywordItem struct { KeywordID uint `json:"keyword_id"` Name string `json:"name"` Example string `json:"example"` }
KeywordItem 关键字
func Get ¶
func Get(id, token string) (keywords []KeywordItem, err error)
Get 获取模板库某个模板标题下关键词库
@id 模板ID @token 微信 access_token
type MPTemplateMsg ¶
type MPTemplateMsg struct { AppID string `json:"appid"` TemplateID string `json:"template_id"` URL string `json:"url"` Miniprogram Miniprogram `json:"miniprogram"` Data map[string]Keyword `json:"data"` }
MPTemplateMsg 公众号模板消息
type Miniprogram ¶
Miniprogram 小程序
type Template ¶
type Template struct { weapp.Response ID string `json:"id,omitempty"` TemplateID string `json:"template_id,omitempty"` Title string `json:"title"` Content string `json:"content,omitempty"` Example string `json:"example,omitempty"` KeywordList []KeywordItem `json:"keyword_list,omitempty"` }
Template 消息模板
type Templates ¶
type Templates struct { weapp.Response List []Template `json:"list"` TotalCount uint `json:"total_count"` }
Templates 获取模板列表返回的数据
type UniformMsg ¶
type UniformMsg struct { ToUser string `json:"touser"` // 用户 openid MPTemplateMsg MPTemplateMsg `json:"mp_template_msg"` WeappTemplateMsg WeappTemplateMsg `json:"weapp_template_msg"` }
UniformMsg 统一服务消息
func (UniformMsg) Send ¶
func (msg UniformMsg) Send(token string) error
Send 统一服务消息
@token access_token
Click to show internal directories.
Click to hide internal directories.