Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckUserInfoSignature ¶
Types ¶
type LoginResult ¶
type LoginResult struct { Openid string `json:"openid"` SessionKey string `json:"session_key"` Unionid string `json:"unionid"` Errcode LoginResultCode `json:"errcode"` Errmsg string `json:"errmsg"` }
func Login ¶
func Login(code string) (result *LoginResult, err error)
type LoginResultCode ¶
type LoginResultCode int
const ( LoginResultCodeBusy LoginResultCode = -1 // 系统繁忙,此时请开发者稍候再试 LoginResultCodeSuccess LoginResultCode = 0 // 请求成功 LoginResultCodeInValid LoginResultCode = 40029 // code 无效 LoginResultCodeLimit LoginResultCode = 45011 // 频率限制,每个用户每分钟100次 )
type WxMaUserInfo ¶
type WxMaUserInfo struct { OpenId string `json:"openId"` NickName string `json:"nickName"` Gender int8 `json:"gender"` Language string `json:"language"` City string `json:"city"` Province string `json:"province"` Country string `json:"country"` AvatarUrl string `json:"avatarUrl"` UnionId string `json:"unionId"` }
func GetUserInfo ¶
func GetUserInfo(sessionKey, encryptedData, ivStr string) (userInfo *WxMaUserInfo, err error)
Click to show internal directories.
Click to hide internal directories.