|
|
@@ -178,14 +178,6 @@ func Register(c *gin.Context) { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
now := time.Now() |
|
|
|
userDb := db.UserDb{} |
|
|
|
userDb.Set() |
|
|
|
user, err := userDb.GetUserByPhone(req.Phone) |
|
|
|
if err != nil { |
|
|
|
e.OutErr(c, e.ERR_DB_ORM, err) |
|
|
|
return |
|
|
|
} |
|
|
|
//TODO::解密 |
|
|
|
phone := utils.Base64StdDecode(req.Phone) |
|
|
|
if phone == "" { |
|
|
@@ -203,6 +195,14 @@ func Register(c *gin.Context) { |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
now := time.Now() |
|
|
|
userDb := db.UserDb{} |
|
|
|
userDb.Set() |
|
|
|
user, err := userDb.GetUserByPhone(req.Phone) |
|
|
|
if err != nil { |
|
|
|
e.OutErr(c, e.ERR_DB_ORM, err) |
|
|
|
return |
|
|
|
} |
|
|
|
if user == nil { |
|
|
|
user = &model.User{ |
|
|
|
UserId: req.UserId, |
|
|
|