|
@@ -0,0 +1,73 @@
|
|
|
|
|
+<?php
|
|
|
|
|
+// +----------------------------------------------------------------------
|
|
|
|
|
+// | LARAVEL8.0 框架 [ LARAVEL ][ RXThinkCMF ]
|
|
|
|
|
+// +----------------------------------------------------------------------
|
|
|
|
|
+// | 版权所有 2017~2021 LARAVEL研发中心
|
|
|
|
|
+// +----------------------------------------------------------------------
|
|
|
|
|
+// | 官方网站: http://www.laravel.cn
|
|
|
|
|
+// +----------------------------------------------------------------------
|
|
|
|
|
+// | Author: laravel开发员 <laravel.qq.com>
|
|
|
|
|
+// +----------------------------------------------------------------------
|
|
|
|
|
+
|
|
|
|
|
+namespace App\Http\Controllers\Admin;
|
|
|
|
|
+
|
|
|
|
|
+use App\Models\ActionLogModel;
|
|
|
|
|
+use App\Services\Common\LoginService;
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * 登录控制器
|
|
|
|
|
+ * @author laravel开发员
|
|
|
|
|
+ * @since 2020/11/10
|
|
|
|
|
+ * Class LoginController
|
|
|
|
|
+ * @package App\Http\Controllers
|
|
|
|
|
+ */
|
|
|
|
|
+class LoginController extends Backend
|
|
|
|
|
+{
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 构造函数
|
|
|
|
|
+ * @author laravel开发员
|
|
|
|
|
+ * @since 2020/11/10
|
|
|
|
|
+ * LoginController constructor.
|
|
|
|
|
+ */
|
|
|
|
|
+ public function __construct()
|
|
|
|
|
+ {
|
|
|
|
|
+ parent::__construct();
|
|
|
|
|
+ $this->service = new LoginService();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取验证码
|
|
|
|
|
+ * @return mixed
|
|
|
|
|
+ * @since 2020/11/10
|
|
|
|
|
+ * @author laravel开发员
|
|
|
|
|
+ */
|
|
|
|
|
+ public function captcha()
|
|
|
|
|
+ {
|
|
|
|
|
+ $result = $this->service->captcha();
|
|
|
|
|
+ return $result;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 系统登录
|
|
|
|
|
+ * @author laravel开发员
|
|
|
|
|
+ * @since 2020/11/10
|
|
|
|
|
+ */
|
|
|
|
|
+ public function login()
|
|
|
|
|
+ {
|
|
|
|
|
+ $result = $this->service->login();
|
|
|
|
|
+ return $result;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 退出系统
|
|
|
|
|
+ * @author laravel开发员
|
|
|
|
|
+ * @since 2020/11/10
|
|
|
|
|
+ */
|
|
|
|
|
+ public function logout()
|
|
|
|
|
+ {
|
|
|
|
|
+ $result = $this->service->logout();
|
|
|
|
|
+ return $result;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+}
|