准备合并master
This commit is contained in:
1 parent
b158d929b6
commit
7b0e6191f3
17 files changed
+50
-51
No files matched your search
@@ -6,11 +6,8 @@ namespace app;
|
||||
use think\App;
|
||||
use think\exception\ValidateException;
|
||||
use think\Validate;
|
||||
use app\middleware\UserLogin;
|
||||
use app\middleware\Auth;
|
||||
use app\middleware\Online;
|
||||
|
||||
|
||||
/**
|
||||
* 控制器基础类
|
||||
*/
|
||||
@@ -40,8 +37,7 @@ abstract class BaseController
|
||||
* @var array
|
||||
*/
|
||||
protected $middleware = [
|
||||
'login'
|
||||
,'auth'
|
||||
'online'
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace app\admin\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class RuleGroup extends Validate
|
||||
{
|
||||
/**
|
||||
* 定义验证规则
|
||||
* 格式:'字段名' => ['规则1','规则2'...]
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $rule = [
|
||||
'title|规则名' => 'require|chs|length:2,100',
|
||||
'rules|规则' => 'require|length:1,10000',
|
||||
'miaoshu|排序' => 'require|length:2,180',
|
||||
];
|
||||
|
||||
/**
|
||||
* 定义错误信息
|
||||
* 格式:'字段名.规则名' => '错误信息'
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $message = [];
|
||||
}
|
||||
@@ -7,13 +7,13 @@ use app\BaseController;
|
||||
/**
|
||||
* 控制器基础类
|
||||
*/
|
||||
abstract class ToolsBase extends BaseController
|
||||
abstract class AdminBase extends BaseController
|
||||
{
|
||||
/**
|
||||
* 控制器中间件
|
||||
* @var array
|
||||
*/
|
||||
protected $middleware = [
|
||||
'online'
|
||||
'login'
|
||||
];
|
||||
}
|
||||
Loaded 3 of 17 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user