houseme d8fde54f2d improve comment ,参考:https://github.com/huacnlee/autocorrect 1 年之前
..
analysis d8fde54f2d improve comment ,参考:https://github.com/huacnlee/autocorrect 1 年之前
auth d8fde54f2d improve comment ,参考:https://github.com/huacnlee/autocorrect 1 年之前
business d8fde54f2d improve comment ,参考:https://github.com/huacnlee/autocorrect 1 年之前
config dea33e0e48 小程序消息推送 (#713) 2 年之前
content d8fde54f2d improve comment ,参考:https://github.com/huacnlee/autocorrect 1 年之前
context 972dec0406 将小程序获取ak的方式也抽象出来 6 年之前
encryptor d8fde54f2d improve comment ,参考:https://github.com/huacnlee/autocorrect 1 年之前
message d8fde54f2d improve comment ,参考:https://github.com/huacnlee/autocorrect 1 年之前
minidrama 8f10936479 fix: util.DecodeWithError result (#729) 2 年之前
order d8fde54f2d improve comment ,参考:https://github.com/huacnlee/autocorrect 1 年之前
privacy d8fde54f2d improve comment ,参考:https://github.com/huacnlee/autocorrect 1 年之前
qrcode d8fde54f2d improve comment ,参考:https://github.com/huacnlee/autocorrect 1 年之前
redpacketcover d8fde54f2d improve comment ,参考:https://github.com/huacnlee/autocorrect 1 年之前
riskcontrol d8fde54f2d improve comment ,参考:https://github.com/huacnlee/autocorrect 1 年之前
security d8fde54f2d improve comment ,参考:https://github.com/huacnlee/autocorrect 1 年之前
shortlink d28ca4f334 feat: optimized-error-handling&remove unused constant (#772) 2 年之前
subscribe d8fde54f2d improve comment ,参考:https://github.com/huacnlee/autocorrect 1 年之前
tcb d8fde54f2d improve comment ,参考:https://github.com/huacnlee/autocorrect 1 年之前
urllink d8fde54f2d improve comment ,参考:https://github.com/huacnlee/autocorrect 1 年之前
urlscheme d8fde54f2d improve comment ,参考:https://github.com/huacnlee/autocorrect 1 年之前
virtualpayment d8fde54f2d improve comment ,参考:https://github.com/huacnlee/autocorrect 1 年之前
werun 45caf61899 Silenceper release 2.0 (#408) 5 年之前
README.md cc201fcece feat: create Mini Program entertainment mini-drama related interface (#711) 2 年之前
miniprogram.go 1138a7db0e feat:追加动态消息接口 (#775) 2 年之前

README.md

微信小程序

官方文档

包说明

  • analysis 数据分析相关 API

快速入门

wc := wechat.NewWechat()
memory := cache.NewMemory()
cfg := &miniConfig.Config{
    AppID:     "xxx",
    AppSecret: "xxx",
    Cache: memory,
}
miniprogram := wc.GetMiniProgram(cfg)
miniprogram.GetAnalysis().GetAnalysisDailyRetain()

小程序虚拟支付

注意:需要传入 Appkey、OfferID 的值

相关文档:小程序虚拟支付

wc := wechat.NewWechat()
miniprogram := wc.GetMiniProgram(&miniConfig.Config{
    AppID:     "xxx",
    AppSecret: "xxx",
    AppKey:    "xxx",
    OfferID:   "xxx",
    Cache: cache.NewRedis(&redis.Options{
        Addr: "",
    }),
})
virtualPayment := miniprogram.GetVirtualPayment()
virtualPayment.SetSessionKey("xxx")
// 查询用户余额
var (
    res *virtualPayment.QueryUserBalanceResponse
    err error
)

if res, err = virtualPayment.QueryUserBalance(context.TODO(), &virtualPayment.QueryUserBalanceRequest{
    OpenID: "xxx",
    Env: virtualPayment.EnvProduction,
    UserIP: "xxx",
}); err != nil {
    panic(err)
}