From 0b98f720b1dded6819d74be394b1533b96885da3 Mon Sep 17 00:00:00 2001 From: Anyon Date: Thu, 24 Sep 2020 19:43:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=B3=BB=E7=BB=9F=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/controller/Oplog.php | 3 ++- app/admin/view/oplog/index.html | 30 +++++++++++++++++++++++++----- 2 files changed, 27 insertions(+), 6 deletions(-) diff --git a/app/admin/controller/Oplog.php b/app/admin/controller/Oplog.php index b2729e318..fa45353d8 100644 --- a/app/admin/controller/Oplog.php +++ b/app/admin/controller/Oplog.php @@ -44,7 +44,8 @@ class Oplog extends Controller { $this->title = '系统日志管理'; $this->isSupper = AdminService::instance()->isSuper(); - $query = $this->_query($this->table)->like('action,node,content,username,geoip'); + $query = $this->_query($this->table); + $query->like('action,node,content,username,geoip'); $query->dateBetween('create_at')->order('id desc')->page(); } diff --git a/app/admin/view/oplog/index.html b/app/admin/view/oplog/index.html index a20374aa2..b8af03058 100644 --- a/app/admin/view/oplog/index.html +++ b/app/admin/view/oplog/index.html @@ -42,16 +42,22 @@ 操作节点:{$vo.node|default='-'} -
-

{$vo.action|default='-'}

-
{$vo.content|default='-'}
-
+

{$vo.action|default='-'}

+ {if preg_match('|\s+(\w+)\s+数据|', $vo.action)} + + {else} + {$vo.content|default='-'} + {/if}

{$vo.geoip|default='-'}

{$vo.isp|default='-'}

- 日期:{$vo.create_at|format_datetime|str_replace=' ','
时间:',###|raw} + + 日期:{$vo.create_at|format_datetime|str_replace=' ','
时间:',###|raw} + 删 除 @@ -65,3 +71,17 @@ {empty name='list'}没有记录哦{else}{$pagehtml|raw|default=''}{/empty} {/block} + +{block name='script'} + +{/block}