4
This commit is contained in:
@@ -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("验证码发送失败,请您稍后再试")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user