5
This commit is contained in:
parent
2f12ff1e26
commit
33a76999b9
@ -107,7 +107,7 @@ func (r *Login) Login(c *gin.Context) {
|
||||
|
||||
// 新增用户
|
||||
user = &model.User{
|
||||
UserName: req.Nickname,
|
||||
UserName: "",
|
||||
AppIden: req.Uuid,
|
||||
Mobile: req.Mobile,
|
||||
RegisterSource: req.Source,
|
||||
@ -183,6 +183,13 @@ func (r *Login) Login(c *gin.Context) {
|
||||
|
||||
tx.Commit()
|
||||
|
||||
// 获取用户信息
|
||||
user, err = userDao.GetUser(maps)
|
||||
if err != nil {
|
||||
responses.FailWithMessage(err.Error(), c)
|
||||
return
|
||||
}
|
||||
|
||||
// 下发token
|
||||
token := &utils.Token{
|
||||
UserId: fmt.Sprintf("%d", user.UserId),
|
||||
|
||||
@ -10,7 +10,6 @@ type Login struct {
|
||||
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"`
|
||||
Nickname string `json:"nickname" form:"nickname" label:"用户昵称"`
|
||||
HeadImgUrl string `json:"headimgurl" form:"headimgurl" label:"头像"`
|
||||
UnionId string `json:"unionid" form:"unionid" label:"unionid"`
|
||||
Uuid string `json:"uuid" form:"uuid" label:"app唯一标识"`
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user