package workwechat //消息推送 touser,toparty,totag这三个参数在实际应用中必有一个不为空 /* 发送文本消息 */ type SentMessage struct { MessageMain TemplateCard TemplateCardMsgCont `json:"template_card"` //模板卡片消息 参数 } /* 更新文本信息 */ type UpdateMessage struct { UpdatePublic TemplateCard UpdateTemplateCardMsgCont `json:"template_card"` //模板卡片消息 参数 } //更新文本信息模板 type UpdateTemplateCardMsgCont struct { UpdateTemplateCardPublic UpdateTextImgButton subTitleText EmphasisContent EmphasisContentInfo `json:"emphasis_content"` //关键数据样式 JumpList []JumpListCont `json:"jump_list"` //跳转指引样式的列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过3 } //发送文本信息 type TemplateCardMsgCont struct { TemplateCardCont ActionMenu ActionMenuCont `json:"action_menu"` //卡片右上角更多操作按钮 EmphasisContent EmphasisContentInfo `json:"emphasis_content"` //关键数据样式 subTitleText //二级普通文本,建议不超过160个字,(支持id转译) JumpList []JumpListCont `json:"jump_list"` //跳转指引样式的列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过3 } /* 发送图文信息 */ type SentImagesMessage struct { MessageMain TemplateCard TemplateCardImgCont `json:"template_card"` //模板卡片消息 参数 } //发送图文主体 type TemplateCardImgCont struct { TemplateCardCont action_menu ActionMenuCont `json:"action_menu"` //卡片右上角更多操作按钮 ImageTextArea ImageTextAreaCont `json:"image_text_area"` //左图右文样式,news_notice类型的卡片,card_image和image_text_area两者必填一个字段,不可都不填 CardImage CardImageCont `json:"card_image"` //图片样式,news_notice类型的卡片,card_image和image_text_area两者必填一个字段,不可都不填 VerticalContentList []VerticalContentListCont `json:"vertical_content_list"` //卡片二级垂直内容,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过4 JumpList JumpListCont `json:"jump_list"` //跳转指引样式的列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过3 } /* 更新图文信息 */ type UpdateMessageImg struct { UpdatePublic TemplateCard UpdateTemplateCardMsgContImg `json:"template_card"` //模板卡片消息 参数 } //更新图文信息模板 type UpdateTemplateCardMsgContImg struct { UpdateTemplateCardPublic UpdateTextImgButton ImageTextArea ImageTextAreaCont `json:"image_text_area"` CardImage CardImageCont `json:"card_image"` VerticalContentList []VerticalContentListCont `json:"vertical_content_list"` JumpList []JumpListCont `json:"jump_list"` //跳转指引样式的列表,该字段可为空数组,但有数据的话需确认对应字段是否必填,列表长度不超过3 } /* 发送按钮信息 */ type SentButtonMessage struct { MessageMain TemplateCard TemplateCardButCont `json:"template_card"` //模板卡片消息 参数 } //发送按钮主体 type TemplateCardButCont struct { TemplateCardCont action_menu ActionMenuCont `json:"action_menu"` //卡片右上角更多操作按钮 subTitleText ButtonSelection ButtonSelectionCont `json:"button_selection"` //按钮型卡片的下拉框样式 ButtonList []ButtonListCont `json:"button_list"` //按钮列表,列表长度不超过6 } /* 发送多项选择信息 */ type SentMultipleMessage struct { MessageMain TemplateCard TemplateCardMultiple `json:"template_card"` //模板卡片消息 参数 } //发送多项选择主体 type TemplateCardMultiple struct { TemplatePublic action_menu ActionMenuCont `json:"action_menu"` //卡片右上角更多操作按钮 SelectList []SelectListCont `json:"select_list"` //下拉式的选择器列表,multiple_interaction类型的卡片该字段不可为空,一个消息最多支持 3 个选择器 SubmitButton SubmitButtonCont `json:"submit_button"` //提交按钮样式 } /* 更多选项文信息 */ type UpdateMessageMult struct { UpdatePublic TemplateCard UpdateTemplateCardMsgContMult `json:"template_card"` //模板卡片消息 参数 } //更多选项文信息模板 type UpdateTemplateCardMsgContMult struct { UpdateTemplateCardPublic SelectList []SelectListCont `json:"select_list"` //下拉式的选择器列表,multiple_interaction类型的卡片该字段不可为空,一个消息最多支持 3 个选择器 SubmitButton SubmitButtonCont `json:"submit_button"` //提交按钮样式 ReplaceTextInfo } /* 发送投票选择信息 */ type SentVoteMessage struct { MessageMain TemplateCard TemplateCardVote `json:"template_card"` //模板卡片消息 参数 } //发送投票选择主体 type TemplateCardVote struct { TemplatePublic CheckBox CheckBoxCont `json:"checkbox"` // SubmitButton SubmitButtonCont `json:"submit_button"` //提交按钮样式 } /* 更新投票项文信息 */ type UpdateMessageVote struct { UpdatePublic TemplateCard UpdateTemplateCardMsgContVote `json:"template_card"` //模板卡片消息 参数 } //更新投票项文信息模板 type UpdateTemplateCardMsgContVote struct { UpdateTemplateCardPublic CheckBox CheckBoxCont `json:"checkbox"` // SubmitButton SubmitButtonCont `json:"submit_button"` //提交按钮样式 }