31 lines
1.1 KiB
Go
31 lines
1.1 KiB
Go
// Package dto 请求参数
|
|
package dto
|
|
|
|
import "gorm.io/datatypes"
|
|
|
|
// WechatMiniLoginRequest 微信小程序登录请求
|
|
type WechatMiniLoginRequest struct {
|
|
Code string `json:"code" binding:"required"`
|
|
PhoneCode string `json:"phoneCode"`
|
|
EncryptedData string `json:"encryptedData"`
|
|
IV string `json:"iv"`
|
|
Nickname string `json:"nickname"`
|
|
AvatarURL string `json:"avatarUrl"`
|
|
Phone *string `json:"phone"`
|
|
Gender *int8 `json:"gender"`
|
|
PlatformExtra datatypes.JSONMap `json:"platformExtra"`
|
|
}
|
|
|
|
// WechatMiniLoginResponse 微信小程序登录响应
|
|
type WechatMiniLoginResponse struct {
|
|
UserID int64 `json:"userId"`
|
|
PlatformUserID int64 `json:"platformUserId"`
|
|
OpenID string `json:"openid"`
|
|
UnionID string `json:"unionid"`
|
|
SessionKey string `json:"sessionKey"`
|
|
Phone string `json:"phone"`
|
|
Token string `json:"token"`
|
|
IsNewPlatform bool `json:"isNewPlatform"`
|
|
IsNewUser bool `json:"isNewUser"`
|
|
}
|