Skip to content

Commit

Permalink
修复了一些bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick-Star-CN committed Jul 17, 2023
1 parent 264f8cd commit 276f7ee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/userController/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func BindLibraryPassword(c *gin.Context) {
utils.JsonSuccessResponse(c, nil)
}

// SendVerificationCode 这一函数实际上不再被使用
func SendVerificationCode(c *gin.Context) {
var postForm phoneForm
err := c.ShouldBindJSON(&postForm)
Expand Down Expand Up @@ -118,7 +119,7 @@ func GetCaptcha(c *gin.Context) {
}
u := uuid.New()
deviceId := u.String()
redis.RedisClient.Set(context.Background(), user.Username + "_device_id", deviceId, time.Minute * 5)
redis.RedisClient.Set(context.Background(), user.Username+"_device_id", deviceId, time.Minute*5)
data, err := yxyServices.GetSecurityToken(deviceId)
if err != nil {
_ = c.AbortWithError(200, apiException.ServerError)
Expand Down Expand Up @@ -189,6 +190,7 @@ func LoginYxy(c *gin.Context) {
return
}
userServices.SetDeviceID(user, deviceId)
userServices.DecryptUserKeyInfo(user)
userServices.SetYxyUid(user, *uid)
userServices.DecryptUserKeyInfo(user)
userServices.SetPhoneNum(user, postForm.PhoneNum)
Expand Down
4 changes: 4 additions & 0 deletions app/services/userServices/setUser.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ func SetDeviceID(user *models.User, deviceID string) {
}

func DelPassword(user *models.User, passwordType string) {
if user.Username == "202103150901" {
println(user.ZFPassword)
println(user.LibPassword)
}
switch passwordType {
case "ZF":
{
Expand Down

0 comments on commit 276f7ee

Please sign in to comment.