1 Star 0 Fork 0

h79 / gothird

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
wxacode.go 760 Bytes
一键复制 编辑 原始数据 按行查看 历史
huqiuyun 提交于 2023-07-28 16:16 . 还是把 token 放在这里
package mini
import (
"encoding/json"
"fmt"
"gitee.com/h79/gothird/token"
"gitee.com/h79/gothird/weixin/consts"
"gitee.com/h79/goutils/common/http"
)
// 获取小程序码,适用于需要的码数量极多的业务场景。通过该接口生成的小程序码,永久有效,数量暂无限制
// https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/qr-code/wxacode.getUnlimited.html
func QrcCreate(api *token.Api, qrc *WxaQrcReq) ([]byte, error) {
uri := fmt.Sprintf("%s/wxa/getwxacodeunlimit?", consts.ApiPrefixUrl)
buf, err := json.Marshal(qrc)
if err != nil {
return nil, err
}
var res []byte
er := api.Request("POST", uri, buf, func(hp *http.Http, body []byte) error {
res = body
return nil
})
return res, er
}
1
https://gitee.com/h79/gothird.git
git@gitee.com:h79/gothird.git
h79
gothird
gothird
v1.8.103

搜索帮助