Update: Save current progress

This commit is contained in:
2026-01-13 06:56:26 -08:00
parent d45f4417ed
commit 14489b6afd
19 changed files with 904 additions and 9 deletions
+1 -1
View File
@@ -78,7 +78,7 @@ func (l *UserRegisterLogic) UserRegister(req *types.UserRegisterRequest) (resp *
return nil, errors.Wrapf(xerr.NewErrCode(xerr.VerifyCodeError), "code error")
}
// 校验有效期(15分钟)
if time.Now().Unix()-payload.LastAt > 900 {
if time.Now().Unix()-payload.LastAt > l.svcCtx.Config.VerifyCode.ExpireTime {
return nil, errors.Wrapf(xerr.NewErrCode(xerr.VerifyCodeError), "code expired")
}
l.svcCtx.Redis.Del(l.ctx, cacheKey)