Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetSessionResult ¶
type GetSessionResult struct {
*wxapi.Result
SessionKey string `json:"session_key"`
OpenId string `json:"openid"`
UnionId string `json:"unionid"`
}
GetSessionResult wechat miniprogram login session
type WxAPI ¶
type WxAPI interface {
wxapi.API
Code2Session(code string) (*GetSessionResult, error) // 小程序静默登录,通过code换取UnionId
GetUserPhoneNumber(accessToken, code string) (string, error) // 获取用户手机号码
CreateLimitedWxaCode(accessToken, path string, width int) ([]byte, error) // 生成有限的小程序码
CreateUnLimitedWxaCode(accessToken, scene, page string, width int) ([]byte, error) // CreateUnLimitedWxaCode 生成小程序码,可接受页面参数较短,生成个数不受限
}
Click to show internal directories.
Click to hide internal directories.