diff --git a/CHANGELOG.md b/CHANGELOG.md index b2af237b..2177671d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +### [v1.6.6](https://gitee.com/koogua/course-tencent-cloud/releases/v1.6.6)(2023-08-15) + ### [v1.6.5](https://gitee.com/koogua/course-tencent-cloud/releases/v1.6.5)(2023-07-15) - 升级layui-v2.8.8 diff --git a/app/Http/Admin/Controllers/SessionController.php b/app/Http/Admin/Controllers/SessionController.php index e554bf05..85d09e53 100644 --- a/app/Http/Admin/Controllers/SessionController.php +++ b/app/Http/Admin/Controllers/SessionController.php @@ -34,15 +34,13 @@ class SessionController extends \Phalcon\Mvc\Controller return $this->response->redirect(['for' => 'admin.index']); } - $sessionService = new SessionService(); - - $captcha = $sessionService->getSettings('captcha'); - if ($this->request->isPost()) { $this->checkHttpReferer(); $this->checkCsrfToken(); + $sessionService = new SessionService(); + $sessionService->login(); $location = $this->url->get(['for' => 'admin.index']); @@ -54,7 +52,6 @@ class SessionController extends \Phalcon\Mvc\Controller $this->view->pick('public/login'); $this->view->setVar('app_info', $appInfo); - $this->view->setVar('captcha', $captcha); } /** diff --git a/app/Http/Admin/Services/Session.php b/app/Http/Admin/Services/Session.php index 53978d19..232ca195 100644 --- a/app/Http/Admin/Services/Session.php +++ b/app/Http/Admin/Services/Session.php @@ -9,7 +9,6 @@ namespace App\Http\Admin\Services; use App\Services\Auth\Admin as AdminAuth; use App\Validators\Account as AccountValidator; -use App\Validators\Captcha as CaptchaValidator; class Session extends Service { @@ -34,18 +33,6 @@ class Session extends Service $validator->checkIfAllowLogin($user); - $captcha = $this->getSettings('captcha'); - - /** - * 验证码是一次性的,放到最后检查,减少第三方调用 - */ - if ($captcha['enabled'] == 1) { - - $validator = new CaptchaValidator(); - - $validator->checkCode($post['captcha']['ticket'], $post['captcha']['rand']); - } - $this->auth->saveAuthInfo($user); $this->eventsManager->fire('Account:afterLogin', $this, $user); diff --git a/app/Http/Admin/Services/Topic.php b/app/Http/Admin/Services/Topic.php index 23195a4b..0c9310b7 100644 --- a/app/Http/Admin/Services/Topic.php +++ b/app/Http/Admin/Services/Topic.php @@ -68,9 +68,9 @@ class Topic extends Service $page = $pagerQuery->getPage(); $limit = $pagerQuery->getLimit(); - $pageRepo = new TopicRepo(); + $topicRepo = new TopicRepo(); - return $pageRepo->paginate($params, $sort, $page, $limit); + return $topicRepo->paginate($params, $sort, $page, $limit); } public function getTopic($id) diff --git a/app/Http/Admin/Views/public/login.volt b/app/Http/Admin/Views/public/login.volt index 72f0f2e3..60bfce0d 100644 --- a/app/Http/Admin/Views/public/login.volt +++ b/app/Http/Admin/Views/public/login.volt @@ -2,9 +2,6 @@ {% block content %} - {% set disabled_submit = captcha.enabled == 1 ? 'disabled="disabled"' : '' %} - {% set disabled_class = captcha.enabled == 1 ? 'layui-btn-disabled' : '' %} -