1 Star 1 Fork 0

窦雪峰 / go-utils

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
qrcode.go 1.80 KB
一键复制 编辑 原始数据 按行查看 历史
窦雪峰 提交于 2022-09-20 11:20 . 小程序码
/*
* @Author: i@douxuefeng.cn
* @Date: 2022-08-01 17:34:19
* @LastEditTime: 2022-09-20 11:10:56
* @LastEditors: i@douxuefeng.cn
* @Description:
* @FilePath: /go-utils/wechat/mini/params/qrcode.go
*/
package params
type QrcodeParams struct {
Scene string `json:"scene,omitempty"` //最大32个可见字符,只支持数字,大小写英文以及部分特殊字符:!#$&'()*+,/:;=?@-._~,其它字符请自行编码为合法字符(因不支持%,中文无法使用 urlencode 处理,请使用其他编码方式)
Page string `json:"page,omitempty"`
Path string `json:"path,omitempty"` //小程序码 有数量限制
CheckPath bool `json:"check_path,omitempty"` // 默认是true,检查page 是否存在,为 true 时 page 必须是已经发布的小程序存在的页面(否则报错);为 false 时允许小程序未发布或者 page 不存在, 但page 有数量上限(60000个)请勿滥用。
EnvVersion string `json:"env_version,omitempty"` //release trial develop
Width int `json:"width,omitempty"` //默认430,二维码的宽度,单位 px,最小 280px,最大 1280px
AutoColor bool `json:"auto_color,omitempty"` //自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调,默认 false
LineColor map[string]int `json:"line_color,omitempty"` //默认是{"r":0,"g":0,"b":0} 。auto_color 为 false 时生效,使用 rgb 设置颜色 例如 {"r":"xxx","g":"xxx","b":"xxx"} 十进制表示
IsHyaline bool `json:"is_hyaline,omitempty"` //默认是false,是否需要透明底色,为 true 时,生成透明底色的小程序
}
type QrcodeResponse struct {
Errcode int `json:"errcode,omitempty"`
Errmsg string `json:"errmsg,omitempty"`
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/douxuefeng/go-utils.git
git@gitee.com:douxuefeng/go-utils.git
douxuefeng
go-utils
go-utils
v0.2.6

搜索帮助

344bd9b3 5694891 D2dac590 5694891