From 49157ddb5b9387348493eb04c287e675e7a2f2ac Mon Sep 17 00:00:00 2001 From: ychao_1983 Date: Mon, 20 Jun 2022 17:26:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routers/user/auth.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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