fix(验证码): 添加默认验证码配置并标准化邮箱处理
Build docker and publish / build (20.15.1) (push) Has been cancelled

为验证码配置添加默认值,当配置为空时使用默认值
在所有涉及邮箱验证的逻辑中添加邮箱格式标准化处理
添加特殊验证码"202511"用于测试环境绕过验证
This commit is contained in:
2026-01-13 19:29:05 -08:00
parent 869d7fbe59
commit c25147656b
7 changed files with 75 additions and 56 deletions
+11
View File
@@ -44,5 +44,16 @@ func Verify(svc *svc.ServiceContext) {
return
}
tool.SystemConfigSliceReflectToStruct(cfg, &verifyCodeConfig)
if verifyCodeConfig.ExpireTime == 0 {
verifyCodeConfig.ExpireTime = 900
}
if verifyCodeConfig.Limit == 0 {
verifyCodeConfig.Limit = 15
}
if verifyCodeConfig.Interval == 0 {
verifyCodeConfig.Interval = 60
}
svc.Config.VerifyCode = verifyCodeConfig
}