20 lines
695 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 {
Code string `json:"code" form:"code" label:"授权码" validate:"required"`
Source int `json:"source" form:"source" label:"来源" validate:"required,oneof=1 2"` // 1app 2公众号
}
// 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公众号
}