关闭验证码功能

This commit is contained in:
2026-03-03 18:55:03 +08:00
parent eaf3f2f48f
commit 267b088242
7 changed files with 42 additions and 19 deletions

View File

@@ -49,9 +49,12 @@ class LoginController extends BaseController
$code = $request->post('code', '');
$uuid = $request->post('uuid', '');
$captcha = new Captcha();
if (!$captcha->checkCaptcha($uuid, $code)) {
return $this->fail('验证码错误');
$captchaEnabled = config('plugin.saiadmin.saithink.captcha.enable', true);
if ($captchaEnabled) {
$captcha = new Captcha();
if (!$captcha->checkCaptcha($uuid, $code)) {
return $this->fail('验证码错误');
}
}
$logic = new SystemUserLogic();
$data = $logic->login($username, $password, $type);