This commit is contained in:
2024-09-04 16:19:53 +08:00
parent 2f12ff1e26
commit 33a76999b9
2 changed files with 8 additions and 2 deletions
+8 -1
View File
@@ -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),