diff --git a/app/admin/controller/Base.php b/app/admin/controller/Base.php index 3d277afdb..ad12bb283 100644 --- a/app/admin/controller/Base.php +++ b/app/admin/controller/Base.php @@ -40,7 +40,7 @@ class Base extends Controller SystemBase::mQuery()->layTable(function () { $this->title = '数据字典管理'; $this->types = SystemBase::mk()->types(); - $this->type = input('get.type') ?: ($this->types[0] ?? '-'); + $this->type = input('get.type', $this->types[0] ?? '-'); }, function (QueryHelper $query) { $query->where(['deleted' => 0])->equal('type'); $query->like('code,name,status')->dateBetween('create_at'); diff --git a/app/admin/controller/Menu.php b/app/admin/controller/Menu.php index e63508557..a075f6406 100644 --- a/app/admin/controller/Menu.php +++ b/app/admin/controller/Menu.php @@ -41,7 +41,7 @@ class Menu extends Controller public function index() { $this->title = '系统菜单管理'; - $this->type = input('type', 'index'); + $this->type = input('get.type', 'index'); SystemMenu::mQuery()->order('sort desc,id asc')->page(false, true); } diff --git a/app/admin/controller/Oplog.php b/app/admin/controller/Oplog.php index 2de3d0624..5fe9d1c08 100644 --- a/app/admin/controller/Oplog.php +++ b/app/admin/controller/Oplog.php @@ -42,7 +42,7 @@ class Oplog extends Controller { SystemOplog::mQuery()->layTable(function () { $this->title = '系统日志管理'; - $columns = SystemOplog::mk()->column('username,action', 'id'); + $columns = SystemOplog::mk()->column('action,username', 'id'); $this->users = array_unique(array_column($columns, 'username')); $this->actions = array_unique(array_column($columns, 'action')); }, function (QueryHelper $query) {