'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
+4 -3
View File
@@ -31,7 +31,7 @@
</script>
<script type="module">
import { FILE_API } from '/static/api/http.js'
import { FILE_API, parserTableData as parseData } from '/static/api/http.js'
layui.use(['table', 'form', 'jquery', 'element', 'form', 'upload'], function () {
let table = layui.table
@@ -39,7 +39,7 @@
let $ = layui.jquery
let upload = layui.upload
let cols = [
const get_columns = () => [
[
{
type: 'checkbox',
@@ -98,10 +98,11 @@
]
table.render({
parseData,
elem: '#tables',
url: FILE_API.PHOTOS(),
page: true,
cols: cols,
cols: get_columns(),
skin: 'line',
toolbar: '#toolbar',
defaultToolbar: [
+2 -2
View File
@@ -51,12 +51,12 @@
, bindAction: '#logo-upload-button'
, done: function (res) {
if (res.success) {
layer.msg(res.msg, { icon: 1, time: 500 }, function () {
layer.msg(res.message, { icon: 1, time: 500 }, function () {
parent.layer.close(parent.layer.getFrameIndex(window.name))//关闭当前页
window.parent.location.reload()
})
} else {
layer.msg(res.msg, { icon: 2 })
layer.msg(res.message, { icon: 2 })
}
},
})