'wip(semantic):调整模板api接口'

This commit is contained in:
zhengxinonly
2021-09-12 18:16:02 +08:00
parent b9c449ad57
commit 550f99e468
30 changed files with 259 additions and 240 deletions
+8 -4
View File
@@ -40,14 +40,16 @@
{{# } }}'|safe }}
</script>
<script>
<script type="module">
import { parserTableData as parseData } from '/static/api/http.js'
layui.use(['table', 'form', 'jquery', 'element', 'util'], function () {
let table = layui.table
let form = layui.form
let MODULE_PATH = '/logs/'
let cols = [
const get_columns = () => [
[
{ title: 'ID', field: 'id', align: 'center' },
{ title: '请求方式', field: 'method', align: 'center' },
@@ -62,19 +64,21 @@
]
table.render({
parseData,
elem: '#log-access-table',
url: MODULE_PATH + 'access_log',
page: true,
cols: cols,
cols: get_columns(),
skin: 'line',
toolbar: false,
})
table.render({
parseData,
elem: '#log-login-table',
url: MODULE_PATH + 'login_log',
page: true,
cols: cols,
cols: get_columns(),
skin: 'line',
toolbar: false,
})