新增备份
This commit is contained in:
@@ -8,6 +8,8 @@ abstract class CatchController
|
||||
{
|
||||
protected $middleware = ['check_auth'];
|
||||
|
||||
protected $data = [];
|
||||
|
||||
/**
|
||||
*
|
||||
* @time 2019年11月28日
|
||||
@@ -26,6 +28,10 @@ abstract class CatchController
|
||||
'view_path' => CatchAdmin::getViews()[$this->getModule($end['class'])]
|
||||
]);
|
||||
|
||||
if (!empty($this->data)) {
|
||||
$data = array_merge($this->data, $data);
|
||||
}
|
||||
|
||||
return View::fetch($template ? : $this->getTemp($end['class'], $end['function']), $data);
|
||||
|
||||
}
|
||||
@@ -62,4 +68,27 @@ abstract class CatchController
|
||||
{
|
||||
return explode('\\', $class)[1];
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @time 2019年12月13日
|
||||
* @param $name
|
||||
* @param $value
|
||||
* @return void
|
||||
*/
|
||||
public function __set($name, $value)
|
||||
{
|
||||
// TODO: Implement __set() method.
|
||||
$this->data[$name] = $value;
|
||||
}
|
||||
|
||||
public function __get($name)
|
||||
{
|
||||
// TODO: Implement __get() method.
|
||||
}
|
||||
|
||||
public function __isset($name)
|
||||
{
|
||||
// TODO: Implement __isset() method.
|
||||
}
|
||||
}
|
||||
|
@@ -17,6 +17,8 @@ abstract class CatchModel extends \think\Model
|
||||
|
||||
protected $deleteTime = 'deleted_at';
|
||||
|
||||
protected $defaultSoftDelete = 0;
|
||||
|
||||
protected $autoWriteTimestamp = true;
|
||||
|
||||
protected $limit = 10;
|
||||
|
@@ -5,7 +5,7 @@ use app\Request;
|
||||
use catcher\exceptions\ValidateFailedException;
|
||||
use think\Validate;
|
||||
|
||||
abstract class CatchRequest extends Request
|
||||
class CatchRequest extends Request
|
||||
{
|
||||
/**
|
||||
* Request constructor.
|
||||
@@ -35,8 +35,4 @@ abstract class CatchRequest extends Request
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
abstract protected function rules(): array;
|
||||
|
||||
abstract protected function message(): array;
|
||||
}
|
||||
|
Reference in New Issue
Block a user