chore: 重写初始提交(清空历史,整理后全量提交)
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-header">回收站</div>
|
||||
<div class="layui-card-body">
|
||||
<table class="layui-table" id="table" lay-filter="table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/html" id="toolbar">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="restore">恢复</a>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
layui.use(['table'], function () {
|
||||
var table = layui.table;
|
||||
var tableIns = table.render({
|
||||
elem: '#table',
|
||||
url: "{:url('articles/backend.article/recyclebin')}",
|
||||
method: 'post',
|
||||
page: true,
|
||||
cols: [[
|
||||
{ field: 'id', title: 'ID', width: 70 },
|
||||
{ field: 'title', title: '标题', minWidth: 200 },
|
||||
{ field: 'delete_at', title: '删除时间', width: 170 },
|
||||
{ title: '操作', width: 90, toolbar: '#toolbar' }
|
||||
]]
|
||||
});
|
||||
table.on('tool(table)', function (obj) {
|
||||
if (obj.event === 'restore') {
|
||||
$.post("{:url('articles/backend.article/restore')}", { id: obj.data.id }, function (r) {
|
||||
layer.msg(r.msg); if (r.code) { obj.del(); }
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user