Files
service-user/internal/wechat/response.go

55 lines
1.3 KiB
Go

package wechat
type ResponseBase struct {
ErrCode int32 `json:"errcode"`
ErrMsg string `json:"errmsg"`
}
type GetAccessTokenResp struct {
ResponseBase
AccessToken string `json:"access_token"`
ExpiresIn int32 `json:"expires_in"`
RefreshToken string `json:"refresh_token"`
OpenID string `json:"openid"`
Scope string `json:"scope"`
UnionID string `json:"unionid"`
}
type GetUserInfoResp struct {
ResponseBase
NickName string `json:"nickname"`
HeadImgURL string `json:"headimgurl"`
UnionID string `json:"unionid"`
}
type Code2SessionResp struct {
ResponseBase
OpenID string `json:"openid"`
UnionID string `json:"unionid"`
}
type GetUserPhoneNumberResp struct {
ResponseBase
PhoneInfo *struct {
CountryCode string `json:"countryCode"`
PurePhoneNumber string `json:"purePhoneNumber"`
} `json:"phone_info"`
}
type GenerateSchemeResp struct {
ResponseBase
OpenLink string `json:"openlink"`
}
type GenerateURLLinkReq struct {
Path string `json:"path"` // 小程序页面路径
Query string `json:"query"` // 参数
ExpireTime int64 `json:"expire_time"` // 失效间隔时间
EnvVersion string `json:"env_version"` // 版本
}
type GenerateURLLinkResp struct {
ResponseBase
UrlLink string `json:"url_link"`
}