This commit is contained in:
2024-07-29 11:59:01 +08:00
parent 5a94972228
commit 502908b4e5
3 changed files with 14 additions and 1 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ func (r *PublicService) GetPhoneCode(scene int, phone string) (bool, error) {
}
// 设置验证码有效期
_, err = global.Redis.Set(context.Background(), "login_code_"+phone, code, 60*30*time.Second).Result()
_, err = global.Redis.Set(context.Background(), "login_code_"+phone, code, 60*5*time.Second).Result()
if err != nil {
return false, errors.New("验证码发送失败,请您稍后再试")
}