# README
参考文档
小程序登录时序图
包说明
- 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)
}
https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/login.html
# Functions
No description provided by the author
# Structs
No description provided by the author
SessionInfo 登录凭证校验的返回结果.
No description provided by the author
# Interfaces
No description provided by the author