diff --git a/app/Http/Admin/Views/public/login.volt b/app/Http/Admin/Views/public/login.volt index 3c1fb563..862e7022 100644 --- a/app/Http/Admin/Views/public/login.volt +++ b/app/Http/Admin/Views/public/login.volt @@ -1,38 +1,29 @@
-
- 后台登录 -
-
-
- +
-
{% if captcha.enabled == 1 %} -
- +
- 点击完成验证 - 验证成功 +
{% endif %}
-
{% set disabled = captcha.enabled ? 'disabled="disabled"' : '' %} - +
@@ -61,8 +52,7 @@ if (res.ret === 0) { $('input[name=ticket]').val(res.ticket); $('input[name=rand]').val(res.randstr); - $('#captcha-btn').remove(); - $('#verify-btn').removeClass('layui-hide'); + $('#captcha-block').hide(); $('#submit-btn').removeClass('layui-btn-disabled').removeAttr('disabled'); } } diff --git a/app/Http/Web/Services/Account.php b/app/Http/Web/Services/Account.php index 9d70f777..046ffd84 100644 --- a/app/Http/Web/Services/Account.php +++ b/app/Http/Web/Services/Account.php @@ -40,14 +40,14 @@ class Account extends Service { $post = $this->request->getPost(); - $captchaValidator = new CaptchaValidator(); - - $captchaValidator->checkCode($post['ticket'], $post['rand']); - $accountValidator = new AccountValidator(); $user = $accountValidator->checkUserLogin($post['account'], $post['password']); + $captchaValidator = new CaptchaValidator(); + + $captchaValidator->checkCode($post['ticket'], $post['rand']); + $this->auth->saveAuthInfo($user); } diff --git a/app/Http/Web/Views/account/forget_password.volt b/app/Http/Web/Views/account/forget_password.volt index 1f7ded6b..2d983a98 100644 --- a/app/Http/Web/Views/account/forget_password.volt +++ b/app/Http/Web/Views/account/forget_password.volt @@ -7,38 +7,30 @@ 重置密码
-
+