diff --git a/app/admin/controller/Oplog.php b/app/admin/controller/Oplog.php index fa45353d8..ddc68c5f2 100644 --- a/app/admin/controller/Oplog.php +++ b/app/admin/controller/Oplog.php @@ -44,9 +44,13 @@ class Oplog extends Controller { $this->title = '系统日志管理'; $this->isSupper = AdminService::instance()->isSuper(); - $query = $this->_query($this->table); - $query->like('action,node,content,username,geoip'); - $query->dateBetween('create_at')->order('id desc')->page(); + $query = $this->_query($this->table)->order('id desc'); + $query->like('action,node,content,username,geoip')->dateBetween('create_at'); + if (input('output') === 'json') { + $this->success('获取数据成功', $query->page(true, false)); + } else { + $query->page(); + } } /** diff --git a/app/admin/view/oplog/index_search.html b/app/admin/view/oplog/index_search.html index 7a05d7607..19ef0fbb1 100644 --- a/app/admin/view/oplog/index_search.html +++ b/app/admin/view/oplog/index_search.html @@ -47,10 +47,25 @@
- + +
- \ No newline at end of file + + \ No newline at end of file