refactor: 增加验证超时时间

This commit is contained in:
Ying
2022-08-22 11:38:13 +08:00
parent ad639339cb
commit 6e1b38a34b
2 changed files with 14 additions and 2 deletions

View File

@@ -40,6 +40,12 @@ class Email
*/
private $userVModel;
/**
* 验证码过期时间
* @var string
*/
private $expireTime = 5; //验证码过期时间(分钟)
/**
* 错误信息
* @var string
@@ -265,7 +271,7 @@ class Email
// 是否过期
$expires = time() - strtotime($result['create_time']);
if ($expires <= 60) {
if ($expires <= $this->expireTime * 60) {
return true;
}