From 2d944cf9af1f1c27e4b23f4c33ed3d85e8ca78d5 Mon Sep 17 00:00:00 2001 From: xiaochong0302 Date: Thu, 4 Jun 2020 18:30:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8C=96=E7=99=BB=E5=BD=95=E7=9B=B8?= =?UTF-8?q?=E5=85=B3UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Admin/Views/public/login.volt | 20 +--- app/Http/Web/Services/Account.php | 8 +- .../Web/Views/account/forget_password.volt | 18 +--- app/Http/Web/Views/account/login.volt | 7 +- .../Web/Views/account/login_by_password.volt | 8 +- .../Web/Views/account/login_by_verify.volt | 16 +-- app/Http/Web/Views/account/register.volt | 16 +-- app/Http/Web/Views/course/list.volt | 4 +- app/Http/Web/Views/course/list_filter.volt | 2 +- app/Http/Web/Views/course/order.volt | 2 +- app/Http/Web/Views/course/show.volt | 4 +- app/Http/Web/Views/index/index.volt | 8 +- app/Http/Web/Views/order/confirm.volt | 4 +- app/Http/Web/Views/order/pay.volt | 2 +- app/Http/Web/Views/partials/macro_course.volt | 8 +- app/Http/Web/Views/search/content_course.volt | 2 +- app/Http/Web/Views/search/list.volt | 2 +- app/Validators/Account.php | 4 +- public/static/admin/css/common.css | 13 +-- public/static/web/css/common.css | 58 +++++++---- public/static/web/js/captcha.login.js | 3 +- public/static/web/js/captcha.verify.js | 99 ++++++++++++------- 22 files changed, 159 insertions(+), 149 deletions(-) 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 @@ 重置密码
-
+