- CBGetUserInfo

This commit is contained in:
gazebo
2019-04-28 15:28:26 +08:00
parent 99006a0fb8
commit 590c95e4fc
4 changed files with 70 additions and 27 deletions

View File

@@ -40,32 +40,6 @@ type API struct {
msgKey string
}
type SNSTokenInfo struct {
AccessToken string `json:"access_token"`
ExpiresIn int `json:"expires_in"`
RefreshToken string `json:"refresh_token"`
OpenID string `json:"openid"`
Scope string `json:"scope"`
}
type SNSUserInfo struct {
OpenID string `json:"openid"`
NickName string `json:"nickname"`
Sex int `json:"sex"`
Province string `json:"province"`
City string `json:"city"`
Country string `json:"country"`
HeadImgURL string `json:"headimgurl"`
Privilege interface{} `json:"privilege"`
UnionID string `json:"unionid"`
}
type SessionInfo struct {
OpenID string `json:"openid"`
SessionKey string `json:"session_key"`
UnionID string `json:"unionid"`
}
func New(appID, secret string, config ...*platformapi.APIConfig) *API {
curConfig := platformapi.DefAPIConfig
if len(config) > 0 {