26 lines
1.4 KiB
Go
26 lines
1.4 KiB
Go
|
package request
|
||
|
|
||
|
import "miniapp/model/common/constant"
|
||
|
|
||
|
type Login struct {
|
||
|
Username string `json:"username" form:"username" binding:"required"` // 邮箱或手机号
|
||
|
Password string `json:"password" form:"password"` // 密码
|
||
|
TypeCode constant.LoginType `json:"type" form:"type" binding:"required"` // 登录方式,默认为空,可选值参见自定义类型
|
||
|
UserIdentity constant.UserIdentity `json:"identity" form:"identity" binding:"required"` // 用户身份,默认为空,可选值参见自定义类型
|
||
|
NickName string `json:"nickName" form:"nickName"` // 微信昵称
|
||
|
AvatarUrl string `json:"avatarUrl" form:"avatarUrl"` // 微信头像
|
||
|
}
|
||
|
|
||
|
// RefreshToken 刷新Token入参
|
||
|
type RefreshToken struct {
|
||
|
RefreshToken string `json:"refresh_token" form:"refresh_token" binding:"required"` // 刷新Token
|
||
|
GrantType string `json:"grant_type" form:"grant_type" binding:"required"` // 授权类型,写refresh_token
|
||
|
}
|
||
|
|
||
|
// DecryptMobile 解密用户手机号入参
|
||
|
type DecryptMobile struct {
|
||
|
SessionKey string `json:"sessionKey" form:"sessionKey"` // sessionKey
|
||
|
EncryptedData string `json:"encryptedData" form:"encryptedData" binding:"required"` // 加密数据
|
||
|
Iv string `json:"iv" form:"iv" binding:"required"` // 加密算法的初始向量
|
||
|
}
|