comment_list.html
2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{include file="common/head"/}
<div class="admin-main layui-anim layui-anim-upbit">
<fieldset class="layui-elem-field layui-field-title">
<legend>评论管理</legend>
</fieldset>
<a href="{:url('add')}" class="layui-btn" style="float:right;"><i class="fa fa-plus" aria-hidden="true"></i>{:lang('add')}评论</a>
<table class="layui-table" id="list" lay-filter="list"></table>
</div>
{include file="common/foot"/}
<script>
layui.use(['table','form'], function() {
var table = layui.table,form = layui.form,$ = layui.jquery;
var tableIn = table.render({
id: 'ad',
elem: '#list',
url: '{:url("CommentList")}',
method: 'post',
page:true,
cols: [[
{field: 'id', title: '{:lang("id")}', width: 80, fixed: true},
{field: 'text', title: '评论内容', width: 200},
{field: 'author', align: 'center', title: '评论昵称', width: 200},
{field: 'isnoshow', align: 'center', title: '是否匿名', width: 200},
{field: 'soucre', align: 'center', title: '来源渠道', width: 120, templet: '#order'}
]],
limit:10
});
/*table.on('tool(list)', function(obj) {
var data = obj.data;
if (obj.event === 'del'){
layer.confirm('您确定要删除该节日吗?', function(index){
var loading = layer.load(1, {shade: [0.1, '#fff']});
$.post("{:url('del')}",{id:data.id},function(res){
layer.close(loading);
if(res.code===1){
layer.msg(res.msg,{time:1000,icon:1});
tableIn.reload();
}else{
layer.msg('操作失败!',{time:1000,icon:2});
}
});
layer.close(index);
});
}
});*/
})
</script>