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)
}