From 14ab4d734a60e73dc80e83a5ec365d2c5531776f Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 28 May 2024 18:44:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=BC=95=E5=85=A5=20MyBusinessExceptio?= =?UTF-8?q?n=20=E7=B1=BB=EF=BC=8C=E4=BF=AE=E6=94=B9=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E5=A4=84=E7=90=86=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/validate/LoginValidate.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/admin/validate/LoginValidate.php b/app/admin/validate/LoginValidate.php index a6d7c7d..f0ecfcf 100644 --- a/app/admin/validate/LoginValidate.php +++ b/app/admin/validate/LoginValidate.php @@ -9,6 +9,7 @@ use app\common\enum\AdminTerminalEnum; use app\common\model\auth\Admin; use app\common\service\ConfigService; use app\common\validate\BaseValidate; +use app\MyBusinessException; use Webman\Config; class LoginValidate extends BaseValidate @@ -53,7 +54,7 @@ class LoginValidate extends BaseValidate //后台账号安全机制,连续输错后锁定,防止账号密码暴力破解 if ($config['login_restrictions'] == 1 && !$adminAccountSafeCache->isSafe()) { - return '密码连续' . $adminAccountSafeCache->count . '次输入错误,请' . $adminAccountSafeCache->minute . '分钟后重试'; + new MyBusinessException('密码连续' . $adminAccountSafeCache->count . '次输入错误,请' . $adminAccountSafeCache->minute . '分钟后重试'); } $adminInfo = Admin::where('account', '=', $data['account'])