修正了登录
This commit is contained in:
+6
-12
@@ -1,22 +1,16 @@
|
||||
package requests
|
||||
|
||||
type LoginRequest struct {
|
||||
LoginWx // 微信授权登录
|
||||
LoginPhone // 手机号登录
|
||||
Login // 登录
|
||||
}
|
||||
|
||||
// LoginWx 微信授权登录
|
||||
type LoginWx struct {
|
||||
// Login 登录
|
||||
type Login struct {
|
||||
Mobile string `json:"mobile" form:"mobile" label:"手机号" validate:"required"`
|
||||
OpenId string `json:"openid" form:"openid" label:"openid"`
|
||||
Code string `json:"code" form:"code" label:"验证码"`
|
||||
Source int `json:"source" form:"source" label:"来源" validate:"required"` // (1:app 2:公众号
|
||||
OpenId string `json:"openid" form:"openid" label:"openid" validate:"required"`
|
||||
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"` // (1:app 2:公众号
|
||||
}
|
||||
|
||||
+14
-1
@@ -1,7 +1,9 @@
|
||||
package requests
|
||||
|
||||
type UserRequest struct {
|
||||
PutUser // 修改用户数据-基本信息
|
||||
PutUser // 修改用户数据-基本信息
|
||||
PutBindUserName // 绑定用户数据-昵称
|
||||
GetUserCheck // 检测用户数据绑定状态
|
||||
}
|
||||
|
||||
// PutUser 修改用户数据-基本信息
|
||||
@@ -20,3 +22,14 @@ type PutUser struct {
|
||||
CityId string `json:"city_id" form:"city_id" label:"城市id" validate:"required"` // 从int转换为可选字符串
|
||||
CountyId string `json:"county_id" form:"county_id" label:"区县id" validate:"required"` // 从int转换为可选字符串
|
||||
}
|
||||
|
||||
// PutBindUserName 绑定用户数据-昵称
|
||||
type PutBindUserName struct {
|
||||
Nickname string `json:"nickname" form:"nickname" label:"用户昵称"`
|
||||
}
|
||||
|
||||
// GetUserCheck 检测用户数据绑定状态
|
||||
type GetUserCheck struct {
|
||||
Mobile string `json:"mobile" form:"mobile" label:"mobile"`
|
||||
OpenId string `json:"openid" form:"openid" label:"openid"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user