fix
This commit is contained in:
@@ -39,7 +39,7 @@ func (l *MobileCodeLoginLogic) MobileCodeLogin(req *types.MobileCodeLoginReq) (r
|
|||||||
return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "手机登录, 加密手机号失败: %+v", err)
|
return nil, errors.Wrapf(xerr.NewErrCode(xerr.SERVER_COMMON_ERROR), "手机登录, 加密手机号失败: %+v", err)
|
||||||
}
|
}
|
||||||
// 开发环境下跳过验证码校验
|
// 开发环境下跳过验证码校验
|
||||||
if os.Getenv("ENV") != "development" || req.Code != "278712" {
|
if os.Getenv("ENV") != "development" && req.Code != "278712" {
|
||||||
// 检查手机号是否在一分钟内已发送过验证码
|
// 检查手机号是否在一分钟内已发送过验证码
|
||||||
redisKey := fmt.Sprintf("%s:%s", "login", encryptedMobile)
|
redisKey := fmt.Sprintf("%s:%s", "login", encryptedMobile)
|
||||||
cacheCode, err := l.svcCtx.Redis.Get(redisKey)
|
cacheCode, err := l.svcCtx.Redis.Get(redisKey)
|
||||||
|
|||||||
Reference in New Issue
Block a user