You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
211 lines
9.0 KiB
211 lines
9.0 KiB
<?php /*a:2:{s:77:"E:\waibao\ahbcqz\server\app\admin\view\community\community_comment\lists.html";i:1679478874;s:51:"E:\waibao\ahbcqz\server\app\admin\view\layout1.html";i:1679478874;}*/ ?>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title><?php echo url(); ?></title>
|
|
<meta name="renderer" content="webkit">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
|
<link rel="stylesheet" href="/static/lib/layui/css/layui.css?v=<?php echo htmlentities($front_version); ?>">
|
|
<link rel="stylesheet" href="/static/admin/css/app.css?v=<?php echo htmlentities($front_version); ?>">
|
|
<link rel="stylesheet" href="/static/admin/css/like.css?v=<?php echo htmlentities($front_version); ?>">
|
|
<script src="/static/lib/layui/layui.js?v=<?php echo htmlentities($front_version); ?>"></script>
|
|
<script src="/static/admin/js/app.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<?php echo $js_code; ?>
|
|
<script src="/static/admin/js/jquery.min.js"></script>
|
|
<script src="/static/admin/js/function.js"></script>
|
|
|
|
|
|
<style>
|
|
|
|
</style>
|
|
<div class="wrapper">
|
|
<div class="layui-card">
|
|
<!-- 操作提示 -->
|
|
<div class="layui-card-body">
|
|
<div class="layui-collapse" style="border:1px dashed #c4c4c4">
|
|
<div class="layui-colla-item">
|
|
<h2 class="layui-colla-title like-layui-colla-title">操作提示</h2>
|
|
<div class="layui-colla-content layui-show">
|
|
<p>*可对社区文章评论进行管理审核.</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 搜索区域 -->
|
|
<div class="layui-card-body layui-form">
|
|
<div class="layui-form-item">
|
|
<div class="layui-inline">
|
|
<label for="keyword" class="layui-form-label">会员信息:</label>
|
|
<div class="layui-input-inline">
|
|
<input type="text" id="keyword" name="keyword" autocomplete="off" class="layui-input" placeholder="请输入昵称/编号/手机号">
|
|
</div>
|
|
</div>
|
|
<div class="layui-inline">
|
|
<label for="comment" class="layui-form-label">内容搜索:</label>
|
|
<div class="layui-input-inline">
|
|
<input type="text" id="comment" name="comment" autocomplete="off" class="layui-input" placeholder="请输入评论内容">
|
|
</div>
|
|
</div>
|
|
<div class="layui-inline">
|
|
<label for="status" class="layui-form-label">审核状态:</label>
|
|
<div class="layui-input-inline">
|
|
<select name="status" id="status">
|
|
<option value="">全部</option>
|
|
<?php foreach($status as $item => $val): ?>
|
|
<option value="<?php echo htmlentities($item); ?>"><?php echo htmlentities($val); ?></option>
|
|
<?php endforeach; ?>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="layui-inline">
|
|
<a class="layui-btn layui-btn-sm layui-btn-normal" lay-submit lay-filter="search">搜索</a>
|
|
<a class="layui-btn layui-btn-sm layui-btn-primary" lay-submit lay-filter="clear-search">重置</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 主体区域 -->
|
|
<div class="layui-card-body">
|
|
<table id="like-table-lists" lay-filter="like-table-lists"></table>
|
|
<script type="text/html" id="table-operation">
|
|
{{# if(d.status == 0){ }}
|
|
<a class="layui-btn layui-btn-normal layui-btn-sm" lay-event="audit">审核</a>
|
|
{{# } }}
|
|
<a class="layui-btn layui-btn-danger layui-btn-sm" lay-event="del">删除</a>
|
|
</script>
|
|
<script type="text/html" id="table-userInfo">
|
|
<img src="{{d.avatar}}" alt="图标" style="width:60px;height:60px;margin-right:5px;">
|
|
<div class="layui-inline" style="text-align:left;">
|
|
<p>编号:{{d.sn}}</p>
|
|
<p>昵称:{{d.nickname}}</p>
|
|
</div>
|
|
</script>
|
|
<script type="text/html" id="table-articleContent">
|
|
<div>{{d.article.content}}</div>
|
|
</script>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
layui.use(["table", "form", "laydate"], function(){
|
|
var table = layui.table;
|
|
var form = layui.form;
|
|
var laydate = layui.laydate;
|
|
|
|
laydate.render({
|
|
elem: '#start_time'
|
|
, type: 'datetime'
|
|
});
|
|
|
|
laydate.render({
|
|
elem: '#end_time'
|
|
, type: 'datetime'
|
|
});
|
|
|
|
like.tableLists("#like-table-lists", "<?php echo url(); ?>", [
|
|
{field:"user", align:"center",width: 240, title:"会员信息", templet: "#table-userInfo"}
|
|
,{field:"article_content", width: 250,title:"种草内容", templet: "#table-articleContent"}
|
|
,{field:"comment", width: 300,title:"评价内容"}
|
|
,{field:"topic_name", width: 150, align:"center",title:"话题"}
|
|
,{field:"status_desc", width: 120, align:"center", title:"审核状态"}
|
|
,{field:"create_time", width: 180, align:"center", title:"评论时间"}
|
|
,{title:"操作", align:"left", fixed:"right",width: 160, toolbar:"#table-operation"}
|
|
]);
|
|
|
|
var active = {
|
|
audit: function(obj) {
|
|
layer.open({
|
|
type: 2
|
|
,title: "评论审核"
|
|
,content: "<?php echo url('community.CommunityComment/audit'); ?>?id=" + obj.data.id
|
|
,area: ["60%", "60%"]
|
|
,btn: ["确定", "取消"]
|
|
,yes: function(index, layero){
|
|
var iframeWindow = window["layui-layer-iframe" + index];
|
|
var submit = layero.find("iframe").contents().find("#addSubmit");
|
|
iframeWindow.layui.form.on("submit(addSubmit)", function(data){
|
|
data.field['id'] = obj.data.id;
|
|
like.ajax({
|
|
url: "<?php echo url('community.CommunityComment/audit'); ?>",
|
|
data: data.field,
|
|
type: "POST",
|
|
success:function(res) {
|
|
if(res.code === 1) {
|
|
layui.layer.msg(res.msg, {offset: '15px', icon: 1, time: 1000});
|
|
layer.close(index);
|
|
table.reload("like-table-lists", {
|
|
where: {},
|
|
page: { cur: 1 }
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
submit.trigger("click");
|
|
}
|
|
});
|
|
},
|
|
del: function(obj) {
|
|
var comment = "<div style='width:200px;overflow:hidden;text-overflow: ellipsis;white-space:nowrap;'>" +
|
|
"<span>确定删除评论:</span>" +
|
|
"<span style='color: red;'>"+obj.data.comment +"</span></div>";
|
|
layer.confirm(comment, function(index) {
|
|
like.ajax({
|
|
url: "<?php echo url('community.CommunityComment/del'); ?>",
|
|
data: {id: obj.data.id},
|
|
type: "POST",
|
|
success: function (res) {
|
|
if (res.code === 1) {
|
|
layui.layer.msg(res.msg, {offset: '15px', icon: 1, time: 1000});
|
|
layer.close(index);
|
|
obj.del();
|
|
}
|
|
}
|
|
});
|
|
layer.close(index);
|
|
})
|
|
}
|
|
};
|
|
like.eventClick(active);
|
|
|
|
|
|
|
|
//图片放大
|
|
$(document).on('click', '.image-show', function () {
|
|
var src = $(this).attr('src');
|
|
like.showImg(src,400);
|
|
});
|
|
|
|
form.on("submit(search)", function(data){
|
|
table.reload("like-table-lists", {
|
|
where: data.field,
|
|
page: {
|
|
curr: 1
|
|
}
|
|
});
|
|
});
|
|
|
|
form.on("submit(clear-search)", function(){
|
|
$("#keyword").val("");
|
|
$("#comment").val("");
|
|
$("#status").val("");
|
|
form.render("select");
|
|
table.reload("like-table-lists", {
|
|
where: {},
|
|
page: {
|
|
curr: 1
|
|
}
|
|
});
|
|
});
|
|
})
|
|
</script>
|
|
</body>
|
|
</html>
|