diff --git a/business/jxcallback/auth/mobile/mobile.go b/business/jxcallback/auth/mobile/mobile.go index 7b0d90bc7..7130c793e 100644 --- a/business/jxcallback/auth/mobile/mobile.go +++ b/business/jxcallback/auth/mobile/mobile.go @@ -57,8 +57,8 @@ func SendVerifyCode(mobileNumber string) error { response, err := smsClient.Execute(globals.AliKey, globals.AliSecret, mobileNumber, "京西菜市", "SMS_84655036", string(utils.MustMarshal(map[string]interface{}{ "code": code, }))) + api.Cacher.Set(mobileNumber, code, DefVerifyCodeDuration) if err == nil && response.Code == aliyunsmsclient.ResponseCodeOk { - api.Cacher.Set(mobileNumber, code, DefVerifyCodeDuration) } else { if err == nil { if warningMap[response.Code] == 1 {