button

package
v0.0.0-...-45be4db Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2021 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Button

type Button struct {
	Name      string   `json:"name"`                 // 菜单标题
	Type      string   `json:"type"`                 // 响应的动作类型
	Key       string   `json:"key,omitempty"`        // 菜单key值,用于消息接口推送
	Url       string   `json:"url,omitempty"`        // 网页链接
	MediaId   string   `json:"media_id,omitempty"`   // 调用新增永久素材接口返回的合法media_id
	AppId     string   `json:"appid,omitempty"`      // 小程序的appid
	PagePath  string   `json:"pagepath,omitempty"`   // 小程序的页面路径
	SubButton []Button `json:"sub_button,omitempty"` // 二级菜单,数量为0~5个
}

func Click

func Click(name, key string) *Button

Click 创建click按钮

func JsonToButton

func JsonToButton(st string) (*Button, error)

func LocationSelect

func LocationSelect(name, key string) *Button

func MediaId

func MediaId(name, mediaid string) *Button

MediaId 图片

func MiniProgram

func MiniProgram(name, url, appid, pagepath string) *Button

MiniProgram 创建小程序按钮

func PicSysPhoto

func PicSysPhoto(name, key string) *Button

func PicWeiXin

func PicWeiXin(name, key string) *Button

func ScanCodePush

func ScanCodePush(name, key string) *Button

ScanCodePush 创建scancode_push按钮

func ScanCodeWaitMsg

func ScanCodeWaitMsg(name, key string) *Button

ScanCodeWaitMsg 创建scancode_waitmsg按钮

func View

func View(name, url string) *Button

View 创建view按钮

func ViewLimited

func ViewLimited(name, mediaid string) *Button

ViewLimited 图文消息

type MatchRule

type MatchRule struct {
	TagId              string `json:"tag_id,omitempty"`               // 用户标签,可以通过用户标签接口获取
	Sex                string `json:"sex,omitempty"`                  // 性别
	ClientPlatformType string `json:"client_platform_type,omitempty"` // 客户端版本
	Country            string `json:"country,omitempty"`
	Province           string `json:"province,omitempty"`
	City               string `json:"city,omitempty"`
	Language           string `json:"language,omitempty"`
}

MatchRule 是个性化中的匹配规则

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL