rabin 2 years ago
parent
commit
dd17dd6c6c
2 changed files with 17 additions and 0 deletions
  1. 1 0
      database/log.php
  2. 16 0
      src/Api.php

+ 1 - 0
database/log.php

@@ -179,6 +179,7 @@ return array
 
 	'manage' => array
 	(
+		'list_table' => 'html',
 		'delete' => false,
 		'edit' => false,
 		'insert' => false,

+ 16 - 0
src/Api.php

@@ -447,4 +447,20 @@ class Api
         $response = $this->showTable($response);
         return '接口名称:'.$name.'<br />接口地址:<br  />'.Dever::url($site, $project).'<br />'.$html.'请求参数:<br />'.$request.'<br />输出参数:<br />'.$response;
     }
+
+    # 获取日志信息
+    public function getLog($tid, $project, $table, $type = 1)
+    {
+        $where['project'] = $project;
+        $where['table'] = $table;
+        $where['tid'] = $tid;
+        $where['type'] = $type;
+        $info = Dever::db('manage/log')->find($where);
+
+        if ($info) {
+            $info['info'] = Dever::json_decode($info['info']);
+        }
+
+        return $info;
+    }
 }