diff --git a/routers/user/auth.go b/routers/user/auth.go index 6d77468e1..8e6ca9f42 100755 --- a/routers/user/auth.go +++ b/routers/user/auth.go @@ -8,6 +8,7 @@ package user import ( "errors" "fmt" + "github.com/gomodule/redigo/redis" "net/http" "strings" @@ -1845,7 +1846,7 @@ func SendVerifyCode(ctx *context.Context, slideImage *slideimage.SlideImage, for defer redisConn.Close() sendTimes, err := phoneService.GetPhoneNumberSendTimes(redisConn, phoneNumber) - if err != nil { + if err != nil && err!=redis.ErrNil { log.Warn("redis err", err) ctx.JSON(http.StatusOK, models.BaseErrorMessage(ctx.Tr("phone.query_err"))) return