Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetQRByParam ¶
func GetQRByParam(args *ArgsGetQRByParam) (resData []byte, err error)
Types ¶
type ArgsGetQRByParam ¶
type ArgsGetQRByParam struct {
//商户ID
// 可以留空,则走平台微信小程序主体
MerchantID int64
//页面地址
// eg: pages/index
Page string
//附加参数
Param string
//宽度
// eg: 430
Width int
//是否需要透明底色
IsHyaline bool
//自动配置线条颜色
// 为 false 时生效, 使用 rgb 设置颜色 十进制表示
AutoColor bool
//色调
// 50
R string
G string
B string
}
生成二维码 带参数
type QRCoder ¶
type QRCoder struct {
Page string `json:"page,omitempty"`
// path 识别二维码后进入小程序的页面链接
Path string `json:"path,omitempty"`
// width 图片宽度
Width int `json:"width,omitempty"`
// scene 参数数据
Scene string `json:"scene,omitempty"`
// autoColor 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调
AutoColor bool `json:"auto_color,omitempty"`
// lineColor AutoColor 为 false 时生效,使用 rgb 设置颜色 例如 {"r":"xxx","g":"xxx","b":"xxx"},十进制表示
LineColor Color `json:"line_color,omitempty"`
// isHyaline 是否需要透明底色
IsHyaline bool `json:"is_hyaline,omitempty"`
}
QRCoder 小程序码参数
func (QRCoder) AppCode ¶
func (code QRCoder) AppCode(client *BaseWeixinWXXClient.ClientType) (*http.Response, error)
AppCode 获取小程序码 可接受path参数较长 生成个数受限 永久有效 适用于需要的码数量较少的业务场景
@token 微信access_token
func (QRCoder) QRCode ¶
func (code QRCoder) QRCode(client *BaseWeixinWXXClient.ClientType) (res *http.Response, err error)
QRCode 获取小程序二维码 可接受path参数较长,生成个数受限 永久有效 适用于需要的码数量较少的业务场景
@token 微信access_token
func (QRCoder) UnlimitedAppCode ¶
func (code QRCoder) UnlimitedAppCode(client *BaseWeixinWXXClient.ClientType) (*http.Response, error)
UnlimitedAppCode 获取小程序码 可接受页面参数较短 生成个数不受限 适用于需要的码数量极多的业务场景 根路径前不要填加'/' 不能携带参数(参数请放在scene字段里)
@token 微信access_token
Click to show internal directories.
Click to hide internal directories.