save
This commit is contained in:
parent
50a6e7a23e
commit
74e2f047f8
@ -454,7 +454,7 @@ EOF;
|
||||
}
|
||||
|
||||
/**
|
||||
* swtich组件
|
||||
* switch组件
|
||||
* @param $options
|
||||
* @return void
|
||||
*/
|
||||
|
@ -95,7 +95,6 @@ class AccountController extends Crud
|
||||
return $this->json(0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取登录信息
|
||||
* @param Request $request
|
||||
@ -123,7 +122,6 @@ class AccountController extends Crud
|
||||
|
||||
/**
|
||||
* 更新
|
||||
*
|
||||
* @param Request $request
|
||||
* @return Response
|
||||
*/
|
||||
@ -196,7 +194,6 @@ class AccountController extends Crud
|
||||
|
||||
/**
|
||||
* 检查登录频率限制
|
||||
*
|
||||
* @param $username
|
||||
* @return void
|
||||
* @throws BusinessException
|
||||
@ -229,7 +226,6 @@ class AccountController extends Crud
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 解除登录频率限制
|
||||
* @param $username
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
namespace plugin\admin\app\controller;
|
||||
|
||||
use plugin\admin\app\controller\Base;
|
||||
use plugin\admin\app\controller\Crud;
|
||||
use plugin\admin\app\model\Admin;
|
||||
use support\exception\BusinessException;
|
||||
use support\Request;
|
||||
|
@ -59,7 +59,7 @@ class AdminRoleController extends Crud
|
||||
return view("admin-role/update");
|
||||
}
|
||||
[$id, $data] = $this->updateInput($request);
|
||||
// 管理员id为1的用户权限固定为*
|
||||
// id为1的管理员权限固定为*
|
||||
if (isset($data['rules']) && $id == 1) {
|
||||
$data['rules'] = '*';
|
||||
}
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
namespace plugin\admin\app\controller;
|
||||
|
||||
use Doctrine\Inflector\InflectorFactory;
|
||||
use plugin\admin\app\common\LayuiForm;
|
||||
use plugin\admin\app\common\Util;
|
||||
use plugin\admin\app\model\AdminRole;
|
||||
use plugin\admin\app\model\AdminRule;
|
||||
@ -28,7 +26,6 @@ class AdminRuleController extends Crud
|
||||
*/
|
||||
protected $model = null;
|
||||
|
||||
|
||||
/**
|
||||
* 构造函数
|
||||
*/
|
||||
|
@ -4,7 +4,6 @@ namespace plugin\admin\app\controller;
|
||||
|
||||
use support\Model;
|
||||
use support\Response;
|
||||
use function json;
|
||||
|
||||
/**
|
||||
* 基础控制器
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
namespace plugin\admin\app\controller;
|
||||
|
||||
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
|
||||
use Illuminate\Database\Query\Builder as QueryBuilder;
|
||||
use plugin\admin\app\common\Util;
|
||||
use support\exception\BusinessException;
|
||||
use support\Model;
|
||||
@ -16,7 +18,6 @@ class Crud extends Base
|
||||
*/
|
||||
protected $model = null;
|
||||
|
||||
|
||||
/**
|
||||
* 查询
|
||||
* @param Request $request
|
||||
@ -126,7 +127,7 @@ class Crud extends Base
|
||||
* @param array $where
|
||||
* @param string|null $field
|
||||
* @param string $order
|
||||
* @return \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder|Model
|
||||
* @return EloquentBuilder|QueryBuilder|Model
|
||||
*/
|
||||
protected function doSelect(array $where, string $field = null, string $order= 'desc')
|
||||
{
|
||||
@ -253,7 +254,7 @@ class Crud extends Base
|
||||
* @return array
|
||||
* @throws BusinessException
|
||||
*/
|
||||
protected function inputFilter(array $data)
|
||||
protected function inputFilter(array $data): array
|
||||
{
|
||||
$table = $this->model->getTable();
|
||||
$allow_column = Util::db()->select("desc `$table`");
|
||||
|
Loading…
Reference in New Issue
Block a user