帖子相关
This commit is contained in:
parent
38ac88505b
commit
a5acd6cb6e
@ -45,6 +45,13 @@ abstract class BaseController
|
|||||||
*/
|
*/
|
||||||
protected $middleware = [];
|
protected $middleware = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* article content
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $content = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构造方法
|
* 构造方法
|
||||||
* @access public
|
* @access public
|
||||||
@ -221,7 +228,7 @@ abstract class BaseController
|
|||||||
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false );
|
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false );
|
||||||
curl_setopt($ch, CURLOPT_URL, $url);
|
curl_setopt($ch, CURLOPT_URL, $url);
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
|
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
|
||||||
$file = curl_exec($ch);
|
$file = curl_exec($ch);
|
||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
return $this->saveAsImage($url, $file);
|
return $this->saveAsImage($url, $file);
|
||||||
@ -265,8 +272,9 @@ abstract class BaseController
|
|||||||
//下载网络图片到本地并替换
|
//下载网络图片到本地并替换
|
||||||
public function downUrlPicsReaplace($content)
|
public function downUrlPicsReaplace($content)
|
||||||
{
|
{
|
||||||
|
$this->content = $content;
|
||||||
// 批量下载网络图片并替换
|
// 批量下载网络图片并替换
|
||||||
$images = $this->getArticleAllpic($content);
|
$images = $this->getArticleAllpic($this->content);
|
||||||
if(count($images)) {
|
if(count($images)) {
|
||||||
foreach($images as $image){
|
foreach($images as $image){
|
||||||
//1.带http地址的图片,2.非本站的网络图片 3.非带有?号等参数的图片
|
//1.带http地址的图片,2.非本站的网络图片 3.非带有?号等参数的图片
|
||||||
@ -275,13 +283,13 @@ abstract class BaseController
|
|||||||
//下载远程图片(可下载)
|
//下载远程图片(可下载)
|
||||||
$newImageUrl = $this->downloadImage($image);
|
$newImageUrl = $this->downloadImage($image);
|
||||||
//替换图片链接
|
//替换图片链接
|
||||||
$content = str_replace($image, Request::domain().$newImageUrl, $content);
|
$this->content = str_replace($image, Request::domain().$newImageUrl, $this->content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//不可下载的图片,如加密或者带有参数的图片如?type=jpeg,直接返回content
|
//不可下载的图片,如加密或者带有参数的图片如?type=jpeg,直接返回content
|
||||||
}
|
}
|
||||||
|
|
||||||
return $content;
|
return $this->content;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -166,7 +166,29 @@ class Comment extends AdminController
|
|||||||
return json(['code'=>0,'msg'=>'评论被禁止','icon'=>5]);
|
return json(['code'=>0,'msg'=>'评论被禁止','icon'=>5]);
|
||||||
}
|
}
|
||||||
return json(['code'=>-1,'msg'=>'审核出错']);
|
return json(['code'=>-1,'msg'=>'审核出错']);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多选批量审核
|
||||||
|
*
|
||||||
|
* @return Json
|
||||||
|
*/
|
||||||
|
public function checkSelect()
|
||||||
|
{
|
||||||
|
$param = Request::param('data');
|
||||||
|
$data = [];
|
||||||
|
foreach($param as $v) {
|
||||||
|
$data[] = ['id' => (int)$v['id'], 'status' => $v['check'] == '1' ? '-1' : '1'];
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取状态
|
||||||
|
$res = $this->model->saveAll($data);
|
||||||
|
|
||||||
|
if($res){
|
||||||
|
return json(['code'=>0,'msg'=>'审核成功','icon'=>6]);
|
||||||
|
}else {
|
||||||
|
return json(['code'=>-1,'msg'=>'失败啦','icon'=>6]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -277,6 +277,29 @@ class Forum extends AdminController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多选批量审核
|
||||||
|
*
|
||||||
|
* @return Json
|
||||||
|
*/
|
||||||
|
public function checkSelect()
|
||||||
|
{
|
||||||
|
$param = Request::param('data');
|
||||||
|
$data = [];
|
||||||
|
foreach($param as $v) {
|
||||||
|
$data[] = ['id' => (int)$v['id'], 'status' => $v['check'] == '1' ? '-1' : '1'];
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取状态
|
||||||
|
$res = $this->model->saveAll($data);
|
||||||
|
|
||||||
|
if($res){
|
||||||
|
return json(['code'=>0,'msg'=>'审核成功','icon'=>6]);
|
||||||
|
}else {
|
||||||
|
return json(['code'=>-1,'msg'=>'失败啦','icon'=>6]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上传接口
|
* 上传接口
|
||||||
*
|
*
|
||||||
|
@ -5,74 +5,77 @@
|
|||||||
<title>管理员管理</title>
|
<title>管理员管理</title>
|
||||||
<link rel="stylesheet" href="/static/component/pear/css/pear.css" />
|
<link rel="stylesheet" href="/static/component/pear/css/pear.css" />
|
||||||
</head>
|
</head>
|
||||||
<body class="pear-container">
|
<body class="pear-container">
|
||||||
<div class="layui-card">
|
<div class="layui-card">
|
||||||
<div class="layui-card-body">
|
<div class="layui-card-body">
|
||||||
<form class="layui-form" action="">
|
<form class="layui-form" action="">
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<div class="layui-inline layuiadmin-input-useradmin">
|
<div class="layui-inline layuiadmin-input-useradmin">
|
||||||
<label class="layui-form-label">回帖人</label>
|
<label class="layui-form-label">回帖人</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" name="name" placeholder="请输入" autocomplete="off" class="layui-input">
|
<input type="text" name="name" placeholder="请输入" autocomplete="off" class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<label class="layui-form-label">内容</label>
|
<label class="layui-form-label">内容</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" name="content" placeholder="请输入" autocomplete="off" class="layui-input">
|
<input type="text" name="content" placeholder="请输入" autocomplete="off" class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<label class="layui-form-label">状态</label>
|
<label class="layui-form-label">状态</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<select name="status" lay-filter="fourm-check">
|
<select name="status" lay-filter="fourm-check">
|
||||||
<option value="">全部</option>
|
<option value="">全部</option>
|
||||||
<option value="0">待审</option>
|
<option value="0">待审</option>
|
||||||
<option value="-1">禁止</option>
|
<option value="-1">禁止</option>
|
||||||
<option value="1">通过</option>
|
<option value="1">通过</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item layui-inline">
|
<div class="layui-form-item layui-inline">
|
||||||
<button class="pear-btn pear-btn-md pear-btn-primary" lay-submit lay-filter="comment-query">
|
<button class="pear-btn pear-btn-md pear-btn-primary" lay-submit lay-filter="comment-query">
|
||||||
<i class="layui-icon layui-icon-search"></i>
|
<i class="layui-icon layui-icon-search"></i>
|
||||||
查询
|
查询
|
||||||
</button>
|
</button>
|
||||||
<button type="reset" class="pear-btn pear-btn-md">
|
<button type="reset" class="pear-btn pear-btn-md">
|
||||||
<i class="layui-icon layui-icon-refresh"></i>
|
<i class="layui-icon layui-icon-refresh"></i>
|
||||||
重置
|
重置
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-card">
|
<div class="layui-card">
|
||||||
<div class="layui-card-body">
|
<div class="layui-card-body">
|
||||||
<table id="comment-table" lay-filter="comment-table"></table>
|
<table id="comment-table" lay-filter="comment-table"></table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/html" id="comment-toolbar">
|
<script type="text/html" id="comment-toolbar">
|
||||||
<button class="pear-btn pear-btn-danger pear-btn-md" lay-event="batchRemove">
|
<button class="pear-btn pear-btn-danger pear-btn-md" lay-event="batchRemove">
|
||||||
<i class="layui-icon layui-icon-delete"></i>
|
<i class="layui-icon layui-icon-delete"></i>
|
||||||
删除
|
删除
|
||||||
</button>
|
</button>
|
||||||
</script>
|
<button class="pear-btn layui-bg-orange pear-btn-md" lay-event="checkSelect">
|
||||||
|
批量审核
|
||||||
|
</button>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<script type="text/html" id="imgTpl">
|
<script type="text/html" id="imgTpl">
|
||||||
<img style="width: 25px; height: 25px;" src= {{ d.avatar }}>
|
<img style="width: 25px; height: 25px;" src= {{ d.avatar }}>
|
||||||
</script>
|
</script>
|
||||||
<script type="text/html" id="buttonCheck">
|
<script type="text/html" id="buttonCheck">
|
||||||
<input type="checkbox" name="check" lay-skin="switch" lay-filter="check" lay-text="通过|{{ d.check == 0 ? '待审' : '禁止' }}" {{ d.check == 1 ? 'checked' : '' }} id="{{d.id}}" >
|
<input type="checkbox" name="check" lay-skin="switch" lay-filter="check" lay-text="通过|{{ d.check == 0 ? '待审' : '禁止' }}" {{ d.check == 1 ? 'checked' : '' }} id="{{d.id}}" >
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" id="comment-bar">
|
<script type="text/html" id="comment-bar">
|
||||||
<!--<button class="pear-btn pear-btn-primary pear-btn-sm" lay-event="edit"><i class="layui-icon layui-icon-edit"></i></button>-->
|
<!--<button class="pear-btn pear-btn-primary pear-btn-sm" lay-event="edit"><i class="layui-icon layui-icon-edit"></i></button>-->
|
||||||
<button class="pear-btn pear-btn-danger pear-btn-sm" lay-event="remove"><i class="layui-icon layui-icon-delete"></i></button>
|
<button class="pear-btn pear-btn-danger pear-btn-sm" lay-event="remove"><i class="layui-icon layui-icon-delete"></i></button>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -125,7 +128,9 @@
|
|||||||
window.refresh();
|
window.refresh();
|
||||||
} else if (obj.event === 'batchRemove') {
|
} else if (obj.event === 'batchRemove') {
|
||||||
window.batchRemove(obj);
|
window.batchRemove(obj);
|
||||||
}
|
} else if (obj.event === 'checkSelect') {
|
||||||
|
window.checkSelect(obj);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
form.on('submit(comment-query)', function(data) {
|
form.on('submit(comment-query)', function(data) {
|
||||||
@ -246,6 +251,53 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 全选审核
|
||||||
|
window.checkSelect = function(obj) {
|
||||||
|
var id = obj.config.id;
|
||||||
|
var checkStatus = table.checkStatus(id);
|
||||||
|
var data = checkStatus.data;
|
||||||
|
|
||||||
|
if (data.length === 0) {
|
||||||
|
layer.msg("未选中数据", {
|
||||||
|
icon: 3,
|
||||||
|
time: 1000
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
layer.confirm('确定要审核?', {
|
||||||
|
icon: 3,
|
||||||
|
title: '提示'
|
||||||
|
}, function(index) {
|
||||||
|
layer.close(index);
|
||||||
|
let loading = layer.load();
|
||||||
|
console.log(data)
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "{:url('content.comment/checkSelect')}",
|
||||||
|
dataType: 'json',
|
||||||
|
data: {data},
|
||||||
|
success: function(result) {
|
||||||
|
layer.close(loading);
|
||||||
|
if (result.code === 0) {
|
||||||
|
layer.msg(result.msg, {
|
||||||
|
icon: 1,
|
||||||
|
time: 1000
|
||||||
|
}, function() {
|
||||||
|
table.reload('comment-table');
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
layer.msg(result.msg, {
|
||||||
|
icon: 2,
|
||||||
|
time: 1000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
window.refresh = function(param) {
|
window.refresh = function(param) {
|
||||||
table.reload('comment-table');
|
table.reload('comment-table');
|
||||||
}
|
}
|
||||||
|
@ -5,339 +5,392 @@
|
|||||||
<title>用户管理</title>
|
<title>用户管理</title>
|
||||||
<link rel="stylesheet" href="/static/component/pear/css/pear.css" />
|
<link rel="stylesheet" href="/static/component/pear/css/pear.css" />
|
||||||
</head>
|
</head>
|
||||||
<body class="pear-container">
|
<body class="pear-container">
|
||||||
<div class="layui-card">
|
<div class="layui-card">
|
||||||
<div class="layui-card-body">
|
<div class="layui-card-body">
|
||||||
<form class="layui-form" action="">
|
<form class="layui-form" action="">
|
||||||
<div class="layui-row layui-col-space15 ">
|
<div class="layui-row layui-col-space15 ">
|
||||||
<div class="layui-col-md3">
|
<div class="layui-col-md3">
|
||||||
<label class="layui-form-label">选择类目</label>
|
<label class="layui-form-label">选择类目</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<div id="CateId" class="xm-select-demo"></div>
|
<div id="CateId" class="xm-select-demo"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-col-md3">
|
<div class="layui-col-md3">
|
||||||
<label class="layui-form-label">帖子ID</label>
|
<label class="layui-form-label">帖子ID</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" name="id" placeholder="请输入" autocomplete="off" class="layui-input">
|
<input type="text" name="id" placeholder="请输入" autocomplete="off" class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-col-md3">
|
<div class="layui-col-md3">
|
||||||
<label class="layui-form-label">发帖人</label>
|
<label class="layui-form-label">发帖人</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" name="name" placeholder="请输入" autocomplete="off" class="layui-input">
|
<input type="text" name="name" placeholder="请输入" autocomplete="off" class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-col-md3">
|
<div class="layui-col-md3">
|
||||||
<label class="layui-form-label">标题</label>
|
<label class="layui-form-label">标题</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<input type="text" name="title" placeholder="请输入" autocomplete="off" class="layui-input">
|
<input type="text" name="title" placeholder="请输入" autocomplete="off" class="layui-input">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-col-md3">
|
<div class="layui-col-md3">
|
||||||
<label class="layui-form-label">状态</label>
|
<label class="layui-form-label">状态</label>
|
||||||
<div class="layui-input-block">
|
<div class="layui-input-block">
|
||||||
<select name="sec">
|
<select name="sec">
|
||||||
<option value="">选择状态</option>
|
<option value="">选择状态</option>
|
||||||
<option value="1">正常</option>
|
<option value="1">正常</option>
|
||||||
<option value="5">禁止</option>
|
<option value="5">禁止</option>
|
||||||
<option value="6">待审</option>
|
<option value="6">待审</option>
|
||||||
<option value="2">置顶</option>
|
<option value="2">置顶</option>
|
||||||
<option value="3">加精</option>
|
<option value="3">加精</option>
|
||||||
<option value="4">禁评</option>
|
<option value="4">禁评</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-col-md3">
|
<div class="layui-col-md3">
|
||||||
<button class="pear-btn pear-btn-md pear-btn-primary" lay-submit lay-filter="forum-query">
|
<button class="pear-btn pear-btn-md pear-btn-primary" lay-submit lay-filter="forum-query">
|
||||||
<i class="layui-icon layui-icon-search"></i>
|
<i class="layui-icon layui-icon-search"></i>
|
||||||
查询
|
查询
|
||||||
</button>
|
</button>
|
||||||
<button type="reset" class="pear-btn pear-btn-md">
|
<button type="reset" class="pear-btn pear-btn-md">
|
||||||
<i class="layui-icon layui-icon-refresh"></i>
|
<i class="layui-icon layui-icon-refresh"></i>
|
||||||
重置
|
重置
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-card">
|
<div class="layui-card">
|
||||||
<div class="layui-card-body">
|
<div class="layui-card-body">
|
||||||
<table id="forum-table" lay-filter="forum-table" ></table>
|
<table id="forum-table" lay-filter="forum-table" ></table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/html" id="forum-toolbar">
|
<script type="text/html" id="forum-toolbar">
|
||||||
<button class="pear-btn pear-btn-primary pear-btn-md" lay-event="add">
|
<button class="pear-btn pear-btn-primary pear-btn-md" lay-event="add">
|
||||||
<i class="layui-icon layui-icon-add-1"></i>
|
<i class="layui-icon layui-icon-add-1"></i>
|
||||||
新增
|
新增
|
||||||
</button>
|
</button>
|
||||||
<button class="pear-btn pear-btn-danger pear-btn-md" lay-event="batchRemove">
|
<button class="pear-btn pear-btn-danger pear-btn-md" lay-event="batchRemove">
|
||||||
<i class="layui-icon layui-icon-delete"></i>
|
<i class="layui-icon layui-icon-delete"></i>
|
||||||
删除
|
删除
|
||||||
</button>
|
</button>
|
||||||
</script>
|
<button class="pear-btn layui-bg-orange pear-btn-md" lay-event="checkSelect">
|
||||||
|
批量审核
|
||||||
|
</button>
|
||||||
|
</script>
|
||||||
|
|
||||||
<script type="text/html" id="avatarTpl">
|
<script type="text/html" id="avatarTpl">
|
||||||
<div><img style="width: 25px; height: 25px;" src= "{{ d.avatar }}"></div>
|
<div><img style="width: 25px; height: 25px;" src= "{{ d.avatar }}"></div>
|
||||||
</script>
|
</script>
|
||||||
<script type="text/html" id="forum-istop">
|
<script type="text/html" id="forum-istop">
|
||||||
<input type="checkbox" name="is_top" value="{{d.id}}" lay-skin="switch" lay-text="是|否" lay-filter="isTop" {{ d.top == 1 ? 'checked' : '' }}>
|
<input type="checkbox" name="is_top" value="{{d.id}}" lay-skin="switch" lay-text="是|否" lay-filter="isTop" {{ d.top == 1 ? 'checked' : '' }}>
|
||||||
</script>
|
</script>
|
||||||
<script type="text/html" id="buttonHot">
|
<script type="text/html" id="buttonHot">
|
||||||
<input type="checkbox" name="is_hot" value="{{d.id}}" lay-skin="switch" lay-text="是|否" lay-filter="isHot" {{ d.hot == 1 ? 'checked' : '' }}>
|
<input type="checkbox" name="is_hot" value="{{d.id}}" lay-skin="switch" lay-text="是|否" lay-filter="isHot" {{ d.hot == 1 ? 'checked' : '' }}>
|
||||||
</script>
|
</script>
|
||||||
<script type="text/html" id="buttonReply">
|
<script type="text/html" id="buttonReply">
|
||||||
<input type="checkbox" name="is_reply" value="{{d.id}}" lay-skin="switch" lay-text="是|否" lay-filter="isReply" {{ d.reply == 0 ? 'checked' : '' }}>
|
<input type="checkbox" name="is_reply" value="{{d.id}}" lay-skin="switch" lay-text="是|否" lay-filter="isReply" {{ d.reply == 0 ? 'checked' : '' }}>
|
||||||
</script>
|
</script>
|
||||||
<script type="text/html" id="buttonCheck">
|
<script type="text/html" id="buttonCheck">
|
||||||
<input type="checkbox" name="status" value="{{d.id}}" lay-skin="switch" lay-filter="artStatus" lay-text="通过|{{ d.check == 0 ? '待审' : '禁止' }}" {{ d.check == 1 ? 'checked' : '' }}>
|
<input type="checkbox" name="status" value="{{d.id}}" lay-skin="switch" lay-filter="artStatus" lay-text="通过|{{ d.check == 0 ? '待审' : '禁止' }}" {{ d.check == 1 ? 'checked' : '' }}>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script type="text/html" id="forum-table-bar">
|
<script type="text/html" id="forum-table-bar">
|
||||||
<button class="pear-btn pear-btn-primary pear-btn-sm" lay-event="edit"><i class="layui-icon layui-icon-edit"></i></button>
|
<button class="pear-btn pear-btn-primary pear-btn-sm" lay-event="edit"><i class="layui-icon layui-icon-edit"></i></button>
|
||||||
<button class="pear-btn pear-btn-danger pear-btn-sm" lay-event="remove"><i class="layui-icon layui-icon-delete"></i></button>
|
<button class="pear-btn pear-btn-danger pear-btn-sm" lay-event="remove"><i class="layui-icon layui-icon-delete"></i></button>
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="/static/component/layui/layui.js"></script>
|
<script src="/static/component/layui/layui.js"></script>
|
||||||
<script src="/static/component/pear/pear.js"></script>
|
<script src="/static/component/pear/pear.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
const FORUM_List = "{:url('content.forum/list')}";
|
const FORUM_List = "{:url('content.forum/list')}";
|
||||||
|
|
||||||
layui.use(['toast','jquery','form', 'table','common','xmSelect'], function(){
|
layui.use(['toast','jquery','form', 'table','common','xmSelect'], function(){
|
||||||
var $ = layui.jquery
|
var $ = layui.jquery
|
||||||
,form = layui.form
|
,form = layui.form
|
||||||
,table = layui.table;
|
,table = layui.table;
|
||||||
let common = layui.common;
|
let common = layui.common;
|
||||||
var toast = layui.toast;
|
var toast = layui.toast;
|
||||||
var xmSelect = layui.xmSelect;
|
var xmSelect = layui.xmSelect;
|
||||||
|
|
||||||
let cols = [
|
let cols = [
|
||||||
[
|
[
|
||||||
{type: 'checkbox'}
|
{type: 'checkbox'}
|
||||||
,{field: 'id', width: 60, title: 'ID', sort: true}
|
,{field: 'id', width: 60, title: 'ID', sort: true}
|
||||||
,{field: 'avatar', title: '头像', width: 60, templet: '#avatarTpl'}
|
,{field: 'avatar', title: '头像', width: 60, templet: '#avatarTpl'}
|
||||||
,{field: 'poster', title: '账号',width: 80}
|
,{field: 'poster', title: '账号',width: 80}
|
||||||
,{field: 'title', title: '标题', minWidth: 180, templet: '<div><a href="{{- d.url }}" target="_blank">{{- d.title }}</a></div>'}
|
,{field: 'title', title: '标题', minWidth: 180, templet: '<div><a href="{{- d.url }}" target="_blank">{{- d.title }}</a></div>'}
|
||||||
,{field: 'cate', title: '类别', width: 120}
|
,{field: 'cate', title: '类别', width: 120}
|
||||||
,{field: 'content', title: '内容', 'escape':false, minWidth: 200}
|
,{field: 'content', title: '内容', 'escape':false, minWidth: 200}
|
||||||
,{field: 'posttime', title: '时间',width: 120, sort: true}
|
,{field: 'posttime', title: '时间',width: 120, sort: true}
|
||||||
,{field: 'top', title: '置顶', templet: '#forum-istop', width: 80, align: 'center'}
|
,{field: 'top', title: '置顶', templet: '#forum-istop', width: 80, align: 'center'}
|
||||||
,{field: 'hot', title: '加精', templet: '#buttonHot', width: 80, align: 'center'}
|
,{field: 'hot', title: '加精', templet: '#buttonHot', width: 80, align: 'center'}
|
||||||
,{field: 'reply', title: '禁评', templet: '#buttonReply', width: 80, align: 'center'}
|
,{field: 'reply', title: '禁评', templet: '#buttonReply', width: 80, align: 'center'}
|
||||||
,{field: 'check', title: '审帖', templet: '#buttonCheck', width: 95, align: 'center'}
|
,{field: 'check', title: '审帖', templet: '#buttonCheck', width: 95, align: 'center'}
|
||||||
,{title: '操作', width: 110, align: 'center', toolbar: '#forum-table-bar'}
|
,{title: '操作', width: 110, align: 'center', toolbar: '#forum-table-bar'}
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
table.render({
|
table.render({
|
||||||
elem: '#forum-table',
|
elem: '#forum-table',
|
||||||
url: FORUM_List,
|
url: FORUM_List,
|
||||||
page: true,
|
page: true,
|
||||||
cols: cols,
|
cols: cols,
|
||||||
skin: 'line',
|
skin: 'line',
|
||||||
toolbar: '#forum-toolbar',
|
toolbar: '#forum-toolbar',
|
||||||
defaultToolbar: [{
|
defaultToolbar: [{
|
||||||
title: '刷新',
|
title: '刷新',
|
||||||
layEvent: 'refresh',
|
layEvent: 'refresh',
|
||||||
icon: 'layui-icon-refresh',
|
icon: 'layui-icon-refresh',
|
||||||
}, 'filter', 'print', 'exports']
|
}, 'filter', 'print', 'exports']
|
||||||
});
|
});
|
||||||
|
|
||||||
// 动态分类
|
// 动态分类
|
||||||
function getSelectCate() {
|
function getSelectCate() {
|
||||||
// 分类选择
|
// 分类选择
|
||||||
$.get("{:url('content.forum/getCateList')}", function(res){
|
$.get("{:url('content.forum/getCateList')}", function(res){
|
||||||
// 渲染下拉树
|
// 渲染下拉树
|
||||||
xmSelect.render({
|
xmSelect.render({
|
||||||
el: '#CateId',
|
el: '#CateId',
|
||||||
name: 'cate_id',
|
name: 'cate_id',
|
||||||
height: '250px',
|
height: '250px',
|
||||||
layVerify: '',
|
layVerify: '',
|
||||||
layVerType: 'tips',
|
layVerType: 'tips',
|
||||||
data: res.data,
|
data: res.data,
|
||||||
initValue: [],
|
initValue: [],
|
||||||
model: {label: {type: 'text'}},
|
model: {label: {type: 'text'}},
|
||||||
prop: {
|
prop: {
|
||||||
name: 'catename',
|
name: 'catename',
|
||||||
value: 'id'
|
value: 'id'
|
||||||
},
|
},
|
||||||
radio: true,
|
radio: true,
|
||||||
clickClose: true,
|
clickClose: true,
|
||||||
tree: {
|
tree: {
|
||||||
show: true,
|
show: true,
|
||||||
indent: 15,
|
indent: 15,
|
||||||
strict: false,
|
strict: false,
|
||||||
expandedKeys: true
|
expandedKeys: true
|
||||||
},
|
},
|
||||||
tips: '请选择'
|
tips: '请选择'
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
getSelectCate();
|
|
||||||
|
|
||||||
table.on('tool(forum-table)', function(obj) {
|
getSelectCate();
|
||||||
if (obj.event === 'remove') {
|
|
||||||
window.remove(obj);
|
|
||||||
} else if (obj.event === 'edit') {
|
|
||||||
window.edit(obj);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
table.on('toolbar(forum-table)', function(obj) {
|
table.on('tool(forum-table)', function(obj) {
|
||||||
if (obj.event === 'add') {
|
if (obj.event === 'remove') {
|
||||||
window.add();
|
window.remove(obj);
|
||||||
} else if (obj.event === 'refresh') {
|
} else if (obj.event === 'edit') {
|
||||||
window.refresh();
|
window.edit(obj);
|
||||||
} else if (obj.event === 'batchRemove') {
|
}
|
||||||
window.batchRemove(obj);
|
});
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
form.on('submit(forum-query)', function(data) {
|
table.on('toolbar(forum-table)', function(obj) {
|
||||||
table.reload('forum-table', {
|
if (obj.event === 'add') {
|
||||||
where: data.field,
|
window.add();
|
||||||
page: {
|
} else if (obj.event === 'refresh') {
|
||||||
curr: 1 //重新从第 1 页开始
|
window.refresh();
|
||||||
}
|
} else if (obj.event === 'batchRemove') {
|
||||||
})
|
window.batchRemove(obj);
|
||||||
return false;
|
} else if (obj.event === 'checkSelect') {
|
||||||
});
|
window.checkSelect(obj);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// 监听置顶
|
form.on('submit(forum-query)', function(data) {
|
||||||
form.on('switch(isTop)', function(obj){
|
table.reload('forum-table', {
|
||||||
$.post("{:url('content.forum/check')}",{id:obj.value, name:obj.elem.name,value:obj.elem.checked ? 1 : 0},function(res){
|
where: data.field,
|
||||||
layer.tips(obj.value + ' ' + obj.elem.name + ':'+ obj.elem.checked, obj.othis);
|
page: {
|
||||||
});
|
curr: 1 //重新从第 1 页开始
|
||||||
});
|
}
|
||||||
|
})
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
// 监听加精
|
// 监听置顶
|
||||||
form.on('switch(isHot)', function(obj){
|
form.on('switch(isTop)', function(obj){
|
||||||
$.post("{:url('content.forum/check')}",{id:obj.value, name:obj.elem.name,value: obj.elem.checked ? 1 : 0},function(res){
|
$.post("{:url('content.forum/check')}",{id:obj.value, name:obj.elem.name,value:obj.elem.checked ? 1 : 0},function(res){
|
||||||
layer.tips(obj.value + ' ' + obj.elem.name + ':'+ obj.elem.checked, obj.othis);
|
layer.tips(obj.value + ' ' + obj.elem.name + ':'+ obj.elem.checked, obj.othis);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// 监听回复
|
// 监听加精
|
||||||
form.on('switch(isReply)', function(obj){
|
form.on('switch(isHot)', function(obj){
|
||||||
$.post("{:url('content.forum/check')}",{id:obj.value, name:obj.elem.name,value: obj.elem.checked ? 0 : 1},function(res){
|
$.post("{:url('content.forum/check')}",{id:obj.value, name:obj.elem.name,value: obj.elem.checked ? 1 : 0},function(res){
|
||||||
layer.tips(obj.value + ' ' + obj.elem.name + ':'+ obj.elem.checked, obj.othis);
|
layer.tips(obj.value + ' ' + obj.elem.name + ':'+ obj.elem.checked, obj.othis);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// 监听审贴
|
// 监听回复
|
||||||
form.on('switch(artStatus)', function(obj){
|
form.on('switch(isReply)', function(obj){
|
||||||
//layer.tips(obj.value + ' ' + obj.elem.name + ':'+ obj.elem.checked, obj.othis);
|
$.post("{:url('content.forum/check')}",{id:obj.value, name:obj.elem.name,value: obj.elem.checked ? 0 : 1},function(res){
|
||||||
$.post("{:url('content.forum/check')}",{id:obj.value, name:obj.elem.name,value: obj.elem.checked ? 1 : -1},function(res){
|
layer.tips(obj.value + ' ' + obj.elem.name + ':'+ obj.elem.checked, obj.othis);
|
||||||
if(res.code === 0){
|
});
|
||||||
layer.msg(res.msg,{icon:res.icon,time:2000})
|
});
|
||||||
} else {
|
|
||||||
layer.open({title:'审核失败',content:res.msg,icon:5,adim:6})
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
window.add = function() {
|
// 监听审贴
|
||||||
|
form.on('switch(artStatus)', function(obj){
|
||||||
|
//layer.tips(obj.value + ' ' + obj.elem.name + ':'+ obj.elem.checked, obj.othis);
|
||||||
|
$.post("{:url('content.forum/check')}",{id:obj.value, name:obj.elem.name,value: obj.elem.checked ? 1 : -1},function(res){
|
||||||
|
if(res.code === 0){
|
||||||
|
layer.msg(res.msg,{icon:res.icon,time:2000})
|
||||||
|
} else {
|
||||||
|
layer.open({title:'审核失败',content:res.msg,icon:5,adim:6})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
layer.open({
|
// 添加
|
||||||
type: 2,
|
window.add = function() {
|
||||||
title: '新增',
|
layer.open({
|
||||||
shade: 0.1,
|
type: 2,
|
||||||
area: [common.isModile()?'100%':'100%', common.isModile()?'100%':'100%'],
|
title: '新增',
|
||||||
content: 'add.html'
|
shade: 0.1,
|
||||||
});
|
area: [common.isModile()?'100%':'100%', common.isModile()?'100%':'100%'],
|
||||||
}
|
content: 'add.html'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
window.edit = function(obj) {
|
window.edit = function(obj) {
|
||||||
layer.open({
|
layer.open({
|
||||||
type: 2,
|
type: 2,
|
||||||
title: '修改',
|
title: '修改',
|
||||||
shade: 0.1,
|
shade: 0.1,
|
||||||
area: ['100%', '100%'],
|
area: ['100%', '100%'],
|
||||||
content: 'edit.html?id=' + obj.data.id
|
content: 'edit.html?id=' + obj.data.id
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
window.remove = function(obj) {
|
window.remove = function(obj) {
|
||||||
|
layer.confirm('确定要删除?', {
|
||||||
|
icon: 3,
|
||||||
|
title: '提示'
|
||||||
|
}, function(index) {
|
||||||
|
layer.close(index);
|
||||||
|
let loading = layer.load();
|
||||||
|
$.ajax({
|
||||||
|
url: "{:url('content.forum/delete')}?id=" + obj.data['id'],
|
||||||
|
dataType: 'json',
|
||||||
|
type: 'delete',
|
||||||
|
success: function(result) {
|
||||||
|
layer.close(loading);
|
||||||
|
if (result.code === 0) {
|
||||||
|
layer.msg(result.msg, {
|
||||||
|
icon: 1,
|
||||||
|
time: 1000
|
||||||
|
}, function() {
|
||||||
|
obj.del();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
layer.msg(result.msg, {
|
||||||
|
icon: 2,
|
||||||
|
time: 1000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
layer.confirm('确定要删除?', {
|
// 批量删除
|
||||||
icon: 3,
|
window.batchRemove = function(obj) {
|
||||||
title: '提示'
|
var checkIds = common.checkField(obj,'id');
|
||||||
}, function(index) {
|
if (checkIds === "") {
|
||||||
layer.close(index);
|
layer.msg("未选中数据", {
|
||||||
let loading = layer.load();
|
icon: 3,
|
||||||
$.ajax({
|
time: 1000
|
||||||
url: "{:url('content.forum/delete')}?id=" + obj.data['id'],
|
});
|
||||||
dataType: 'json',
|
return false;
|
||||||
type: 'delete',
|
}
|
||||||
success: function(result) {
|
|
||||||
layer.close(loading);
|
|
||||||
if (result.code === 0) {
|
|
||||||
layer.msg(result.msg, {
|
|
||||||
icon: 1,
|
|
||||||
time: 1000
|
|
||||||
}, function() {
|
|
||||||
obj.del();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
layer.msg(result.msg, {
|
|
||||||
icon: 2,
|
|
||||||
time: 1000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
window.batchRemove = function(obj) {
|
layer.confirm('确定要删除?', {
|
||||||
var checkIds = common.checkField(obj,'id');
|
icon: 3,
|
||||||
if (checkIds === "") {
|
title: '提示'
|
||||||
layer.msg("未选中数据", {
|
}, function(index) {
|
||||||
icon: 3,
|
layer.close(index);
|
||||||
time: 1000
|
let loading = layer.load();
|
||||||
});
|
$.ajax({
|
||||||
return false;
|
url: "{:url('content.forum/delete')}?id=" + checkIds,
|
||||||
}
|
dataType: 'json',
|
||||||
|
type: 'delete',
|
||||||
|
data:{"id":checkIds},
|
||||||
|
success: function(result) {
|
||||||
|
layer.close(loading);
|
||||||
|
if (result.code === 0) {
|
||||||
|
layer.msg(result.msg, {
|
||||||
|
icon: 1,
|
||||||
|
time: 1000
|
||||||
|
}, function() {
|
||||||
|
table.reload('forum-table');
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
layer.msg(result.msg, {
|
||||||
|
icon: 2,
|
||||||
|
time: 1000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
layer.confirm('确定要删除?', {
|
// 全选审核
|
||||||
icon: 3,
|
window.checkSelect = function(obj) {
|
||||||
title: '提示'
|
var id = obj.config.id;
|
||||||
}, function(index) {
|
var checkStatus = table.checkStatus(id);
|
||||||
layer.close(index);
|
var data = checkStatus.data;
|
||||||
let loading = layer.load();
|
|
||||||
$.ajax({
|
|
||||||
url: "{:url('content.forum/delete')}?id=" + checkIds,
|
|
||||||
dataType: 'json',
|
|
||||||
type: 'delete',
|
|
||||||
data:{"id":checkIds},
|
|
||||||
success: function(result) {
|
|
||||||
layer.close(loading);
|
|
||||||
if (result.code === 0) {
|
|
||||||
layer.msg(result.msg, {
|
|
||||||
icon: 1,
|
|
||||||
time: 1000
|
|
||||||
}, function() {
|
|
||||||
table.reload('forum-table');
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
layer.msg(result.msg, {
|
|
||||||
icon: 2,
|
|
||||||
time: 1000
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
window.refresh = function(param) {
|
if (data.length === 0) {
|
||||||
table.reload('forum-table');
|
layer.msg("未选中数据", {
|
||||||
}
|
icon: 3,
|
||||||
|
time: 1000
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
});
|
layer.confirm('确定要审核?', {
|
||||||
</script>
|
icon: 3,
|
||||||
</body>
|
title: '提示'
|
||||||
|
}, function(index) {
|
||||||
|
layer.close(index);
|
||||||
|
let loading = layer.load();
|
||||||
|
console.log(data)
|
||||||
|
$.ajax({
|
||||||
|
type: "post",
|
||||||
|
url: "{:url('content.forum/checkSelect')}",
|
||||||
|
dataType: 'json',
|
||||||
|
data: {data},
|
||||||
|
success: function(result) {
|
||||||
|
layer.close(loading);
|
||||||
|
if (result.code === 0) {
|
||||||
|
layer.msg(result.msg, {
|
||||||
|
icon: 1,
|
||||||
|
time: 1000
|
||||||
|
}, function() {
|
||||||
|
table.reload('forum-table');
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
layer.msg(result.msg, {
|
||||||
|
icon: 2,
|
||||||
|
time: 1000
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 刷新
|
||||||
|
window.refresh = function(param) {
|
||||||
|
table.reload('forum-table');
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</script>
|
</script>
|
||||||
<script type="text/html" id="imgTpl">
|
<script type="text/html" id="imgTpl">
|
||||||
<a href="{:url('user.user/goUserHome')}?id={{ d.id }}" target="_blank"><img src= {{=d.avatar}} style="width: 100px; height: 100px; border-radius: 6px;" /></a>
|
<a href="{:url('user.user/goUserHome')}?id={{ d.id }}" target="_blank"><img src= {{=d.avatar}} style="width: 100px; height: 100px; border-radius: 6px; object-fit: cover;"/></a>
|
||||||
</script>
|
</script>
|
||||||
<script type="text/html" id="userInfoTpl">
|
<script type="text/html" id="userInfoTpl">
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -23,38 +23,37 @@
|
|||||||
<label class="layui-form-label">用户积分</label>
|
<label class="layui-form-label">用户积分</label>
|
||||||
<div class="layui-input-inline" style="width: 120px;">
|
<div class="layui-input-inline" style="width: 120px;">
|
||||||
<select name="vip">
|
<select name="vip">
|
||||||
<option value="0">普通</option>
|
<option value="0">普通</option>
|
||||||
<option value="1">L1</option>
|
<option value="1">L1</option>
|
||||||
<option value="2">L2</option>
|
<option value="2">L2</option>
|
||||||
<option value="3">L3</option>
|
<option value="3">L3</option>
|
||||||
<option value="4">L4</option>
|
<option value="4">L4</option>
|
||||||
<option value="5">L5</option>
|
<option value="5">L5</option>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-input-block">
|
|
||||||
<div class="layui-input-inline">
|
<div class="layui-input-inline">
|
||||||
<input type="text" name="score" lay-verify="required" placeholder="积分区间:0-99" autocomplete="off" class="layui-input">
|
<input type="text" name="score" lay-verify="required" placeholder="积分区间:0-99" autocomplete="off" class="layui-input">
|
||||||
</div>
|
|
||||||
<div class="layui-input-inline">
|
|
||||||
<input type="text" name="nick" lay-verify="required" placeholder="认证名称" autocomplete="off" class="layui-input">
|
|
||||||
</div>
|
|
||||||
<div class="layui-input-inline">
|
|
||||||
<input type="text" name="postnum" lay-verify="required|number" placeholder="免费发帖日限额" autocomplete="off" class="layui-input">
|
|
||||||
</div>
|
|
||||||
<div class="layui-input-inline">
|
|
||||||
<input type="text" name="refreshnum" lay-verify="required|number" placeholder="免费刷新日限额" autocomplete="off" class="layui-input">
|
|
||||||
</div>
|
|
||||||
<div class="layui-input-inline">
|
|
||||||
<input type="text" name="postpoint" lay-verify="required|number" placeholder="发帖扣积分" autocomplete="off" class="layui-input">
|
|
||||||
</div>
|
|
||||||
<div class="layui-input-inline">
|
|
||||||
<input type="text" name="refreshpoint" lay-verify="required|number" placeholder="刷贴扣积分" autocomplete="off" class="layui-input">
|
|
||||||
</div>
|
|
||||||
<div class="layui-input-inline">
|
|
||||||
<input type="submit" class="pear-btn pear-btn-primary" lay-submit lay-filter="vip-rule-submit" id="vip-rule-submit" value="立即提交">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" name="nick" lay-verify="required" placeholder="认证名称" autocomplete="off" class="layui-input">
|
||||||
|
</div>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" name="postnum" lay-verify="required|number" placeholder="免费发帖日限额" autocomplete="off" class="layui-input">
|
||||||
|
</div>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" name="refreshnum" lay-verify="required|number" placeholder="免费刷新日限额" autocomplete="off" class="layui-input">
|
||||||
|
</div>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" name="postpoint" lay-verify="required|number" placeholder="发帖扣积分" autocomplete="off" class="layui-input">
|
||||||
|
</div>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="text" name="refreshpoint" lay-verify="required|number" placeholder="刷贴扣积分" autocomplete="off" class="layui-input">
|
||||||
|
</div>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<input type="submit" class="pear-btn pear-btn-primary" lay-submit lay-filter="vip-rule-submit" id="vip-rule-submit" value="立即提交">
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -99,7 +99,9 @@ class BaseController extends BaseCtrl
|
|||||||
if(!$user){
|
if(!$user){
|
||||||
//1.查询用户
|
//1.查询用户
|
||||||
$user = Db::name('user')->field('id,name,nickname,user_img,sex,area_id,auth,city,phone,email,active,sign,point,vip,create_time')->find($id);
|
$user = Db::name('user')->field('id,name,nickname,user_img,sex,area_id,auth,city,phone,email,active,sign,point,vip,create_time')->find($id);
|
||||||
Cache::tag('user')->set('user'.$id,$user,600);
|
$vipNick = Db::name('user_viprule')->field('nick')->where('vip', $user['vip'] ?? 0)->value('nick');
|
||||||
|
$user['nick'] = $vipNick;
|
||||||
|
Cache::tag('user')->set('user'.$id, $user, 600);
|
||||||
}
|
}
|
||||||
return $user;
|
return $user;
|
||||||
}
|
}
|
||||||
|
@ -275,6 +275,7 @@ class Article extends Model
|
|||||||
->where(['user_id' => $id,'status' => 1])
|
->where(['user_id' => $id,'status' => 1])
|
||||||
->order(['create_time'=>'desc'])
|
->order(['create_time'=>'desc'])
|
||||||
->append(['url'])
|
->append(['url'])
|
||||||
|
->limit(25)
|
||||||
->cache(3600)
|
->cache(3600)
|
||||||
->select()
|
->select()
|
||||||
->toArray();
|
->toArray();
|
||||||
@ -298,7 +299,8 @@ class Article extends Model
|
|||||||
->order('create_time','desc')
|
->order('create_time','desc')
|
||||||
->append(['url'])
|
->append(['url'])
|
||||||
->paginate(10);
|
->paginate(10);
|
||||||
return $res;
|
|
||||||
|
return $res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@ class Article extends TagLib
|
|||||||
'description' => ['attr' => '', 'close' => 0],
|
'description' => ['attr' => '', 'close' => 0],
|
||||||
'link' => ['attr' => '', 'close' => 0],
|
'link' => ['attr' => '', 'close' => 0],
|
||||||
'time' => ['attr' => '', 'close' => 0],
|
'time' => ['attr' => '', 'close' => 0],
|
||||||
|
'uptime' => ['attr' => '', 'close' => 0],
|
||||||
|
|
||||||
'cate' => ['attr' => 'name', 'close' => 0],
|
'cate' => ['attr' => 'name', 'close' => 0],
|
||||||
'user' => ['attr' => 'name', 'close' => 0],
|
'user' => ['attr' => 'name', 'close' => 0],
|
||||||
@ -102,6 +103,11 @@ class Article extends TagLib
|
|||||||
return '{$article.create_time}';
|
return '{$article.create_time}';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function tagUptime(): string
|
||||||
|
{
|
||||||
|
return '{$article.update_time}';
|
||||||
|
}
|
||||||
|
|
||||||
// 详情分类
|
// 详情分类
|
||||||
public function tagCate($tag): string
|
public function tagCate($tag): string
|
||||||
{
|
{
|
||||||
|
@ -262,24 +262,30 @@ class Article extends BaseController
|
|||||||
$cateName = Db::name('cate')->field('ename,appname')->find($data['cate_id']);
|
$cateName = Db::name('cate')->field('ename,appname')->find($data['cate_id']);
|
||||||
|
|
||||||
// vip每天可免费发帖数
|
// vip每天可免费发帖数
|
||||||
$user = Db::name('user')->field('id,vip,point')->find($this->uid);
|
$user = Db::name('user')->field('id,vip,point,auth')->find($this->uid);
|
||||||
|
|
||||||
$postRule = Db::name('user_viprule')->field('postnum,postpoint')->where('vip', $user['vip'])->find();
|
$postRule = Db::name('user_viprule')->field('postnum,postpoint')->where('vip', $user['vip'])->find();
|
||||||
// 检测刷新帖子剩余量
|
// 检测可发帖子剩余量
|
||||||
$postLog = Db::name('user_article_log')->field('id,user_postnum')->where(['user_id' => $this->uid])->whereDay('create_time')->find();
|
$postLog = Db::name('user_article_log')->field('id,user_postnum')->where(['user_id' => $this->uid])->whereDay('create_time')->find();
|
||||||
if(is_null($postLog)) {
|
if(is_null($postLog)) {
|
||||||
|
//没有记录创建
|
||||||
Db::name('user_article_log')->save(['user_id' => $this->uid, 'create_time' => time()]);
|
Db::name('user_article_log')->save(['user_id' => $this->uid, 'create_time' => time()]);
|
||||||
$postLog = Db::name('user_article_log')->field('id,user_postnum')->where(['user_id' => $this->uid])->whereDay('create_time')->find();
|
$postLog = Db::name('user_article_log')->field('id,user_postnum')->where(['user_id' => $this->uid])->whereDay('create_time')->find();
|
||||||
}
|
}
|
||||||
$cannum = $postRule['postnum'] - $postLog['user_postnum']; // 可用免费额
|
|
||||||
if($cannum <= 0) {
|
// 超级管理员排外
|
||||||
//额度已用完需要扣积分
|
if($user['auth'] === '0') {
|
||||||
$canpoint = 1 * $postRule['postpoint'];
|
$cannum = $postRule['postnum'] - $postLog['user_postnum']; // 可用免费额
|
||||||
$point = $user['point'] - $canpoint;
|
if($cannum <= 0) {
|
||||||
if($point < 0) { // 1.积分不足
|
//额度已用完需要扣积分
|
||||||
return json(['code' => -1, 'msg' => "免额已使用,本次需{$canpoint}积分,请充值!"]);
|
$canpoint = 1 * $postRule['postpoint'];
|
||||||
|
$point = $user['point'] - $canpoint;
|
||||||
|
if($point < 0) { // 1.积分不足
|
||||||
|
return json(['code' => -1, 'msg' => "免额已使用,本次需{$canpoint}积分,请充值!"]);
|
||||||
|
}
|
||||||
|
// 2.扣除积分
|
||||||
|
Db::name('user')->where('id', $this->uid)->update(['point' => $point]);
|
||||||
}
|
}
|
||||||
// 2.扣除积分
|
|
||||||
Db::name('user')->where('id', $this->uid)->update(['point' => $point]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->model->add($data);
|
$result = $this->model->add($data);
|
||||||
|
@ -127,7 +127,8 @@ class User extends BaseController
|
|||||||
$count = count($idArr);
|
$count = count($idArr);
|
||||||
|
|
||||||
// vip每天可刷新数
|
// vip每天可刷新数
|
||||||
$user = Db::name('user')->field('id,vip,point')->find($this->uid);
|
$user = Db::name('user')->field('id,vip,point,auth')->find($this->uid);
|
||||||
|
|
||||||
$refreshRule = Db::name('user_viprule')->field('refreshnum,refreshpoint')->where('vip', $user['vip'])->find();
|
$refreshRule = Db::name('user_viprule')->field('refreshnum,refreshpoint')->where('vip', $user['vip'])->find();
|
||||||
// 检测刷新帖子剩余量
|
// 检测刷新帖子剩余量
|
||||||
$refreshLog = Db::name('user_article_log')->field('id,user_refreshnum')->where(['user_id' => $this->uid])->whereDay('create_time')->find();
|
$refreshLog = Db::name('user_article_log')->field('id,user_refreshnum')->where(['user_id' => $this->uid])->whereDay('create_time')->find();
|
||||||
@ -135,29 +136,32 @@ class User extends BaseController
|
|||||||
Db::name('user_article_log')->save(['user_id' => $this->uid, 'create_time' => time()]);
|
Db::name('user_article_log')->save(['user_id' => $this->uid, 'create_time' => time()]);
|
||||||
$refreshLog = Db::name('user_article_log')->field('id,user_refreshnum')->where(['user_id' => $this->uid])->whereDay('create_time')->find();
|
$refreshLog = Db::name('user_article_log')->field('id,user_refreshnum')->where(['user_id' => $this->uid])->whereDay('create_time')->find();
|
||||||
}
|
}
|
||||||
$cannum = $refreshRule['refreshnum'] - $refreshLog['user_refreshnum']; // 可用免费数
|
// 超级管理员排外
|
||||||
// 刷帖先扣积分
|
if($user['auth'] === '0') {
|
||||||
if($cannum <= 0) { // a.免费额已用完 后面需要积分
|
$cannum = $refreshRule['refreshnum'] - $refreshLog['user_refreshnum']; // 可用免费数
|
||||||
$canpoint = $count * $refreshRule['refreshpoint'];
|
// 刷帖先扣积分
|
||||||
$point = $user['point'] - $canpoint;
|
if($cannum <= 0) { // a.免费额已用完 后面需要积分
|
||||||
if($point < 0) {
|
$canpoint = $count * $refreshRule['refreshpoint'];
|
||||||
// 1.积分不足
|
|
||||||
return json(['code' => -1, 'msg' => "免额已使用,本次需{$canpoint}积分,请充值!"]);
|
|
||||||
} else {
|
|
||||||
// 2.扣除积分
|
|
||||||
Db::name('user')->where('id', $this->uid)->update(['point' => $point]);
|
|
||||||
}
|
|
||||||
} else { // b.未超限 有剩余条数
|
|
||||||
if($count > $cannum) { // 本次刷新数量大于剩余免费数量,需要支付积分
|
|
||||||
$canpoint = ($count - $cannum) * $refreshRule['refreshpoint'];
|
|
||||||
$point = $user['point'] - $canpoint;
|
$point = $user['point'] - $canpoint;
|
||||||
if($point < 0) {
|
if($point < 0) {
|
||||||
// 1.积分不足
|
// 1.积分不足
|
||||||
return json(['code' => -1, 'msg' => "免额已使用,本次需{$canpoint}积分,额度不足请充值!"]);
|
return json(['code' => -1, 'msg' => "免额已使用,本次需{$canpoint}积分,请充值!"]);
|
||||||
} else {
|
} else {
|
||||||
// 2.扣除积分
|
// 2.扣除积分
|
||||||
Db::name('user')->where('id', $this->uid)->update(['point' => $point]);
|
Db::name('user')->where('id', $this->uid)->update(['point' => $point]);
|
||||||
}
|
}
|
||||||
|
} else { // b.未超限 有剩余条数
|
||||||
|
if($count > $cannum) { // 本次刷新数量大于剩余免费数量,需要支付积分
|
||||||
|
$canpoint = ($count - $cannum) * $refreshRule['refreshpoint'];
|
||||||
|
$point = $user['point'] - $canpoint;
|
||||||
|
if($point < 0) {
|
||||||
|
// 1.积分不足
|
||||||
|
return json(['code' => -1, 'msg' => "免额已使用,本次需{$canpoint}积分,额度不足请充值!"]);
|
||||||
|
} else {
|
||||||
|
// 2.扣除积分
|
||||||
|
Db::name('user')->where('id', $this->uid)->update(['point' => $point]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -302,6 +306,7 @@ class User extends BaseController
|
|||||||
->where(['a.delete_time'=>0,'c.delete_time'=>0,'c.status'=>1])
|
->where(['a.delete_time'=>0,'c.delete_time'=>0,'c.status'=>1])
|
||||||
->where('c.user_id',$id)
|
->where('c.user_id',$id)
|
||||||
->order(['c.create_time'=>'desc'])
|
->order(['c.create_time'=>'desc'])
|
||||||
|
->limit(10)
|
||||||
->cache(3600)->select();
|
->cache(3600)->select();
|
||||||
|
|
||||||
View::assign(['u'=>$u,'arts'=>$arts,'reys'=>$reys,'jspage'=>'']);
|
View::assign(['u'=>$u,'arts'=>$arts,'reys'=>$reys,'jspage'=>'']);
|
||||||
|
@ -16,7 +16,7 @@ return [
|
|||||||
// 应用名,此项不可更改
|
// 应用名,此项不可更改
|
||||||
'appname' => 'TaoLer',
|
'appname' => 'TaoLer',
|
||||||
// 版本配置
|
// 版本配置
|
||||||
'version' => '2.5.0',
|
'version' => '2.5.2',
|
||||||
// 加盐
|
// 加盐
|
||||||
'salt' => 'taoler',
|
'salt' => 'taoler',
|
||||||
// 数据库备份目录
|
// 数据库备份目录
|
||||||
|
@ -191,8 +191,8 @@ pre{overflow-y: auto;
|
|||||||
|
|
||||||
.fly-nav-user{position: absolute; top: 0; right: 0;}
|
.fly-nav-user{position: absolute; top: 0; right: 0;}
|
||||||
.fly-nav-user .iconfont{position: relative;}
|
.fly-nav-user .iconfont{position: relative;}
|
||||||
.fly-nav-avatar img{width: 36px; height: 36px; margin-left: 10px; border-radius: 100%;}
|
.fly-nav-avatar img{width: 36px; height: 36px; margin-left: 10px; border-radius: 100%; object-fit: cover;}
|
||||||
.fly-nav-avatar .icon-renzheng{font-size: 16px; top: 1px;}
|
.fly-nav-avatar .icon-renzheng{font-size: 16px; top: 1px;}
|
||||||
.fly-nav-avatar .fly-badge-vip{position: relative; margin-left: 10px;}
|
.fly-nav-avatar .fly-badge-vip{position: relative; margin-left: 10px;}
|
||||||
.fly-nav-user .layui-nav-child a i{position: relative; top: 2px; margin-right: 10px; font-size: 26px;}
|
.fly-nav-user .layui-nav-child a i{position: relative; top: 2px; margin-right: 10px; font-size: 26px;}
|
||||||
|
|
||||||
@ -601,6 +601,10 @@ body .fly-user-main{position: relative; min-height: 600px;}
|
|||||||
.fly-user-main .fly-none{min-height: 0;}
|
.fly-user-main .fly-none{min-height: 0;}
|
||||||
.fly-panel-user[pad20]{padding-top: 5px;}
|
.fly-panel-user[pad20]{padding-top: 5px;}
|
||||||
|
|
||||||
|
@media screen and (max-width: 768px) {
|
||||||
|
.fly-user-main>.fly-panel{margin: 0 0 10px 0;}
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 768px) {
|
@media screen and (min-width: 768px) {
|
||||||
.fly-panel-user{height: calc(100vh - 280px)}
|
.fly-panel-user{height: calc(100vh - 280px)}
|
||||||
}
|
}
|
||||||
@ -618,7 +622,7 @@ body .fly-user-main{position: relative; min-height: 600px;}
|
|||||||
|
|
||||||
/* 个人主页 */
|
/* 个人主页 */
|
||||||
.fly-home{position: relative; padding: 30px 0 30px; text-align: center;}
|
.fly-home{position: relative; padding: 30px 0 30px; text-align: center;}
|
||||||
.fly-home img{width:120px; height:120px; border-radius:100%;}
|
.fly-home img{width:120px; height:120px; border-radius:100%; object-fit: cover;}
|
||||||
.fly-home h1{font-size:26px; line-height:30px; margin-top:10px;}
|
.fly-home h1{font-size:26px; line-height:30px; margin-top:10px;}
|
||||||
.fly-home h1 span{font-size:14px; color:#999;}
|
.fly-home h1 span{font-size:14px; color:#999;}
|
||||||
.fly-home h1 .icon-nan{color:#4EBBF9}
|
.fly-home h1 .icon-nan{color:#4EBBF9}
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<div class="layui-container">
|
<div class="layui-container">
|
||||||
<div class="layui-row layui-col-space15">
|
<div class="layui-row layui-col-space15">
|
||||||
<div class="layui-col-md8 content detail">
|
<div class="layui-col-md8 content detail">
|
||||||
<div class="fly-panel detail-box">
|
<section class="fly-panel detail-box">
|
||||||
{//标题}
|
{//标题}
|
||||||
<h1>{article:title /}</h1>
|
<h1>{article:title /}</h1>
|
||||||
|
|
||||||
@ -28,7 +28,7 @@
|
|||||||
<img src="{article:user name='user_img' /}" alt="{article:user name='name' /}" />
|
<img src="{article:user name='user_img' /}" alt="{article:user name='name' /}" />
|
||||||
<cite>{article:auther} </cite>
|
<cite>{article:auther} </cite>
|
||||||
</a>
|
</a>
|
||||||
<span class="user-post-time" data="{$article.create_time}" style="padding-top: 5px">{$article.create_time|date="Y-h-d H:i"}</span>
|
<span class="user-post-time" data="{$article.create_time}" style="padding-top: 5px">{$article.update_time|date="Y-h-d H:i"}</span>
|
||||||
<i class="iconfont" title="{:lang('reply')}"></i>
|
<i class="iconfont" title="{:lang('reply')}"></i>
|
||||||
{$article:comments_count}
|
{$article:comments_count}
|
||||||
<i class="iconfont" title="浏览"></i>
|
<i class="iconfont" title="浏览"></i>
|
||||||
@ -47,7 +47,7 @@
|
|||||||
<div style="margin: 10px 0; font-size: 16px; font-weight: bold; color: rgb(161, 155, 155)">问题描述:</div>
|
<div style="margin: 10px 0; font-size: 16px; font-weight: bold; color: rgb(161, 155, 155)">问题描述:</div>
|
||||||
|
|
||||||
{:hook('taoplayerdiv')}
|
{:hook('taoplayerdiv')}
|
||||||
<div class="detail-body photos" id="content">{article:content}</div>
|
<article class="detail-body photos" id="content">{article:content}</article>
|
||||||
{notempty name="$article.upzip"}
|
{notempty name="$article.upzip"}
|
||||||
{if (session('?user_name'))}
|
{if (session('?user_name'))}
|
||||||
<button type="button" class="layui-btn layui-btn-xs" id="zip-download"><i class="layui-icon layui-icon-download-circle"></i>{:lang('download files')}: {$article.downloads}次</button>
|
<button type="button" class="layui-btn layui-btn-xs" id="zip-download"><i class="layui-icon layui-icon-download-circle"></i>{:lang('download files')}: {$article.downloads}次</button>
|
||||||
@ -79,10 +79,10 @@
|
|||||||
{$Request.domain}/{$Request.url}
|
{$Request.domain}/{$Request.url}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
{//评论内容}
|
{//评论内容}
|
||||||
<div class="fly-panel detail-box" id="flyReply">
|
<section class="fly-panel detail-box" id="flyReply">
|
||||||
<span style="font-size:18px;">评论 {$article.comments_count}</span>
|
<span style="font-size:18px;">评论 {$article.comments_count}</span>
|
||||||
|
|
||||||
<ul class="jieda" id="jieda">
|
<ul class="jieda" id="jieda">
|
||||||
@ -199,7 +199,7 @@
|
|||||||
{/article:comment}
|
{/article:comment}
|
||||||
</ul>
|
</ul>
|
||||||
<div style="text-align: center" id="pages"></div>
|
<div style="text-align: center" id="pages"></div>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
{//评论区}
|
{//评论区}
|
||||||
{if session('?user_id') AND ( config('taoler.config.is_reply') == 1 ) AND ( $article.is_reply == 1 )}
|
{if session('?user_id') AND ( config('taoler.config.is_reply') == 1 ) AND ( $article.is_reply == 1 )}
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
<div class="d-inline-block" itemprop="author" itemscope="" itemtype="">
|
<div class="d-inline-block" itemprop="author" itemscope="" itemtype="">
|
||||||
<a href="{$Request.domain}" target="_blank" class="text-muted" itemprop="url"><span itemprop="name">{article:auther}</span></a>
|
<a href="{$Request.domain}" target="_blank" class="text-muted" itemprop="url"><span itemprop="name">{article:auther}</span></a>
|
||||||
<a href="{article:cate name='link'}" target="_blank" class="text-muted" rel="category">{article:cate name="name"}</a>
|
<a href="{article:cate name='link'}" target="_blank" class="text-muted" rel="category">{article:cate name="name"}</a>
|
||||||
<time class="d-inline-block" datetime="{$article.create_time|date='Y-m-d h:m:s'}" itemprop="datePublished">{article:time}</time>
|
<time class="d-inline-block" datetime="{$article.create_time|date='Y-m-d h:m:s'}" itemprop="datePublished">{article:uptime}</time>
|
||||||
</div>
|
</div>
|
||||||
<div class="ml-auto text-sm yincang">
|
<div class="ml-auto text-sm yincang">
|
||||||
<span class="mx-1"><small>阅读 {article:pv /} 次</small></span>
|
<span class="mx-1"><small>阅读 {article:pv /} 次</small></span>
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
<div class="detail-hits" style="left:-30px;">
|
<div class="detail-hits" style="left:-30px;">
|
||||||
<span>{$article.cate.catename}</span>
|
<span>{$article.cate.catename}</span>
|
||||||
<span>{$article.user.name}</span>
|
<span>{$article.user.name}</span>
|
||||||
<span class="post-time" style="padding-top: 5px;" data="{$article.create_time}">{$article.create_time} </span>
|
<span class="post-time" style="padding-top: 5px;" data="{$article.update_time}">{article:uptime} </span>
|
||||||
<span><i class="iconfont" title="浏览"></i> {article:pv}</span>
|
<span><i class="iconfont" title="浏览"></i> {article:pv}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -17,229 +17,229 @@
|
|||||||
<!--body-->
|
<!--body-->
|
||||||
{block name="content"}
|
{block name="content"}
|
||||||
<div class="layui-container">
|
<div class="layui-container">
|
||||||
<div class="layui-row layui-col-space15">
|
<div class="layui-row layui-col-space15">
|
||||||
<div class="layui-col-md8 content detail">
|
<div class="layui-col-md8 content detail">
|
||||||
<div class="fly-panel detail-box">
|
<section class="fly-panel detail-box">
|
||||||
|
|
||||||
{//标题}
|
{//标题}
|
||||||
<h1>{article:title /}</h1>
|
<h1>{article:title /}</h1>
|
||||||
|
|
||||||
{//图标}
|
{//图标}
|
||||||
<div class="fly-detail-info">
|
<div class="fly-detail-info">
|
||||||
<span class="layui-badge layui-bg-green fly-detail-column">
|
<span class="layui-badge layui-bg-green fly-detail-column">
|
||||||
{if (cookie('think_lang') == 'en-us')}
|
{if (cookie('think_lang') == 'en-us')}
|
||||||
{article:cate name="ename" /}
|
{article:cate name="ename" /}
|
||||||
{else /}
|
{else /}
|
||||||
{article:cate name="name" /}
|
{article:cate name="name" /}
|
||||||
{/if}
|
{/if}
|
||||||
</span>
|
</span>
|
||||||
{if ($article.is_top == 1)}
|
{if ($article.is_top == 1)}
|
||||||
<span class="layui-badge layui-bg-black">{:lang('top')}</span>
|
<span class="layui-badge layui-bg-black">{:lang('top')}</span>
|
||||||
{/if}
|
{/if}
|
||||||
{if ($article.is_hot == 1)}
|
{if ($article.is_hot == 1)}
|
||||||
<span class="layui-badge layui-bg-red">{:lang('hot')}</span>
|
<span class="layui-badge layui-bg-red">{:lang('hot')}</span>
|
||||||
{/if}
|
{/if}
|
||||||
<span id="LAY_jieAdmin" data-id="{article:id /}" data-colurl="{:url('collection/find')}"></span>
|
<span id="LAY_jieAdmin" data-id="{article:id /}" data-colurl="{:url('collection/find')}"></span>
|
||||||
<span class="fly-list-nums">
|
<span class="fly-list-nums">
|
||||||
<a href="#comment">
|
<a href="#comment">
|
||||||
<i class="iconfont" title="{:lang('reply')}"></i>{article:comment_num /}
|
<i class="iconfont" title="{:lang('reply')}"></i>{article:comment_num /}
|
||||||
</a>
|
</a>
|
||||||
<i class="iconfont" title="浏览"></i>{article:pv /}
|
<i class="iconfont" title="浏览"></i>{article:pv /}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{//作者}
|
{//作者}
|
||||||
<div class="detail-about">
|
<div class="detail-about">
|
||||||
<a class="fly-avatar" href="{article:user name='link' /}">
|
<a class="fly-avatar" href="{article:user name='link' /}">
|
||||||
<img src="{article:user name='user_img' /}" alt="{article:user name='name' /}">
|
<img src="{article:user name='user_img' /}" alt="{article:user name='name' /}">
|
||||||
{if($article.user.vip > 0)}
|
{if($article.user.vip > 0)}
|
||||||
<i class="iconfont icon-renzheng" title="认证信息"></i>
|
<i class="iconfont icon-renzheng" title="认证信息"></i>
|
||||||
{/if}
|
{/if}
|
||||||
</a>
|
</a>
|
||||||
<div class="fly-detail-user">
|
<div class="fly-detail-user">
|
||||||
<a href="{article:user name='link' /}" class="fly-link"><cite>{article:auther}</cite></a>
|
<a href="{article:user name='link' /}" class="fly-link"><cite>{article:auther}</cite></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="detail-hits">
|
<div class="detail-hits">
|
||||||
<span class="post-time" data="{$article.create_time}" style="padding-top: 5px;">{$article.create_time}</span>
|
<span class="post-time" data="{$article.update_time}" style="padding-top: 5px;">{article:uptime}</span>
|
||||||
{:hook('ipShow',$article.user.city)}
|
{:hook('ipShow',$article.user.city)}
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
{//内容}
|
|
||||||
{:hook('taoplayerdiv')}
|
|
||||||
<div class="detail-body photos" id="content">{article:content}</div>
|
|
||||||
{//下载}
|
|
||||||
{notempty name="$article.upzip"}
|
|
||||||
{if(session('?user_name'))}
|
|
||||||
<button type="button" class="layui-btn layui-btn-xs" id="zip-download"><i class="layui-icon layui-icon-download-circle"></i>{:lang('download files')}: {$article.downloads}次</button>
|
|
||||||
{/if}
|
|
||||||
{/notempty}
|
|
||||||
|
|
||||||
{//解密文件}
|
|
||||||
{empty name="passJieMi"}
|
|
||||||
{if($article.read_type == 1)}
|
|
||||||
<div id="jiemi" style="text-align:center">
|
|
||||||
<button type="button" class="layui-btn layui-btn-primary"><i class="layui-icon layui-icon-password" style="font-size: 30px; color: #FF5722;"></i> 阅读请解密 </button>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
{/empty}
|
|
||||||
|
|
||||||
{notempty name="tags"}
|
|
||||||
<div style="margin-top: 15px">标签
|
|
||||||
{volist name="tags" id="vo" }
|
|
||||||
<a href="{$vo.url}"><span class="layui-btn layui-btn-xs layui-btn-normal layui-btn-radius">{$vo.name}</span></a>
|
|
||||||
{/volist}
|
|
||||||
</div>
|
|
||||||
{/notempty}
|
|
||||||
{//网站声明}
|
|
||||||
<div style="margin: 20px 0px 15px 0px; color: rgb(130, 125, 125);">
|
|
||||||
<p style="line-height:200%; ">{$sysInfo.state|raw}</p>
|
|
||||||
</div>
|
|
||||||
{//本文链接}
|
|
||||||
<div style="margin-top: 20px;">本文链接:<a href="{$Request.domain}{$Request.url}">{$Request.domain}{$Request.url}</a></div>
|
|
||||||
<div class="detail-zan">
|
|
||||||
<span class="jieda-zan" type="zan" id="article-zan">
|
|
||||||
点赞 <i class="iconfont icon-zan"></i> <em>{:count($userZanList)}</em>
|
|
||||||
</span>
|
|
||||||
<!-- 点赞列表 -->
|
|
||||||
{volist name="userZanList" id="vo" }
|
|
||||||
<span><img src="{$vo.userImg}"></span>
|
|
||||||
{/volist}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{//评论}
|
|
||||||
<div class="fly-panel">
|
|
||||||
{if session('?user_id') AND ( config('taoler.config.is_reply') == 1 ) AND ( $article.is_reply == 1 )}
|
|
||||||
<div class="layui-form layui-form-pane">
|
|
||||||
<div class="layui-form-item layui-form-text">
|
|
||||||
<a name="comment"></a>
|
|
||||||
<div class="layui-input-block">
|
|
||||||
<textarea id="L_content" name="content" required lay-verify="required" placeholder="{:lang('please input the content')}" class="layui-textarea taonyeditor"></textarea>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-form-item">
|
<hr>
|
||||||
<input type="hidden" name="article_id" value="{article:id}">
|
|
||||||
<button class="layui-btn" lay-filter="user-comment" lay-submit>{:lang('submit comments')}</button>
|
{//内容}
|
||||||
|
{:hook('taoplayerdiv')}
|
||||||
|
<article class="detail-body photos" id="content">{article:content}</article>
|
||||||
|
{//下载}
|
||||||
|
{notempty name="$article.upzip"}
|
||||||
|
{if(session('?user_name'))}
|
||||||
|
<button type="button" class="layui-btn layui-btn-xs" id="zip-download"><i class="layui-icon layui-icon-download-circle"></i>{:lang('download files')}: {$article.downloads}次</button>
|
||||||
|
{/if}
|
||||||
|
{/notempty}
|
||||||
|
|
||||||
|
{//解密文件}
|
||||||
|
{empty name="passJieMi"}
|
||||||
|
{if($article.read_type == 1)}
|
||||||
|
<div id="jiemi" style="text-align:center">
|
||||||
|
<button type="button" class="layui-btn layui-btn-primary"><i class="layui-icon layui-icon-password" style="font-size: 30px; color: #FF5722;"></i> 阅读请解密 </button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{/if}
|
||||||
{/if}
|
{/empty}
|
||||||
</div>
|
|
||||||
|
|
||||||
{//评论内容}
|
{notempty name="tags"}
|
||||||
<div class="fly-panel detail-box" id="flyReply">
|
<div style="margin-top: 15px">标签
|
||||||
<span style="font-size:18px;">评论 {$article.comments_count}</span>
|
{volist name="tags" id="vo" }
|
||||||
<ul class="jieda" id="jieda">
|
<a href="{$vo.url}"><span class="layui-btn layui-btn-xs layui-btn-normal layui-btn-radius">{$vo.name}</span></a>
|
||||||
{article:comment}
|
{/volist}
|
||||||
<li data-id="{comment:id /}" class="jieda-daan">
|
</div>
|
||||||
<div class="detail-about detail-about-reply">
|
{/notempty}
|
||||||
<a class="fly-avatar" href="{comment:ulink /}"><img src="{comment:uimg /}" alt="{comment:uname}"></a>
|
{//网站声明}
|
||||||
<div class="fly-detail-user">
|
<div style="margin: 20px 0px 15px 0px; color: rgb(130, 125, 125);">
|
||||||
<a href="{comment:ulink /}" class="fly-link"><cite>{comment:uname /}</cite></a>
|
<p style="line-height:200%; ">{$sysInfo.state|raw}</p>
|
||||||
{if condition="$article.user_id eq $comment.user_id"}
|
</div>
|
||||||
<span>({:lang('poster')})</span>
|
{//本文链接}
|
||||||
{/if}
|
<div style="margin-top: 20px;">本文链接:<a href="{$Request.domain}{$Request.url}">{$Request.domain}{$Request.url}</a></div>
|
||||||
<span>{comment:usign /}</span>
|
<div class="detail-zan">
|
||||||
</div>
|
<span class="jieda-zan" type="zan" id="article-zan">
|
||||||
<div class="detail-hits">
|
点赞 <i class="iconfont icon-zan"></i> <em>{:count($userZanList)}</em>
|
||||||
<span class="post-time">{comment:time}</span>{:hook('ipShow',$comment.user.city)}</span>
|
</span>
|
||||||
|
<!-- 点赞列表 -->
|
||||||
|
{volist name="userZanList" id="vo" }
|
||||||
|
<span><img src="{$vo.userImg}"></span>
|
||||||
|
{/volist}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
{//评论}
|
||||||
|
<section class="fly-panel">
|
||||||
|
{if session('?user_id') AND ( config('taoler.config.is_reply') == 1 ) AND ( $article.is_reply == 1 )}
|
||||||
|
<div class="layui-form layui-form-pane">
|
||||||
|
<div class="layui-form-item layui-form-text">
|
||||||
|
<a name="comment"></a>
|
||||||
|
<div class="layui-input-block">
|
||||||
|
<textarea id="L_content" name="content" required lay-verify="required" placeholder="{:lang('please input the content')}" class="layui-textarea taonyeditor"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-form-item">
|
||||||
|
<input type="hidden" name="article_id" value="{article:id}">
|
||||||
|
<button class="layui-btn" lay-filter="user-comment" lay-submit>{:lang('submit comments')}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
</section>
|
||||||
|
|
||||||
{//加密未解密评论不可查看}
|
{//评论内容}
|
||||||
{if($article.read_type == 0 || (($article.read_type == 1) && $passJieMi))}
|
<div class="fly-panel detail-box" id="flyReply">
|
||||||
<div class="detail-body jieda-body photos">{comment:content /}</div>
|
<span style="font-size:18px;">评论 {$article.comments_count}</span>
|
||||||
<div class="jieda-reply">
|
<ul class="jieda" id="jieda">
|
||||||
{eq name="comment.delete_time" value="0"}
|
{article:comment}
|
||||||
<span class="jieda-zan {if($comment.zan != 0)}zanok{/if}" type="zan">
|
<li data-id="{comment:id /}" class="jieda-daan">
|
||||||
<i class="iconfont icon-zan"></i><em>{comment:zan /}</em>
|
<div class="detail-about detail-about-reply">
|
||||||
</span>
|
<a class="fly-avatar" href="{comment:ulink /}"><img src="{comment:uimg /}" alt="{comment:uname}"></a>
|
||||||
<span type="reply" data-pid="{comment:id /}" data-tid="{comment:uid /}"><i class="iconfont icon-svgmoban53"></i>{:lang('reply')}</span>
|
<div class="fly-detail-user">
|
||||||
{//评论编辑删除采纳权限}
|
<a href="{comment:ulink /}" class="fly-link"><cite>{comment:uname /}</cite></a>
|
||||||
<div class="jieda-admin">
|
{if condition="$article.user_id eq $comment.user_id"}
|
||||||
{if ((session('user_id') == $comment.user_id) && (getLimtTime($comment.create_time) < 2)) OR ($user.auth ?? '')}
|
<span>({:lang('poster')})</span>
|
||||||
<span type="edit" class="comment-edit" data-id="{comment:id /}">{:lang('edit')}</span>
|
{/if}
|
||||||
<span type="del" class="comment-del" data-id="{comment:id /}">{:lang('delete')}</span>
|
<span>{comment:usign /}</span>
|
||||||
{/if}
|
</div>
|
||||||
</div>
|
<div class="detail-hits">
|
||||||
{/eq}
|
<span class="post-time">{comment:time}</span>{:hook('ipShow',$comment.user.city)}</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
{// 第二层回复}
|
{//加密未解密评论不可查看}
|
||||||
{notempty name="$comment.children"}
|
{if($article.read_type == 0 || (($article.read_type == 1) && $passJieMi))}
|
||||||
{volist name="$comment.children" id="vo"}
|
<div class="detail-body jieda-body photos">{comment:content /}</div>
|
||||||
<div class="layui-clear" style="margin:10px 0; padding: 10px; border: 1px solid #f0f0f0; background: #f6f6f6">
|
<div class="jieda-reply">
|
||||||
<a style="display: inline-block; width: 50px;">
|
{eq name="comment.delete_time" value="0"}
|
||||||
<img src="{$vo.user.user_img}" style="width: 30px; height: 30px; border-radius: 15px; object-fit: cover">
|
<span class="jieda-zan {if($comment.zan != 0)}zanok{/if}" type="zan">
|
||||||
</a>
|
<i class="iconfont icon-zan"></i><em>{comment:zan /}</em>
|
||||||
<div style="float: left;width: calc(100% - 50px);">
|
</span>
|
||||||
<div>{$vo.user.name} {$vo.create_time|date='Y-m-d H:i'}</div>
|
<span type="reply" data-pid="{comment:id /}" data-tid="{comment:uid /}"><i class="iconfont icon-svgmoban53"></i>{:lang('reply')}</span>
|
||||||
<div class="detail-body jieda-body photos">{$vo.content|raw}</div>
|
{//评论编辑删除采纳权限}
|
||||||
<div class="jieda-reply">
|
<div class="jieda-admin">
|
||||||
{eq name="vo.delete_time" value="0"}
|
{if ((session('user_id') == $comment.user_id) && (getLimtTime($comment.create_time) < 2)) OR ($user.auth ?? '')}
|
||||||
<span class="jieda-zan {if($vo.zan != 0)}zanok{/if}" type="zan">
|
<span type="edit" class="comment-edit" data-id="{comment:id /}">{:lang('edit')}</span>
|
||||||
<i class="iconfont icon-zan"></i><em>{$vo.zan}</em>
|
<span type="del" class="comment-del" data-id="{comment:id /}">{:lang('delete')}</span>
|
||||||
</span>
|
{/if}
|
||||||
<span type="reply" data-pid="{$vo.id}" data-tid="{$vo.user.id}"><i class="iconfont icon-svgmoban53"></i>{:lang('reply')}</span>
|
</div>
|
||||||
{//评论编辑删除采纳权限}
|
{/eq}
|
||||||
<div class="jieda-admin">
|
|
||||||
{if ((session('user_id') == $vo.user.id) && (getLimtTime($vo.create_time) < 2)) OR ($user.auth ?? '')}
|
|
||||||
<span type="edit" class="comment-edit" data-id="{$vo.id}">{:lang('edit')}</span>
|
|
||||||
<span type="del" class="comment-del" data-id="{$vo.id}" >{:lang('delete')}</span>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
{/eq}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{// 第三层回复}
|
{// 第二层回复}
|
||||||
{notempty name="$vo.children"}
|
{notempty name="$comment.children"}
|
||||||
{volist name="$vo.children" id="voo"}
|
{volist name="$comment.children" id="vo"}
|
||||||
<div class="layui-clear" style="margin:10px 0; padding: 10px; border: 1px solid #f0f0f0;">
|
<div class="layui-clear" style="margin:10px 0; padding: 10px; border: 1px solid #f0f0f0; background: #f6f6f6">
|
||||||
<a style="display: inline-block; width: 50px;">
|
<a style="display: inline-block; width: 50px;">
|
||||||
<img src="{$voo.user.user_img}" style="width: 30px; height: 30px; object-fit: cover; border-radius: 15px;">
|
<img src="{$vo.user.user_img}" style="width: 30px; height: 30px; border-radius: 15px; object-fit: cover">
|
||||||
</a>
|
</a>
|
||||||
<div style="float: left;width: calc(100% - 50px);">
|
<div style="float: left;width: calc(100% - 50px);">
|
||||||
<div>{$voo.user.name} 回复 {$voo.touser} {$voo.create_time|date='Y-m-d H:i'}</div>
|
<div>{$vo.user.name} {$vo.create_time|date='Y-m-d H:i'}</div>
|
||||||
<div class="detail-body jieda-body photos">{$voo.content|raw}</div>
|
<div class="detail-body jieda-body photos">{$vo.content|raw}</div>
|
||||||
<div class="jieda-reply">
|
<div class="jieda-reply">
|
||||||
{eq name="voo.delete_time" value="0"}
|
{eq name="vo.delete_time" value="0"}
|
||||||
<span class="jieda-zan {if($voo.zan != 0)}zanok{/if}" type="zan">
|
<span class="jieda-zan {if($vo.zan != 0)}zanok{/if}" type="zan">
|
||||||
<i class="iconfont icon-zan"></i><em>{$voo.zan}</em>
|
<i class="iconfont icon-zan"></i><em>{$vo.zan}</em>
|
||||||
</span>
|
</span>
|
||||||
<span type="reply" data-pid="{$vo.id}" data-tid="{$voo.user.id}"><i class="iconfont icon-svgmoban53"></i>{:lang('reply')}</span>
|
<span type="reply" data-pid="{$vo.id}" data-tid="{$vo.user.id}"><i class="iconfont icon-svgmoban53"></i>{:lang('reply')}</span>
|
||||||
{//评论编辑删除采纳权限}
|
{//评论编辑删除采纳权限}
|
||||||
<div class="jieda-admin">
|
<div class="jieda-admin">
|
||||||
{if ((session('user_id') == $voo.user.id) && (getLimtTime($voo.create_time) < 2)) OR ($user.auth ?? '')}
|
{if ((session('user_id') == $vo.user.id) && (getLimtTime($vo.create_time) < 2)) OR ($user.auth ?? '')}
|
||||||
<span type="edit" class="comment-edit" data-id="{$voo.id}">{:lang('edit')}</span>
|
<span type="edit" class="comment-edit" data-id="{$vo.id}">{:lang('edit')}</span>
|
||||||
<span type="del" class="comment-del" data-id="{$voo.id}">{:lang('delete')}</span>
|
<span type="del" class="comment-del" data-id="{$vo.id}" >{:lang('delete')}</span>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/eq}
|
{/eq}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/volist}
|
|
||||||
{/notempty}
|
|
||||||
{/volist}
|
|
||||||
{/notempty}
|
|
||||||
</div>
|
|
||||||
{else /}
|
|
||||||
<div class="detail-body jieda-body photos">
|
|
||||||
<i class="layui-icon layui-icon-password" style="font-size: 24px; color: #FF5722;"></i>
|
|
||||||
评论解密后查看
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
{/article:comment}
|
|
||||||
</ul>
|
|
||||||
<div style="text-align: center" id="pages"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{//右栏}
|
{// 第三层回复}
|
||||||
<div class="layui-col-md4">
|
{notempty name="$vo.children"}
|
||||||
|
{volist name="$vo.children" id="voo"}
|
||||||
|
<div class="layui-clear" style="margin:10px 0; padding: 10px; border: 1px solid #f0f0f0;">
|
||||||
|
<a style="display: inline-block; width: 50px;">
|
||||||
|
<img src="{$voo.user.user_img}" style="width: 30px; height: 30px; object-fit: cover; border-radius: 15px;">
|
||||||
|
</a>
|
||||||
|
<div style="float: left;width: calc(100% - 50px);">
|
||||||
|
<div>{$voo.user.name} 回复 {$voo.touser} {$voo.create_time|date='Y-m-d H:i'}</div>
|
||||||
|
<div class="detail-body jieda-body photos">{$voo.content|raw}</div>
|
||||||
|
<div class="jieda-reply">
|
||||||
|
{eq name="voo.delete_time" value="0"}
|
||||||
|
<span class="jieda-zan {if($voo.zan != 0)}zanok{/if}" type="zan">
|
||||||
|
<i class="iconfont icon-zan"></i><em>{$voo.zan}</em>
|
||||||
|
</span>
|
||||||
|
<span type="reply" data-pid="{$vo.id}" data-tid="{$voo.user.id}"><i class="iconfont icon-svgmoban53"></i>{:lang('reply')}</span>
|
||||||
|
{//评论编辑删除采纳权限}
|
||||||
|
<div class="jieda-admin">
|
||||||
|
{if ((session('user_id') == $voo.user.id) && (getLimtTime($voo.create_time) < 2)) OR ($user.auth ?? '')}
|
||||||
|
<span type="edit" class="comment-edit" data-id="{$voo.id}">{:lang('edit')}</span>
|
||||||
|
<span type="del" class="comment-del" data-id="{$voo.id}">{:lang('delete')}</span>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
{/eq}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/volist}
|
||||||
|
{/notempty}
|
||||||
|
{/volist}
|
||||||
|
{/notempty}
|
||||||
|
</div>
|
||||||
|
{else /}
|
||||||
|
<div class="detail-body jieda-body photos">
|
||||||
|
<i class="layui-icon layui-icon-password" style="font-size: 24px; color: #FF5722;"></i>
|
||||||
|
评论解密后查看
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{/article:comment}
|
||||||
|
</ul>
|
||||||
|
<div style="text-align: center" id="pages"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{//右栏}
|
||||||
|
<div class="layui-col-md4">
|
||||||
<div class="fly-panel">
|
<div class="fly-panel">
|
||||||
<div class="fly-panel-main wenda-user">
|
<div class="fly-panel-main wenda-user">
|
||||||
<div class="user-img">
|
<div class="user-img">
|
||||||
@ -260,11 +260,11 @@
|
|||||||
<!-- 插件hook位 -->
|
<!-- 插件hook位 -->
|
||||||
{:hook('addonhook_detail')}
|
{:hook('addonhook_detail')}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- crud管理模块 -->
|
<!-- crud管理模块 -->
|
||||||
{include file="/public/crud" /}
|
{include file="/public/crud" /}
|
||||||
</div>
|
</div>
|
||||||
<!--底部栏-->
|
<!--底部栏-->
|
||||||
</div>
|
</div>
|
||||||
{include file="public/menu" /}
|
{include file="public/menu" /}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div class="fly-header layui-bg-black">
|
<div class="fly-header layui-bg-black">
|
||||||
<div class="layui-container">
|
<div class="layui-container">
|
||||||
<a class="fly-logo layui-hide-xs" href="{$Request.domain}"><img src="{$Request.domain}{$sysInfo.logo}" alt="{system:webname}logo"></a>
|
<a class="fly-logo layui-hide-xs" href="{$Request.domain}"><img src="{$Request.domain}/{$sysInfo.logo}" alt="{system:webname}logo"></a>
|
||||||
<!--头部伸缩侧边栏-->
|
<!--头部伸缩侧边栏-->
|
||||||
<div class="site-tree-mobile-top layui-hide"><i class="layui-icon layui-icon-spread-left"></i></div>
|
<div class="site-tree-mobile-top layui-hide"><i class="layui-icon layui-icon-spread-left"></i></div>
|
||||||
<div class="site-mobile-shade-top"></div>
|
<div class="site-mobile-shade-top"></div>
|
||||||
@ -8,22 +8,22 @@
|
|||||||
<a class="layui-hide-md layui-hide-sm" href="{$Request.domain}" ><img class="fly-logo-m" src="{$Request.domain}{$sysInfo.m_logo}" alt="logo"></a>
|
<a class="layui-hide-md layui-hide-sm" href="{$Request.domain}" ><img class="fly-logo-m" src="{$Request.domain}{$sysInfo.m_logo}" alt="logo"></a>
|
||||||
{//导航nav}
|
{//导航nav}
|
||||||
<ul class="layui-nav fly-nav layui-hide-xs">
|
<ul class="layui-nav fly-nav layui-hide-xs">
|
||||||
{if config('taoler.config.nav_top') != 0}
|
{if config('taoler.config.nav_top') != 0}
|
||||||
{taoler:nav}
|
{taoler:nav}
|
||||||
<li class="layui-nav-item {if condition='$nav.ename eq $Request.param.ename'} layui-this {/if}" >
|
<li class="layui-nav-item {if condition='$nav.ename eq $Request.param.ename'} layui-this {/if}" >
|
||||||
<a href="{nav:link /}">{nav:title} {if condition="$nav.is_hot eq 1"} <span class="layui-badge-dot"></span> {/if}</a>
|
<a href="{nav:link /}">{nav:title} {if condition="$nav.is_hot eq 1"} <span class="layui-badge-dot"></span> {/if}</a>
|
||||||
{notempty name="nav.children"}
|
{notempty name="nav.children"}
|
||||||
<dl class="layui-nav-child"> <!-- 二级菜单 -->
|
<dl class="layui-nav-child"> <!-- 二级菜单 -->
|
||||||
{taoler:snav}
|
{taoler:snav}
|
||||||
<dd><a href="{snav:link /}">{snav:name /}</a></dd>
|
<dd><a href="{snav:link /}">{snav:name /}</a></dd>
|
||||||
{/taoler:snav}
|
{/taoler:snav}
|
||||||
</dl>
|
</dl>
|
||||||
{/notempty}
|
{/notempty}
|
||||||
</li>
|
</li>
|
||||||
{/taoler:nav}
|
{/taoler:nav}
|
||||||
{/if}
|
{/if}
|
||||||
{// 后台自定义头部链接}
|
{// 后台自定义头部链接}
|
||||||
{:hook('ads_header_link')}
|
{:hook('ads_header_link')}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{//头部右栏}
|
{//头部右栏}
|
||||||
@ -34,10 +34,10 @@
|
|||||||
<!-- 登录 -->
|
<!-- 登录 -->
|
||||||
{if session('?user_id')}
|
{if session('?user_id')}
|
||||||
{if ($Request.action=='user')}
|
{if ($Request.action=='user')}
|
||||||
<li class="layui-nav-item"><a href="{$Request.domain}">{:lang('home page')}</a></li>
|
<li class="layui-nav-item"><a href="{$Request.domain}">{:lang('home page')}</a></li>
|
||||||
{/if}
|
{/if}
|
||||||
<li class="layui-nav-item">
|
<li class="layui-nav-item">
|
||||||
<a class="fly-nav-avatar" ><cite class="layui-hide-xs">{$user.name}</cite><img src="{$Request.domain}{$user.user_img}"></a>
|
<a class="fly-nav-avatar" ><cite class="layui-hide-xs">{$user.name}</cite><img src="{$Request.domain}/{$user.user_img}"></a>
|
||||||
<dl class="layui-nav-child">
|
<dl class="layui-nav-child">
|
||||||
<dd><a href="{:url('user/index')}"><i class="layui-icon layui-icon-username"></i>{:lang('user center')}</a></dd>
|
<dd><a href="{:url('user/index')}"><i class="layui-icon layui-icon-username"></i>{:lang('user center')}</a></dd>
|
||||||
<dd><a href="{:url('user/set')}"><i class="layui-icon layui-icon-set"></i>{:lang('set info')}</a></dd>
|
<dd><a href="{:url('user/set')}"><i class="layui-icon layui-icon-set"></i>{:lang('set info')}</a></dd>
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
|
{if $Request.isMobile}
|
||||||
<div class="layui-panel site-menu layui-hide-md">
|
<div class="layui-panel site-menu layui-hide-md">
|
||||||
<ul class="layui-menu layui-menu-lg">
|
<ul class="layui-menu layui-menu-lg">
|
||||||
<li class="search" style="padding-left:5px;padding-top:2px;padding-right:5px;">
|
<li class="search" style="padding-left:5px;padding-top:2px;padding-right:5px;">
|
||||||
<form action="{$Request.domain}{:url('index/search',['keywords'=>$Request.param.keywords])}">
|
<form action="{$Request.domain}{:url('index/search',['keywords'=>$Request.param.keywords])}">
|
||||||
<input type="search" name="keywords" value="" aria-label="Search text" placeholder="搜索" class="layui-input">
|
<input type="search" name="keywords" value="" aria-label="Search text" placeholder="搜索" class="layui-input">
|
||||||
</form>
|
</form>
|
||||||
</li>
|
</li>
|
||||||
{if session('?user_id')}
|
{if session('?user_id')}
|
||||||
<li class="layui-nav-item" style="padding-left:25px;">
|
<li class="layui-nav-item" style="padding-left:25px;">
|
||||||
<a class="fly-nav-avatar" href="javascript:;">
|
<a class="fly-nav-avatar" href="javascript:;">
|
||||||
<img src="{$Request.domain}{$user['user_img']}" >
|
<img src="{$Request.domain}{$user['user_img']}" >
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{else /}
|
{else /}
|
||||||
<li class="layui-nav-item" style="padding-left:25px;">
|
<li class="layui-nav-item" style="padding-left:25px;">
|
||||||
@ -26,49 +27,49 @@
|
|||||||
</li>
|
</li>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<li class="layui-menu-item-group" lay-options="{type: 'group', isAllowSpread: true}">
|
<li class="layui-menu-item-group" lay-options="{type: 'group', isAllowSpread: true}">
|
||||||
<div class="layui-menu-body-title">
|
<div class="layui-menu-body-title">
|
||||||
社区分类
|
社区分类
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<ul>
|
<ul>
|
||||||
{taoler:nav}
|
{taoler:nav}
|
||||||
<li {if condition="$nav.ename eq $Request.param.ename"} class="layui-this" {/if} class="layui-menu-item-group layui-menu-item-down" lay-options="{type: 'group'}">
|
<li {if condition="$nav.ename eq $Request.param.ename"} class="layui-this" {/if} class="layui-menu-item-group layui-menu-item-down" lay-options="{type: 'group'}">
|
||||||
<div class="layui-menu-body-title">
|
<div class="layui-menu-body-title">
|
||||||
<a href="{nav:link /}">
|
<a href="{nav:link /}">
|
||||||
<i class="layui-icon {nav:icon /}"></i>{nav:title}
|
<i class="layui-icon {nav:icon /}"></i>{nav:title}
|
||||||
{if condition="$nav.is_hot eq 1"}<span class="layui-badge-dot"></span>{/if}
|
{if condition="$nav.is_hot eq 1"}<span class="layui-badge-dot"></span>{/if}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{notempty name="nav.children"}
|
{notempty name="nav.children"}
|
||||||
<ul>
|
<ul>
|
||||||
{taoler:snav}
|
{taoler:snav}
|
||||||
<li><a href="{snav:link /}">{snav:name /}</a></li>
|
<li><a href="{snav:link /}">{snav:name /}</a></li>
|
||||||
{/taoler:snav}
|
{/taoler:snav}
|
||||||
</ul>
|
</ul>
|
||||||
{/notempty}
|
{/notempty}
|
||||||
</li>
|
</li>
|
||||||
{/taoler:nav}
|
{/taoler:nav}
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="layui-menu-item-group" lay-options="{type: 'group', isAllowSpread: true}">
|
<li class="layui-menu-item-group" lay-options="{type: 'group', isAllowSpread: true}">
|
||||||
<div class="layui-menu-body-title">菜单</div>
|
<div class="layui-menu-body-title">菜单</div>
|
||||||
<hr>
|
<hr>
|
||||||
<ul>
|
<ul>
|
||||||
{:hook('ads_mobile_link')}
|
{:hook('ads_mobile_link')}
|
||||||
<li class="">
|
<li class="">
|
||||||
<div class="layui-menu-body-title">
|
<div class="layui-menu-body-title">
|
||||||
<a href="/">
|
<a href="/">
|
||||||
<i class="layui-icon layui-icon-home" style="color: #009688;"></i><span> 回首页</span>
|
<i class="layui-icon layui-icon-home" style="color: #009688;"></i><span> 回首页</span>
|
||||||
<span class="layui-font-12 layui-font-gray">index</span>
|
<span class="layui-font-12 layui-font-gray">index</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,13 +26,14 @@
|
|||||||
{include file="public/header" /}
|
{include file="public/header" /}
|
||||||
<div class="layui-container fly-marginTop fly-user-main">
|
<div class="layui-container fly-marginTop fly-user-main">
|
||||||
{include file="public/user-nav" /}
|
{include file="public/user-nav" /}
|
||||||
<div class="fly-panel " pad20 style="padding-top:10px;">
|
<div class="fly-panel" pad20 style="padding-top:10px;">
|
||||||
{block name="content"}
|
{block name="content"}
|
||||||
{/block}
|
{/block}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{include file="public/footer" /}
|
{include file="public/footer" /}
|
||||||
<script>
|
<script>
|
||||||
|
var $ = layui.jquery;
|
||||||
var notify = layui.notify;
|
var notify = layui.notify;
|
||||||
layui.cache.page = 'user';
|
layui.cache.page = 'user';
|
||||||
layui.cache.user = {
|
layui.cache.user = {
|
||||||
@ -48,7 +49,6 @@
|
|||||||
}).extend({
|
}).extend({
|
||||||
fly: 'index'
|
fly: 'index'
|
||||||
}).use('fly');
|
}).use('fly');
|
||||||
var $ = layui.jquery;
|
|
||||||
var articleUrl = "{:url('user/article')}";
|
var articleUrl = "{:url('user/article')}";
|
||||||
artListUrl = "{:url('User/artList')}",
|
artListUrl = "{:url('User/artList')}",
|
||||||
collListUrl = "{:url('User/collList')}",
|
collListUrl = "{:url('User/collList')}",
|
||||||
|
@ -14,14 +14,14 @@
|
|||||||
{block name="column"}{/block}
|
{block name="column"}{/block}
|
||||||
{block name="content"}
|
{block name="content"}
|
||||||
<div class="fly-home fly-panel" >
|
<div class="fly-home fly-panel" >
|
||||||
<img src="{$Request.domain}{$u.user_img}" alt="{$u.name}">
|
<img src="{$Request.domain}/{$u.user_img}" alt="{$u.name}">
|
||||||
{if($u.vip > 0)}<i class="iconfont icon-renzheng" title="Fly社区认证"></i>{/if}
|
{if($u.vip > 0)}<i class="iconfont icon-renzheng" title="Fly社区认证"></i>{/if}
|
||||||
<h1>
|
<h1>
|
||||||
{$u.nickname ?: $u.name}
|
{$u.nickname ?: $u.name}
|
||||||
{if($u.sex==0)}<i class="iconfont icon-nan"></i>
|
{if($u.sex==0)}<i class="iconfont icon-nan"></i>
|
||||||
{else}<i class="iconfont icon-nv"></i> {/if}
|
{else}<i class="iconfont icon-nv"></i> {/if}
|
||||||
{if($u.vip > 0)}
|
{if($u.vip > 0)}
|
||||||
<i class="layui-badge fly-badge-vip">VIP{$u.vip}</i>
|
<i class="layui-badge fly-badge-vip">{$u.vip}</i>
|
||||||
{/if}
|
{/if}
|
||||||
<!--
|
<!--
|
||||||
<span style="color:#c00;">(管理员)</span>
|
<span style="color:#c00;">(管理员)</span>
|
||||||
@ -82,17 +82,4 @@
|
|||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name="script"}
|
{block name="script"}
|
||||||
<script>
|
|
||||||
layui.use(['fly','face'], function(){
|
|
||||||
var $ = layui.$;
|
|
||||||
var fly = layui.fly;
|
|
||||||
var face = layui.face;
|
|
||||||
|
|
||||||
//如果你是采用模版自带的编辑器,你需要开启以下语句来解析。
|
|
||||||
$('.detail-body').each(function(){
|
|
||||||
var othis = $(this), html = othis.html();
|
|
||||||
othis.html(fly.content(html));
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{/block}
|
{/block}
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
<div class="layui-col-md6">
|
<div class="layui-col-md6">
|
||||||
<div class="fly-panel fly-panel-border"> <div class="fly-panel-title"> 我的会员信息 </div>
|
<div class="fly-panel fly-panel-border"> <div class="fly-panel-title"> 我的会员信息 </div>
|
||||||
<div class="fly-panel-main layui-text" style="padding: 18px 15px; height: 50px; line-height: 26px;">
|
<div class="fly-panel-main layui-text" style="padding: 18px 15px; height: 50px; line-height: 26px;">
|
||||||
<p>您的财富经验值:<span style="color: red">{$user.point}</span> 金币</p> <p>您当前为:<span style="color: red">VIP{$user.vip}</span></p> </div> </div> </div>
|
<p>您的财富经验值:<span style="color: red">{$user.point}</span> 金币</p> <p>您当前为:<span style="color: red">{$user.nick}</span></p> </div> </div> </div>
|
||||||
<div class="layui-col-md12" style="margin-top: -20px;">
|
<div class="layui-col-md12" style="margin-top: -20px;">
|
||||||
<div class="fly-panel fly-panel-border"> <div class="fly-panel-title"> 快捷方式 </div>
|
<div class="fly-panel fly-panel-border"> <div class="fly-panel-title"> 快捷方式 </div>
|
||||||
<div class="fly-panel-main">
|
<div class="fly-panel-main">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user