23 lines
859 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package requests
type LoginRequest struct {
LoginWx // 微信授权登录
LoginPhone // 手机号登录
}
// LoginWx 微信授权登录
type LoginWx struct {
Mobile string `json:"mobile" form:"mobile" label:"手机号" validate:"required"`
OpenId string `json:"openid" form:"openid" label:"openid"`
Nickname string `json:"nickname" form:"nickname" label:"用户昵称"`
HeadImgUrl string `json:"headimgurl" form:"headimgurl" label:"头像"`
UnionId string `json:"unionid" form:"unionid" label:"unionid"`
}
// LoginPhone 手机号登录
type LoginPhone struct {
Mobile string `json:"mobile" form:"mobile" label:"手机号" validate:"required"`
Code string `json:"code" form:"code" label:"验证码" validate:"required"`
Source int `json:"source" form:"source" label:"来源" validate:"required"` // 1app 2公众号
}