mirror of
https://github.com/silenceper/wechat.git
synced 2026-02-10 07:42:26 +08:00
小程序码、URL Link 增加参数(#502,#512) (#514)
* 小程序码、URL Link 增加参数(#502,#512) * gofmt
This commit is contained in:
@@ -40,6 +40,8 @@ type QRCoder struct {
|
|||||||
Page string `json:"page,omitempty"`
|
Page string `json:"page,omitempty"`
|
||||||
// path 扫码进入的小程序页面路径
|
// path 扫码进入的小程序页面路径
|
||||||
Path string `json:"path,omitempty"`
|
Path string `json:"path,omitempty"`
|
||||||
|
// checkPath 检查page 是否存在,为 true 时 page 必须是已经发布的小程序存在的页面(否则报错);为 false 时允许小程序未发布或者 page 不存在, 但page 有数量上限(60000个)请勿滥用
|
||||||
|
CheckPath bool `json:"check_path,omitempty"`
|
||||||
// width 图片宽度
|
// width 图片宽度
|
||||||
Width int `json:"width,omitempty"`
|
Width int `json:"width,omitempty"`
|
||||||
// scene 最大32个可见字符,只支持数字,大小写英文以及部分特殊字符:!#$&'()*+,/:;=?@-._~,其它字符请自行编码为合法字符(因不支持%,中文无法使用 urlencode 处理,请使用其他编码方式)
|
// scene 最大32个可见字符,只支持数字,大小写英文以及部分特殊字符:!#$&'()*+,/:;=?@-._~,其它字符请自行编码为合法字符(因不支持%,中文无法使用 urlencode 处理,请使用其他编码方式)
|
||||||
@@ -50,6 +52,8 @@ type QRCoder struct {
|
|||||||
LineColor Color `json:"line_color,omitempty"`
|
LineColor Color `json:"line_color,omitempty"`
|
||||||
// isHyaline 是否需要透明底色
|
// isHyaline 是否需要透明底色
|
||||||
IsHyaline bool `json:"is_hyaline,omitempty"`
|
IsHyaline bool `json:"is_hyaline,omitempty"`
|
||||||
|
// envVersion 要打开的小程序版本。正式版为 "release",体验版为 "trial",开发版为 "develop"
|
||||||
|
EnvVersion string `json:"env_version,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// fetchCode 请求并返回二维码二进制数据
|
// fetchCode 请求并返回二维码二进制数据
|
||||||
|
|||||||
@@ -33,8 +33,10 @@ const (
|
|||||||
// ULParams 请求参数
|
// ULParams 请求参数
|
||||||
// https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/url-link/urllink.generate.html#请求参数
|
// https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/url-link/urllink.generate.html#请求参数
|
||||||
type ULParams struct {
|
type ULParams struct {
|
||||||
Path string `json:"path"`
|
Path string `json:"path"`
|
||||||
Query string `json:"query"`
|
Query string `json:"query"`
|
||||||
|
// envVersion 要打开的小程序版本。正式版为 "release",体验版为 "trial",开发版为 "develop"
|
||||||
|
EnvVersion string `json:"env_version,omitempty"`
|
||||||
IsExpire bool `json:"is_expire"`
|
IsExpire bool `json:"is_expire"`
|
||||||
ExpireType TExpireType `json:"expire_type"`
|
ExpireType TExpireType `json:"expire_type"`
|
||||||
ExpireTime int64 `json:"expire_time"`
|
ExpireTime int64 `json:"expire_time"`
|
||||||
|
|||||||
Reference in New Issue
Block a user