diff --git a/resource/view/auth/passport/login.html b/resource/view/auth/passport/login.html index f5642a3..46fcee1 100644 --- a/resource/view/auth/passport/login.html +++ b/resource/view/auth/passport/login.html @@ -19,10 +19,14 @@
- +
- + +
+
+ + captcha
diff --git a/src/controller/Advertising.php b/src/controller/Advertising.php index 55703ce..c86f096 100644 --- a/src/controller/Advertising.php +++ b/src/controller/Advertising.php @@ -5,10 +5,10 @@ use tadmin\model\Advertising as AdvertisingModel; use tadmin\model\AdvertisingBlock; use tadmin\service\upload\contract\Factory as Uploader; -use tadmin\support\controller\AbstractController; +use tadmin\support\controller\Controller; use think\Request; -class Advertising extends AbstractController +class Advertising extends Controller { protected $model; diff --git a/src/controller/AdvertisingBlock.php b/src/controller/AdvertisingBlock.php index f1e31c7..d290e6c 100644 --- a/src/controller/AdvertisingBlock.php +++ b/src/controller/AdvertisingBlock.php @@ -3,10 +3,10 @@ namespace tadmin\controller; use tadmin\model\AdvertisingBlock as AdvertisingBlockModel; -use tadmin\support\controller\AbstractController; +use tadmin\support\controller\Controller; use think\Request; -class AdvertisingBlock extends AbstractController +class AdvertisingBlock extends Controller { protected $model; diff --git a/src/controller/Article.php b/src/controller/Article.php index a8f6c92..7831a44 100644 --- a/src/controller/Article.php +++ b/src/controller/Article.php @@ -7,10 +7,10 @@ use tadmin\model\Category; use tadmin\model\Tag; use tadmin\service\upload\contract\Factory as Uploader; -use tadmin\support\controller\AbstractController; +use tadmin\support\controller\Controller; use think\Request; -class Article extends AbstractController +class Article extends Controller { protected $article; diff --git a/src/controller/Category.php b/src/controller/Category.php index 3e741cc..1a57903 100644 --- a/src/controller/Category.php +++ b/src/controller/Category.php @@ -3,10 +3,10 @@ namespace tadmin\controller; use tadmin\model\Category as CategoryModel; -use tadmin\support\controller\AbstractController; +use tadmin\support\controller\Controller; use think\Request; -class Category extends AbstractController +class Category extends Controller { protected $category; diff --git a/src/controller/Config.php b/src/controller/Config.php index 11b82d1..999c446 100644 --- a/src/controller/Config.php +++ b/src/controller/Config.php @@ -3,10 +3,10 @@ namespace tadmin\controller; use tadmin\model\Config as ConfigModel; -use tadmin\support\controller\AbstractController; +use tadmin\support\controller\Controller; use think\Request; -class Config extends AbstractController +class Config extends Controller { protected $config; diff --git a/src/controller/Index.php b/src/controller/Index.php index 349c0b7..655c383 100644 --- a/src/controller/Index.php +++ b/src/controller/Index.php @@ -4,9 +4,9 @@ use tadmin\model\Article; use tadmin\model\OperationLog; -use tadmin\support\controller\AbstractController; +use tadmin\support\controller\Controller; -class Index extends AbstractController +class Index extends Controller { protected $operationLog; diff --git a/src/controller/Job.php b/src/controller/Job.php index 88a757c..92b3136 100644 --- a/src/controller/Job.php +++ b/src/controller/Job.php @@ -4,10 +4,10 @@ use tadmin\model\Job as JobModel; use tadmin\model\JobResume; -use tadmin\support\controller\AbstractController; +use tadmin\support\controller\Controller; use think\Request; -class Job extends AbstractController +class Job extends Controller { protected $job; diff --git a/src/controller/Link.php b/src/controller/Link.php index b197c28..e7d85b4 100644 --- a/src/controller/Link.php +++ b/src/controller/Link.php @@ -5,10 +5,10 @@ use tadmin\model\Link as LinkModel; use tadmin\model\LinkBlock; use tadmin\service\upload\contract\Factory as Uploader; -use tadmin\support\controller\AbstractController; +use tadmin\support\controller\Controller; use think\Request; -class Link extends AbstractController +class Link extends Controller { protected $model; diff --git a/src/controller/LinkBlock.php b/src/controller/LinkBlock.php index ab275d2..9e5a31d 100644 --- a/src/controller/LinkBlock.php +++ b/src/controller/LinkBlock.php @@ -3,10 +3,10 @@ namespace tadmin\controller; use tadmin\model\LinkBlock as LinkBlockModel; -use tadmin\support\controller\AbstractController; +use tadmin\support\controller\Controller; use think\Request; -class LinkBlock extends AbstractController +class LinkBlock extends Controller { protected $model; diff --git a/src/controller/Message.php b/src/controller/Message.php index dad025a..20d3842 100644 --- a/src/controller/Message.php +++ b/src/controller/Message.php @@ -3,10 +3,10 @@ namespace tadmin\controller; use tadmin\model\MessageBoard; -use tadmin\support\controller\AbstractController; +use tadmin\support\controller\Controller; use think\Request; -class Message extends AbstractController +class Message extends Controller { protected $model; diff --git a/src/controller/Nav.php b/src/controller/Nav.php index 8088d01..5562b6a 100644 --- a/src/controller/Nav.php +++ b/src/controller/Nav.php @@ -3,10 +3,10 @@ namespace tadmin\controller; use tadmin\model\Nav as NavModel; -use tadmin\support\controller\AbstractController; +use tadmin\support\controller\Controller; use think\Request; -class Nav extends AbstractController +class Nav extends Controller { protected $model; diff --git a/src/controller/Single.php b/src/controller/Single.php index 8598f2e..b610cc0 100644 --- a/src/controller/Single.php +++ b/src/controller/Single.php @@ -5,10 +5,10 @@ use tadmin\model\Category; use tadmin\model\Single as SingleModel; use tadmin\service\upload\contract\Factory as Uploader; -use tadmin\support\controller\AbstractController; +use tadmin\support\controller\Controller; use think\Request; -class Single extends AbstractController +class Single extends Controller { protected $single; diff --git a/src/controller/auth/Adminer.php b/src/controller/auth/Adminer.php index 16a4e53..ec410e1 100644 --- a/src/controller/auth/Adminer.php +++ b/src/controller/auth/Adminer.php @@ -5,12 +5,12 @@ use tadmin\model\Adminer as AdminerModel; use tadmin\model\Role; use tadmin\service\upload\contract\Factory as Uploader; -use tadmin\support\controller\AbstractController; +use tadmin\support\controller\Controller; use think\exception\ValidateException; use think\facade\Validate; use think\Request; -class Adminer extends AbstractController +class Adminer extends Controller { protected $adminer; diff --git a/src/controller/auth/Log.php b/src/controller/auth/Log.php index 9611e0c..4780c62 100644 --- a/src/controller/auth/Log.php +++ b/src/controller/auth/Log.php @@ -3,9 +3,9 @@ namespace tadmin\controller\auth; use tadmin\model\OperationLog; -use tadmin\support\controller\AbstractController; +use tadmin\support\controller\Controller; -class Log extends AbstractController +class Log extends Controller { protected $operationLog; diff --git a/src/controller/auth/Passport.php b/src/controller/auth/Passport.php index fc361d9..5932e41 100644 --- a/src/controller/auth/Passport.php +++ b/src/controller/auth/Passport.php @@ -3,10 +3,10 @@ namespace tadmin\controller\auth; use tadmin\service\auth\contract\Auth; -use tadmin\support\controller\AbstractController; +use tadmin\support\controller\Controller; use think\Request; -class Passport extends AbstractController +class Passport extends Controller { protected $auth; diff --git a/src/controller/auth/Permission.php b/src/controller/auth/Permission.php index 7e86be0..bdc3eb3 100644 --- a/src/controller/auth/Permission.php +++ b/src/controller/auth/Permission.php @@ -3,10 +3,10 @@ namespace tadmin\controller\auth; use tadmin\model\Permission as PermissionModel; -use tadmin\support\controller\AbstractController; +use tadmin\support\controller\Controller; use think\Request; -class Permission extends AbstractController +class Permission extends Controller { protected $permission; diff --git a/src/controller/auth/Role.php b/src/controller/auth/Role.php index 3038752..c3eed9e 100644 --- a/src/controller/auth/Role.php +++ b/src/controller/auth/Role.php @@ -4,10 +4,10 @@ use tadmin\model\Permission; use tadmin\model\Role as RoleModel; -use tadmin\support\controller\AbstractController; +use tadmin\support\controller\Controller; use think\Request; -class Role extends AbstractController +class Role extends Controller { protected $role; diff --git a/src/service/auth/Auth.php b/src/service/auth/Auth.php index 4d3fb74..eea975e 100644 --- a/src/service/auth/Auth.php +++ b/src/service/auth/Auth.php @@ -55,6 +55,7 @@ protected function validate(array $data = []) $validate = Validate::make([ 'admin_account' => 'require|max:25', 'admin_password' => 'require|max:25', + 'captcha|验证码' => 'require|captcha', ], [ 'admin_account.require' => '登录名必须', 'admin_account.max' => '登录名最多不能超过25个字符', diff --git a/src/support/controller/AbstractController.php b/src/support/controller/Controller.php similarity index 94% rename from src/support/controller/AbstractController.php rename to src/support/controller/Controller.php index 82a6e29..1ff0d33 100644 --- a/src/support/controller/AbstractController.php +++ b/src/support/controller/Controller.php @@ -5,12 +5,12 @@ use tadmin\model\Menu; use tadmin\service\auth\facade\Auth; use think\Container; -use think\Controller; +use think\Controller as ThinkController; use think\facade\Config; use think\Console; use think\Loader; -abstract class AbstractController extends Controller +abstract class Controller extends ThinkController { protected $viewPath = '';