@@ -14,7 +14,7 @@ const (
1414 MsgTypeMPNews core.MsgType = "mpnews" // 图文消息, 发送已经创建好的图文
1515 MsgTypeWxCard core.MsgType = "wxcard" // 卡卷消息
1616 MsgTypeWxMiniLink core.MsgType = "link" // 小程序客服消息:图文链接
17- MsgTypeWxMiniPage core.MsgType = "miniprogrampage" // 小程序客服消息:图文链接
17+ MsgTypeWxMiniPage core.MsgType = "miniprogrampage" // 小程序客服消息:小程序卡片
1818)
1919
2020type MsgHeader struct {
@@ -309,13 +309,14 @@ type WxMiniPage struct {
309309 MsgHeader
310310 MiniProgramPage struct {
311311 Title string `json:"title"`
312+ AppId string `json:"appid"`
312313 PagePath string `json:"pagepath"`
313314 ThumbMediaId string `json:"thumb_media_id"`
314315 } `json:"miniprogrampage"`
315316 CustomService * CustomService `json:"customservice,omitempty"`
316317}
317318
318- func NewMiniPage (toUser , title , pagePath , thumbMediaId , kfAccount string ) (page * WxMiniPage ) {
319+ func NewMiniPage (toUser , title , appId , pagePath , thumbMediaId , kfAccount string ) (page * WxMiniPage ) {
319320 page = & WxMiniPage {
320321 MsgHeader : MsgHeader {
321322 ToUser : toUser ,
@@ -324,6 +325,7 @@ func NewMiniPage(toUser, title, pagePath, thumbMediaId, kfAccount string) (page
324325 }
325326
326327 page .MiniProgramPage .Title = title
328+ page .MiniProgramPage .AppId = appId
327329 page .MiniProgramPage .PagePath = pagePath
328330 page .MiniProgramPage .ThumbMediaId = thumbMediaId
329331 if kfAccount != "" {
0 commit comments