2.2.8
This commit is contained in:
parent
149d89e9db
commit
06b783c1e7
@ -43,7 +43,46 @@ class Forum extends AdminController
|
|||||||
|
|
||||||
public function list()
|
public function list()
|
||||||
{
|
{
|
||||||
$list = $this->model->getList(input('limit'),input('page'));
|
$data = Request::only(['id','name','title','sec']);
|
||||||
|
$where = [];
|
||||||
|
if (!empty($data['sec'])) {
|
||||||
|
switch ($data['sec']) {
|
||||||
|
case '1':
|
||||||
|
$where[] = ['status', '=', 1];
|
||||||
|
break;
|
||||||
|
case '2':
|
||||||
|
$where[] = ['is_top', '=', 1];
|
||||||
|
break;
|
||||||
|
case '3':
|
||||||
|
$where[] = ['is_hot', '=', 1];
|
||||||
|
break;
|
||||||
|
case '4':
|
||||||
|
$where[] = ['is_reply', '=', 1];
|
||||||
|
break;
|
||||||
|
case '5':
|
||||||
|
$where[] = ['status', '=', -1];
|
||||||
|
break;
|
||||||
|
case '6':
|
||||||
|
$where[] = ['status', '=', 0];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unset($data['sec']);
|
||||||
|
|
||||||
|
if(!empty($data['id'])){
|
||||||
|
$where[] = ['id', '=', $data['id']];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!empty($data['name'])){
|
||||||
|
$userId = Db::name('user')->where('name',$data['name'])->value('id');
|
||||||
|
$where[] = ['user_id', '=', $userId];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!empty($data['title'])){
|
||||||
|
$where[] = ['title', 'like', $data['title'].'%'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$list = $this->model->getList($where, input('limit'), input('page'));
|
||||||
$res = [];
|
$res = [];
|
||||||
if($list['total']){
|
if($list['total']){
|
||||||
foreach($list['data'] as $v) {
|
foreach($list['data'] as $v) {
|
||||||
|
@ -381,7 +381,7 @@ class Article extends Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 获取所有帖子内容
|
// 获取所有帖子内容
|
||||||
public function getList($limit,$page)
|
public function getList(array $where, int $limit, int $page)
|
||||||
{
|
{
|
||||||
return $this::field('id,user_id,cate_id,title,content,is_top,is_hot,is_reply,status,update_time')->with([
|
return $this::field('id,user_id,cate_id,title,content,is_top,is_hot,is_reply,status,update_time')->with([
|
||||||
'user' => function($query){
|
'user' => function($query){
|
||||||
@ -390,7 +390,9 @@ class Article extends Model
|
|||||||
'cate' => function($query){
|
'cate' => function($query){
|
||||||
$query->field('id,ename');
|
$query->field('id,ename');
|
||||||
}
|
}
|
||||||
])->paginate([
|
])->where($where)
|
||||||
|
->order('create_time', 'desc')
|
||||||
|
->paginate([
|
||||||
'list_rows' => $limit,
|
'list_rows' => $limit,
|
||||||
'page' => $page
|
'page' => $page
|
||||||
])->toArray();
|
])->toArray();
|
||||||
|
@ -16,7 +16,7 @@ return [
|
|||||||
// 应用名,此项不可更改
|
// 应用名,此项不可更改
|
||||||
'appname' => 'TaoLer',
|
'appname' => 'TaoLer',
|
||||||
// 版本配置
|
// 版本配置
|
||||||
'version' => '2.2.7',
|
'version' => '2.2.8',
|
||||||
// 加盐
|
// 加盐
|
||||||
'salt' => 'taoler',
|
'salt' => 'taoler',
|
||||||
// 数据库备份目录
|
// 数据库备份目录
|
||||||
|
@ -70,71 +70,70 @@ layui.define(["table", "form",'toast','common'], function (exports) {
|
|||||||
// });
|
// });
|
||||||
|
|
||||||
var api = {
|
var api = {
|
||||||
userinfo: {
|
userinfo: {
|
||||||
get: function () {
|
get: function () {
|
||||||
var userinfo = localStorage.getItem("taoleradmin_userinfo");
|
var userinfo = localStorage.getItem("taoleradmin_userinfo");
|
||||||
return userinfo ? JSON.parse(userinfo) : null;
|
return userinfo ? JSON.parse(userinfo) : null;
|
||||||
},
|
},
|
||||||
set: function (data) {
|
set: function (data) {
|
||||||
if (data) {
|
if (data) {
|
||||||
localStorage.setItem("taoleradmin_userinfo", JSON.stringify(data));
|
localStorage.setItem("taoleradmin_userinfo", JSON.stringify(data));
|
||||||
} else {
|
} else {
|
||||||
localStorage.removeItem("taoleradmin_userinfo");
|
localStorage.removeItem("taoleradmin_userinfo");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//监听工具条
|
//监听工具条
|
||||||
table.on("tool(addons-list)", function (obj) {
|
table.on("tool(addons-list)", function (obj) {
|
||||||
|
var data = obj.data;
|
||||||
|
var event = obj.event;
|
||||||
|
var url = $(this).data('url')
|
||||||
|
|
||||||
var data = obj.data;
|
// 安装
|
||||||
var event = obj.event;
|
var install = function (data,url,userLoginUrl,userIsPayUrl){
|
||||||
var url = $(this).data('url')
|
|
||||||
|
|
||||||
// 安装
|
|
||||||
var install = function (data,url,userLoginUrl,userIsPayUrl){
|
|
||||||
var userinfo = api.userinfo.get(); // 检测权限
|
var userinfo = api.userinfo.get(); // 检测权限
|
||||||
if(userinfo) {
|
if(userinfo) {
|
||||||
layer.confirm("确认安装吗?", "vcenter",function(index){
|
layer.confirm("确认安装吗?", "vcenter",function(index){
|
||||||
$.post(url, { name: data.name, version: data.version, uid: userinfo.uid, token: userinfo.token }, function (res) {
|
layer.close(index);
|
||||||
// 需要支付
|
let loading = layer.load();
|
||||||
if (res.code === -2) {
|
$.post(url, { name: data.name, version: data.version, uid: userinfo.uid, token: userinfo.token }, function (res) {
|
||||||
layer.close(index);
|
layer.close(loading);
|
||||||
layer.open({
|
// 需要支付
|
||||||
type: 2,
|
if (res.code === -2) {
|
||||||
area: [common.isModile()?'100%':'800px', common.isModile()?'100%':'600px'],
|
layer.open({
|
||||||
fixed: false, //不固定
|
type: 2,
|
||||||
maxmin: true,
|
area: [common.isModile()?'100%':'800px', common.isModile()?'100%':'600px'],
|
||||||
content: 'pay.html'+ "?id=" + data.id+ "&name=" + data.name + "&version=" + data.version + "&uid=" + userinfo.uid + "&price=" + data.price,
|
fixed: false, //不固定
|
||||||
success: function (layero, index){
|
maxmin: true,
|
||||||
// 订单轮询
|
content: 'pay.html'+ "?id=" + data.id+ "&name=" + data.name + "&version=" + data.version + "&uid=" + userinfo.uid + "&price=" + data.price,
|
||||||
var intervalPay = setInterval(function() {
|
success: function (layero, index){
|
||||||
$.post(userIsPayUrl,{name:data.name, userinfo:userinfo},function (res){
|
// 订单轮询
|
||||||
if(res.code === 0) {
|
var intervalPay = setInterval(function() {
|
||||||
layer.close(index);
|
$.post(userIsPayUrl,{name:data.name, userinfo:userinfo},function (res){
|
||||||
clearInterval(intervalPay);
|
if(res.code === 0) {
|
||||||
install(data,url,userLoginUrl,userIsPayUrl);
|
layer.close(index);
|
||||||
}
|
clearInterval(intervalPay);
|
||||||
|
install(data,url,userLoginUrl,userIsPayUrl);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},3000);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},3000);
|
|
||||||
}
|
}
|
||||||
|
// 安装成功
|
||||||
|
if (res.code === 0) {
|
||||||
|
toast.success({title:"安装成功",message:res.msg,position: 'topRight'});
|
||||||
|
}
|
||||||
|
// 安装失败
|
||||||
|
if (res.code === -1) {
|
||||||
|
toast.error({title:"安装失败",message:res.msg,position: 'topRight'});
|
||||||
|
}
|
||||||
|
// 重载
|
||||||
|
table.reloadData("addons-list",{},'deep');
|
||||||
});
|
});
|
||||||
}
|
|
||||||
// 安装成功
|
|
||||||
if (res.code === 0) {
|
|
||||||
layer.close(index);
|
|
||||||
toast.success({title:"安装成功",message:res.msg,position: 'topRight'});
|
|
||||||
}
|
|
||||||
// 安装失败
|
|
||||||
if (res.code === -1) {
|
|
||||||
layer.close(index);
|
|
||||||
toast.error({title:"安装失败",message:res.msg,position: 'topRight'});
|
|
||||||
}
|
|
||||||
// 重载
|
|
||||||
table.reloadData("addons-list",{},'deep');
|
|
||||||
});
|
});
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
// 未登录时
|
// 未登录时
|
||||||
layer.confirm('你当前还未登录TaoLer社区账号,请登录后操作!', {
|
layer.confirm('你当前还未登录TaoLer社区账号,请登录后操作!', {
|
||||||
@ -189,15 +188,15 @@ layui.define(["table", "form",'toast','common'], function (exports) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//安装插件
|
//安装插件
|
||||||
if (event === "install" || event === "upgrade") {
|
if (event === "install" || event === "upgrade") {
|
||||||
var userLoginUrl = $(this).data('userlogin');
|
var userLoginUrl = $(this).data('userlogin');
|
||||||
var userIsPayUrl = $(this).data('ispay');
|
var userIsPayUrl = $(this).data('ispay');
|
||||||
install(data,url,userLoginUrl,userIsPayUrl);
|
install(data,url,userLoginUrl,userIsPayUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 卸载插件
|
// 卸载插件
|
||||||
if (event === "uninstall") {
|
if (event === "uninstall") {
|
||||||
layer.confirm("是否卸载?", "vcenter",function(index) {
|
layer.confirm("是否卸载?", "vcenter",function(index) {
|
||||||
$.post(url, { name: data.name }, function (res) {
|
$.post(url, { name: data.name }, function (res) {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
@ -212,8 +211,8 @@ layui.define(["table", "form",'toast','common'], function (exports) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 配置插件
|
// 配置插件
|
||||||
if (event === "config") {
|
if (event === "config") {
|
||||||
$.post(url,{name:data.name},function (res){
|
$.post(url,{name:data.name},function (res){
|
||||||
// 无配置项拦截
|
// 无配置项拦截
|
||||||
if (res.code === -1) {
|
if (res.code === -1) {
|
||||||
|
4
vendor/composer/installed.php
vendored
4
vendor/composer/installed.php
vendored
@ -3,7 +3,7 @@
|
|||||||
'name' => 'taoser/taoler',
|
'name' => 'taoser/taoler',
|
||||||
'pretty_version' => 'dev-master',
|
'pretty_version' => 'dev-master',
|
||||||
'version' => 'dev-master',
|
'version' => 'dev-master',
|
||||||
'reference' => 'dcfb9c2a8181fb002fee01a04843002e53a68e20',
|
'reference' => 'f3d0aa0ea3473bafd7ce92799552709c43f3f02d',
|
||||||
'type' => 'project',
|
'type' => 'project',
|
||||||
'install_path' => __DIR__ . '/../../',
|
'install_path' => __DIR__ . '/../../',
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
@ -358,7 +358,7 @@
|
|||||||
'taoser/taoler' => array(
|
'taoser/taoler' => array(
|
||||||
'pretty_version' => 'dev-master',
|
'pretty_version' => 'dev-master',
|
||||||
'version' => 'dev-master',
|
'version' => 'dev-master',
|
||||||
'reference' => 'dcfb9c2a8181fb002fee01a04843002e53a68e20',
|
'reference' => 'f3d0aa0ea3473bafd7ce92799552709c43f3f02d',
|
||||||
'type' => 'project',
|
'type' => 'project',
|
||||||
'install_path' => __DIR__ . '/../../',
|
'install_path' => __DIR__ . '/../../',
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// This file is automatically generated at:2023-03-20 11:45:35
|
// This file is automatically generated at:2023-03-28 11:40:31
|
||||||
declare (strict_types = 1);
|
declare (strict_types = 1);
|
||||||
return array (
|
return array (
|
||||||
0 => 'taoser\\addons\\Service',
|
0 => 'taoser\\addons\\Service',
|
||||||
|
9
vendor/taoser/think-addons/src/helper.php
vendored
9
vendor/taoser/think-addons/src/helper.php
vendored
@ -2,9 +2,9 @@
|
|||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
use think\facade\Event;
|
use think\facade\Event;
|
||||||
|
use think\facade\App;
|
||||||
use think\facade\Route;
|
use think\facade\Route;
|
||||||
use taoser\addons\Service;
|
use taoser\addons\Service;
|
||||||
use think\facade\App;
|
|
||||||
use think\facade\Config;
|
use think\facade\Config;
|
||||||
use think\facade\Cache;
|
use think\facade\Cache;
|
||||||
use think\helper\{
|
use think\helper\{
|
||||||
@ -24,8 +24,11 @@ define('DS', DIRECTORY_SEPARATOR);
|
|||||||
spl_autoload_register(function ($class) {
|
spl_autoload_register(function ($class) {
|
||||||
|
|
||||||
$class = ltrim($class, '\\');
|
$class = ltrim($class, '\\');
|
||||||
|
// $app = new think\App();
|
||||||
$dir = App::getRootPath();
|
// $dir = $app->getRootPath();
|
||||||
|
// $dir = App::getRootPath();
|
||||||
|
$dir = app()->getRootPath();
|
||||||
|
// halt($dir);
|
||||||
$namespace = 'addons';
|
$namespace = 'addons';
|
||||||
|
|
||||||
if (strpos($class, $namespace) === 0) {
|
if (strpos($class, $namespace) === 0) {
|
||||||
|
@ -14,176 +14,176 @@
|
|||||||
{block name="link"} {/block}
|
{block name="link"} {/block}
|
||||||
{block name="column"}<div class="layui-hide-xs">{include file="/public/column" /}</div>{/block}
|
{block name="column"}<div class="layui-hide-xs">{include file="/public/column" /}</div>{/block}
|
||||||
{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-md9 content detail">
|
<div class="layui-col-md9 content detail">
|
||||||
<div class="fly-panel detail-box">
|
<div class="fly-panel detail-box">
|
||||||
{//标题}
|
{//标题}
|
||||||
<div class="title layui-clear"><h1 style="color:{$article.title_color ?? '#333'};">{$article.title}</h1></div>
|
<div class="title layui-clear"><h1 style="color:{$article.title_color ?? '#333'};">{$article.title}</h1></div>
|
||||||
<div class="detail_qrcode layui-hide-xs" onclick="PhoneDown();" id="mobile"></div>
|
<div class="detail_qrcode layui-hide-xs" onclick="PhoneDown();" id="mobile"></div>
|
||||||
|
|
||||||
{//图标}
|
{//图标}
|
||||||
<div class="user-questions">
|
<div class="user-questions">
|
||||||
<a class="user-avatar" href="{$Request.domain}{:url('user/home',['id'=>$article.user.id])}">
|
<a class="user-avatar" href="{$Request.domain}{:url('user/home',['id'=>$article.user.id])}">
|
||||||
<img src="{$Request.domain}{$article.user.user_img}" alt="{$article.user.name}" />
|
<img src="{$Request.domain}{$article.user.user_img}" alt="{$article.user.name}" />
|
||||||
<cite>{$article.user.nickname ?: $article.user.name} / </cite>
|
<cite>{$article.user.nickname ?: $article.user.name} / </cite>
|
||||||
</a>
|
</a>
|
||||||
<span class="user-post-time" data="{$article.create_time}" style="padding-top: 5px"></span>
|
<span class="user-post-time" data="{$article.create_time}" style="padding-top: 5px"></span>
|
||||||
/ <i class="iconfont" title="{:lang('reply')}"></i> {$article.comments_count} / <i class="iconfont" title="浏览"></i> {$pv}
|
/ <i class="iconfont" title="{:lang('reply')}"></i> {$article.comments_count} / <i class="iconfont" title="浏览"></i> {$pv}
|
||||||
{if ($article.jie == 0) }
|
{if ($article.jie == 0) }
|
||||||
<span class="layui-btn layui-btn-xs" style="background-color: #ff5722">{:lang('no finished')}</span>
|
<span class="layui-btn layui-btn-xs" style="background-color: #ff5722">{:lang('no finished')}</span>
|
||||||
{else /}
|
{else /}
|
||||||
<span class="layui-btn layui-btn-xs" style="background-color: #009688">{:lang('finished')}</span>
|
<span class="layui-btn layui-btn-xs" style="background-color: #009688">{:lang('finished')}</span>
|
||||||
|
{/if}
|
||||||
|
<span id="LAY_jieAdmin" data-id="{$article['id']}"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr class="layui-border-green" />
|
||||||
|
|
||||||
|
{//问题内容}
|
||||||
|
<div style="margin-top: 15px; font-size: 18px; font-weight: bold; color: rgb(130, 125, 125)">问题描述:</div>
|
||||||
|
<hr />
|
||||||
|
{:hook('taoplayerdiv')}
|
||||||
|
<div class="detail-body photos" id="content">{$article.content|raw}</div>
|
||||||
|
{if (($article.upzip !== '') || session('?user_name'))}
|
||||||
|
<div class="">
|
||||||
|
{notempty name="$article.upzip"}
|
||||||
|
<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>
|
||||||
|
{/notempty}
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<span id="LAY_jieAdmin" data-id="{$article['id']}"></span>
|
|
||||||
|
{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>
|
</div>
|
||||||
|
|
||||||
<hr class="layui-border-green" />
|
{//评论内容}
|
||||||
|
<div class="fly-panel detail-box" id="flyReply">
|
||||||
|
<span style="font-size: 18px">评论 {$article.comments_count}</span>
|
||||||
|
<ul class="jieda" id="jieda">
|
||||||
|
{volist name="comments['data']" id="vo" empty= ""}
|
||||||
|
<li data-id="{$vo.id}" class="jieda-daan">
|
||||||
|
<a name="item-1111111111"></a>
|
||||||
|
<div class="detail-about detail-about-reply">
|
||||||
|
<a class="fly-avatar" href="{$Request.domain}{:url('user/home',['id'=>$vo.user.id])}">
|
||||||
|
<img src="{$Request.domain}{$vo.user.user_img}" alt=" " />{if($vo.user.vip > 0)}<i class="iconfont icon-renzheng" title="认证信息"></i>{/if}
|
||||||
|
</a>
|
||||||
|
<div class="fly-detail-user">
|
||||||
|
<a href="{$Request.domain}{:url('user/home',['id'=>$vo.user.id])}" class="fly-link">
|
||||||
|
<cite>{$vo.user.nickname ?: $vo.user.name}</cite>
|
||||||
|
</a>
|
||||||
|
{if condition="$article.user.id eq $vo.user.id"}<span>({:lang('poster')})</span>{/if}
|
||||||
|
</div>
|
||||||
|
<div class="detail-hits"><span class="post-time" data="{$vo.create_time}"></span>{:hook('ipShow', $vo.user.city)}</div>
|
||||||
|
{if $vo.cai == 1}<i class="iconfont icon-caina" title="最佳答案"></i>{/if}
|
||||||
|
</div>
|
||||||
|
<div class="detail-body jieda-body photos">{$vo.content|raw}</div>
|
||||||
|
|
||||||
{//问题内容}
|
<div class="jieda-reply">
|
||||||
<div style="margin-top: 15px; font-size: 18px; font-weight: bold; color: rgb(130, 125, 125)">问题描述:</div>
|
<span class="jieda-zan {if($vo.zan != 0)}zanok{/if}" type="zan"><i class="iconfont icon-zan"></i><em>{$vo.zan}</em>赞</span>
|
||||||
<hr />
|
<span type="reply" id="user-reply"><i class="iconfont icon-svgmoban53"></i>{:lang('reply')}</span>
|
||||||
{:hook('taoplayerdiv')}
|
{//评论 编辑/删除/采纳/权限}
|
||||||
<div class="detail-body photos" id="content">{$article.content|raw}</div>
|
<div class="jieda-admin">
|
||||||
{if (($article.upzip !== '') || session('?user_name'))}
|
{if ((session('user_id') == $vo.user.id) && (getLimtTime($vo.create_time) < 2)) OR ($user.auth ?? '')}
|
||||||
<div class="">
|
<span type="edit">{:lang('edit')}</span>
|
||||||
{notempty name="$article.upzip"}
|
<span type="del">{:lang('delete')}</span>
|
||||||
<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} {if ($vo.cai == 0) && ((session('user_id') == $article.user_id) OR ($user.auth ?? '')) && ($article.jie == 0)/}
|
||||||
{/notempty}
|
<span class="jieda-accept" type="accept">{:lang('accept')}</span>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="margin: 5px 0px;">
|
||||||
|
<hr style="border:1px dotted red;height:1px;width:90%" />
|
||||||
|
<div>{$vo.user.sign|raw}</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{/volist}
|
||||||
|
</ul>
|
||||||
|
<div style="text-align: center" id="pages"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{//评论区}
|
||||||
|
{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 fly-editor" style="height: 150px"></textarea>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="layui-form-item que-comments">
|
||||||
|
<input type="hidden" name="article_id" value="{$article.id}" />
|
||||||
|
<input type="hidden" name="user_id" value="{:session('user_id')}" />
|
||||||
|
<button class="layui-btn layui-btn-danger" lay-filter="user-comment" lay-submit>{:lang('submit comments')}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{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>
|
</div>
|
||||||
|
|
||||||
{//评论内容}
|
{// 右栏}
|
||||||
<div class="fly-panel detail-box" id="flyReply">
|
<div class="layui-col-md3">
|
||||||
<span style="font-size: 18px">评论 {$article.comments_count}</span>
|
<div class="fly-panel">
|
||||||
<ul class="jieda" id="jieda">
|
<div class="fly-panel-main wenda-user">
|
||||||
{volist name="comments['data']" id="vo" empty= ""}
|
<div class="user-img">
|
||||||
<li data-id="{$vo.id}" class="jieda-daan">
|
<a href="{$Request.domain}{:url('user/home',['id'=>$article.user.id])}">
|
||||||
<a name="item-1111111111"></a>
|
<img class="" src="{$Request.domain}{$article.user.user_img}" alt="{$article.user.name}" />
|
||||||
<div class="detail-about detail-about-reply">
|
{if($article.user.vip > 0)}<i class="iconfont icon-renzheng" title="认证信息"></i>{/if}
|
||||||
<a class="fly-avatar" href="{$Request.domain}{:url('user/home',['id'=>$vo.user.id])}">
|
|
||||||
<img src="{$Request.domain}{$vo.user.user_img}" alt=" " />{if($vo.user.vip > 0)}<i class="iconfont icon-renzheng" title="认证信息"></i>{/if}
|
|
||||||
</a>
|
</a>
|
||||||
<div class="fly-detail-user">
|
|
||||||
<a href="{$Request.domain}{:url('user/home',['id'=>$vo.user.id])}" class="fly-link">
|
|
||||||
<cite>{$vo.user.nickname ?: $vo.user.name}</cite>
|
|
||||||
</a>
|
|
||||||
{if condition="$article.user.id eq $vo.user.id"}<span>({:lang('poster')})</span>{/if}
|
|
||||||
</div>
|
|
||||||
<div class="detail-hits"><span class="post-time" data="{$vo.create_time}"></span>{:hook('ipShow',$vo.user.city)}</div>
|
|
||||||
{if $vo.cai == 1}<i class="iconfont icon-caina" title="最佳答案"></i>{/if}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="detail-body jieda-body photos">{$vo.content|raw}</div>
|
<div class="questions">
|
||||||
|
<span class="layui-badge layui-bg-green">回答 {$article.user.comments_count}</span> <span class="layui-badge layui-bg-green">提问 {$article.user.article_count}</span>
|
||||||
<div class="jieda-reply">
|
<span class="layui-badge layui-bg-green">+ 关注</span>
|
||||||
<span class="jieda-zan {if($vo.zan != 0)}zanok{/if}" type="zan"><i class="iconfont icon-zan"></i><em>{$vo.zan}</em>赞</span>
|
|
||||||
<span type="reply" id="user-reply"><i class="iconfont icon-svgmoban53"></i>{:lang('reply')}</span>
|
|
||||||
{//评论 编辑/删除/采纳/权限}
|
|
||||||
<div class="jieda-admin">
|
|
||||||
{if ((session('user_id') == $vo.user.id) && (getLimtTime($vo.create_time) < 2)) OR ($user.auth ?? '')}
|
|
||||||
<span type="edit">{:lang('edit')}</span>
|
|
||||||
<span type="del">{:lang('delete')}</span>
|
|
||||||
{/if} {if ($vo.cai == 0) && ((session('user_id') == $article.user_id) OR ($user.auth ?? '')) && ($article.jie == 0)/}
|
|
||||||
<span class="jieda-accept" type="accept">{:lang('accept')}</span>
|
|
||||||
{/if}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div style="margin: 5px 0px;">
|
</div>
|
||||||
<hr style="border:1px dotted red;height:1px;width:90%" />
|
</div>
|
||||||
<div>{$vo.user.sign|raw}</div>
|
{if showSlider(7)}
|
||||||
</div>
|
<div class="fly-panel">
|
||||||
</li>
|
<div class="fly-panel-title">{:lang('sponsor')}<span style="padding: 0 3px">-</span>
|
||||||
|
<a href="" class="fly-link fly-joinad">{:lang('i want to join')}</a>
|
||||||
|
</div>
|
||||||
|
<div class="fly-panel-main">
|
||||||
|
{volist name="ad_comm" id="vo"}
|
||||||
|
<a href="{$vo.slid_href}" target="_blank" rel="nofollow" class="fly-zanzhu" style="background-color:{$vo.slid_color};">{$vo.slid_name}</a>
|
||||||
|
{/volist}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
<dl class="fly-panel fly-list-one">
|
||||||
|
<dt class="fly-panel-title">{:lang('hot post list')}</dt>
|
||||||
|
{volist name="artHot" id="vo"}
|
||||||
|
<dd>
|
||||||
|
<a href="{$Request.domain}{$vo.url}">{$vo.title}</a>
|
||||||
|
<span><i class="iconfont icon-pinglun1"></i> {$vo.comments_count}</span>
|
||||||
|
</dd>
|
||||||
{/volist}
|
{/volist}
|
||||||
</ul>
|
</dl>
|
||||||
<div style="text-align: center" id="pages"></div>
|
{if showSlider(4)}
|
||||||
</div>
|
<div class="fly-panel" style="padding: 5px 0; text-align: center">
|
||||||
|
{volist name="ad_art" id="vo"}
|
||||||
{//评论区}
|
<a href="{$vo.slid_href}" target="_blank"><img src="{$Request.domain}/{$vo.slid_img}" style="max-width: 100%" /></a>
|
||||||
{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 fly-editor" style="height: 150px"></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="layui-form-item que-comments">
|
|
||||||
<input type="hidden" name="article_id" value="{$article.id}" />
|
|
||||||
<input type="hidden" name="user_id" value="{:session('user_id')}" />
|
|
||||||
<button class="layui-btn layui-btn-danger" lay-filter="user-comment" lay-submit>{:lang('submit comments')}</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{// 右栏}
|
|
||||||
<div class="layui-col-md3">
|
|
||||||
<div class="fly-panel">
|
|
||||||
<div class="fly-panel-main wenda-user">
|
|
||||||
<div class="user-img">
|
|
||||||
<a href="{$Request.domain}{:url('user/home',['id'=>$article.user.id])}">
|
|
||||||
<img class="" src="{$Request.domain}{$article.user.user_img}" alt="{$article.user.name}" />
|
|
||||||
{if($article.user.vip > 0)}<i class="iconfont icon-renzheng" title="认证信息"></i>{/if}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="questions">
|
|
||||||
<span class="layui-badge layui-bg-green">回答 {$article.user.comments_count}</span> <span class="layui-badge layui-bg-green">提问 {$article.user.article_count}</span>
|
|
||||||
<span class="layui-badge layui-bg-green">+ 关注</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{if showSlider(7)}
|
|
||||||
<div class="fly-panel">
|
|
||||||
<div class="fly-panel-title">{:lang('sponsor')}<span style="padding: 0 3px">-</span>
|
|
||||||
<a href="" class="fly-link fly-joinad">{:lang('i want to join')}</a>
|
|
||||||
</div>
|
|
||||||
<div class="fly-panel-main">
|
|
||||||
{volist name="ad_comm" id="vo"}
|
|
||||||
<a href="{$vo.slid_href}" target="_blank" rel="nofollow" class="fly-zanzhu" style="background-color:{$vo.slid_color};">{$vo.slid_name}</a>
|
|
||||||
{/volist}
|
{/volist}
|
||||||
</div>
|
</div>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{//crud管理模块}
|
||||||
<dl class="fly-panel fly-list-one">
|
{include file="/public/crud" /}
|
||||||
<dt class="fly-panel-title">{:lang('hot post list')}</dt>
|
|
||||||
{volist name="artHot" id="vo"}
|
|
||||||
<dd>
|
|
||||||
<a href="{$Request.domain}{$vo.url}">{$vo.title}</a>
|
|
||||||
<span><i class="iconfont icon-pinglun1"></i> {$vo.comments_count}</span>
|
|
||||||
</dd>
|
|
||||||
{/volist}
|
|
||||||
</dl>
|
|
||||||
{if showSlider(4)}
|
|
||||||
<div class="fly-panel" style="padding: 5px 0; text-align: center">
|
|
||||||
{volist name="ad_art" id="vo"}
|
|
||||||
<a href="{$vo.slid_href}" target="_blank"><img src="{$Request.domain}/{$vo.slid_img}" style="max-width: 100%" /></a>
|
|
||||||
{/volist}
|
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
{//crud管理模块}
|
|
||||||
{include file="/public/crud" /}
|
|
||||||
</div>
|
|
||||||
<!--底部栏-->
|
<!--底部栏-->
|
||||||
<div class="site-tree-mobile-detail-bottom layui-hide-md">
|
<div class="site-tree-mobile-detail-bottom layui-hide-md">
|
||||||
<div id="LAY_jieAdmin1" data-id="{$article['id']}"></div>
|
<div id="LAY_jieAdmin1" data-id="{$article['id']}"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{include file="public/menu" /}
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name="script"}
|
{block name="script"}
|
||||||
@ -322,7 +322,7 @@
|
|||||||
//首次不执行
|
//首次不执行
|
||||||
if (!first) {
|
if (!first) {
|
||||||
$.post("{:url('article/detail')}", { id: id, page: page }, function () {
|
$.post("{:url('article/detail')}", { id: id, page: page }, function () {
|
||||||
location.href = url + '?page=' + page;
|
location.href = url + '?page=' + page + '#flyReply';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -347,9 +347,8 @@
|
|||||||
|
|
||||||
{//图片点击放大}
|
{//图片点击放大}
|
||||||
{include file="/public/images-click" /}
|
{include file="/public/images-click" /}
|
||||||
{:hook('markdownhook')}
|
|
||||||
{include file="/public/qr-read" /}
|
{include file="/public/qr-read" /}
|
||||||
|
|
||||||
{volist name="push_js" id="vo"} {$vo.jscode|raw} {/volist}
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
|
@ -284,7 +284,7 @@
|
|||||||
{//crud管理模块}
|
{//crud管理模块}
|
||||||
{include file="/public/crud" /}
|
{include file="/public/crud" /}
|
||||||
</main>
|
</main>
|
||||||
{include file="public/menu" /}
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name="script"}
|
{block name="script"}
|
||||||
@ -414,26 +414,26 @@ layui.use(['fly', 'face','colorpicker', 'laypage'], function(){
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
//执行一个laypage实例
|
// 评论分页
|
||||||
laypage.render({
|
laypage.render({
|
||||||
elem: 'pages' //注意,这里的 test1 是 ID,不用加 # 号
|
elem: "pages", //注意,这里的 test1 是 ID,不用加 # 号
|
||||||
,count: "{$article.comments_count}" //数据总数,从服务端得到
|
count: "{$article.comments_count}", //数据总数,从服务端得到
|
||||||
,limit: 10
|
limit: 10,
|
||||||
,curr : {$page}
|
curr: "{$page}",
|
||||||
|
//获取起始页
|
||||||
//获取起始页
|
jump: function (obj, first) {
|
||||||
,jump: function(obj, first){
|
|
||||||
//首次不执行
|
|
||||||
if(!first){
|
|
||||||
var page = obj.curr;
|
var page = obj.curr;
|
||||||
var url = "{:url('article/detail',['id'=>$article.id])}";
|
var limit = obj.limit;
|
||||||
|
var url = "{:url('article_detail',['id' => $article.id ,'ename' =>$article['cate']['ename']])}";
|
||||||
var id = "{$article.id}";
|
var id = "{$article.id}";
|
||||||
$.post("{:url('article/detail')}",{"id":id,"page":page},function(){
|
//首次不执行
|
||||||
window.location.href = url + '?page=' + page + '#flyReply';
|
if (!first) {
|
||||||
});
|
$.post("{:url('article/detail')}", { id: id, page: page }, function () {
|
||||||
}
|
location.href = url + '?page=' + page + '#flyReply';
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
//下载
|
//下载
|
||||||
$('#zip-download').click(function (){
|
$('#zip-download').click(function (){
|
||||||
@ -453,12 +453,6 @@ layui.use(['fly', 'face','colorpicker', 'laypage'], function(){
|
|||||||
|
|
||||||
{:hook('taoplyr')}
|
{:hook('taoplyr')}
|
||||||
|
|
||||||
{:hook('markdownhook')}
|
|
||||||
|
|
||||||
{include file="/public/qr-read" /}
|
{include file="/public/qr-read" /}
|
||||||
|
|
||||||
{volist name="push_js" id="vo"}
|
|
||||||
{$vo.jscode|raw}
|
|
||||||
{/volist}
|
|
||||||
|
|
||||||
{/block}
|
{/block}
|
@ -62,7 +62,7 @@
|
|||||||
<div id="LAY_jieAdmin1" data-id="{$article['id']}"></div>
|
<div id="LAY_jieAdmin1" data-id="{$article['id']}"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{include file="public/menu" /}
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name="script"}
|
{block name="script"}
|
||||||
@ -173,26 +173,26 @@
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
//执行一个laypage实例
|
// 评论分页
|
||||||
laypage.render({
|
laypage.render({
|
||||||
elem: 'pages' //注意,这里的 test1 是 ID,不用加 # 号
|
elem: "pages", //注意,这里的 test1 是 ID,不用加 # 号
|
||||||
,count: "{$article.comments_count}" //数据总数,从服务端得到
|
count: "{$article.comments_count}", //数据总数,从服务端得到
|
||||||
,limit: 10
|
limit: 10,
|
||||||
,curr : {$page}
|
curr: "{$page}",
|
||||||
|
|
||||||
//获取起始页
|
//获取起始页
|
||||||
,jump: function(obj, first){
|
jump: function (obj, first) {
|
||||||
|
var page = obj.curr;
|
||||||
|
var limit = obj.limit;
|
||||||
|
var url = "{:url('article_detail',['id' => $article.id ,'ename' =>$article['cate']['ename']])}";
|
||||||
|
var id = "{$article.id}";
|
||||||
//首次不执行
|
//首次不执行
|
||||||
if(!first){
|
if (!first) {
|
||||||
var page = obj.curr;
|
$.post("{:url('article/detail')}", { id: id, page: page }, function () {
|
||||||
var url = "{:url('article/detail',['id'=>$article.id])}";
|
location.href = url + '?page=' + page + '#flyReply';
|
||||||
var id = "{$article.id}";
|
|
||||||
$.post("{:url('article/detail')}",{"id":id,"page":page},function(){
|
|
||||||
window.location.href = url + '?page=' + page + '#flyReply';
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
//下载
|
//下载
|
||||||
$('#zip-download').click(function (){
|
$('#zip-download').click(function (){
|
||||||
@ -213,10 +213,5 @@
|
|||||||
|
|
||||||
{//图片点击放大}
|
{//图片点击放大}
|
||||||
{include file="/public/images-click" /}
|
{include file="/public/images-click" /}
|
||||||
{:hook('markdownhook')}
|
|
||||||
|
|
||||||
{volist name="push_js" id="vo"}
|
|
||||||
{$vo.jscode|raw}
|
|
||||||
{/volist}
|
|
||||||
|
|
||||||
{/block}
|
{/block}
|
@ -200,7 +200,7 @@
|
|||||||
<div id="LAY_jieAdmin1" data-id="{$article['id']}"></div>
|
<div id="LAY_jieAdmin1" data-id="{$article['id']}"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{include file="public/menu" /}
|
|
||||||
{/block}
|
{/block}
|
||||||
{block name="script"}
|
{block name="script"}
|
||||||
|
|
||||||
@ -324,26 +324,26 @@ layui.use(['fly', 'face','colorpicker', 'laypage'], function(){
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
//执行一个laypage实例
|
// 评论分页
|
||||||
laypage.render({
|
laypage.render({
|
||||||
elem: 'pages' //注意,这里的 test1 是 ID,不用加 # 号
|
elem: "pages", //注意,这里的 test1 是 ID,不用加 # 号
|
||||||
,count: "{$article.comments_count}" //数据总数,从服务端得到
|
count: "{$article.comments_count}", //数据总数,从服务端得到
|
||||||
,limit: 10
|
limit: 10,
|
||||||
,curr : {$page}
|
curr: "{$page}",
|
||||||
|
|
||||||
//获取起始页
|
//获取起始页
|
||||||
,jump: function(obj, first){
|
jump: function (obj, first) {
|
||||||
|
var page = obj.curr;
|
||||||
|
var limit = obj.limit;
|
||||||
|
var url = "{:url('article_detail',['id' => $article.id ,'ename' =>$article['cate']['ename']])}";
|
||||||
|
var id = "{$article.id}";
|
||||||
//首次不执行
|
//首次不执行
|
||||||
if(!first){
|
if (!first) {
|
||||||
var page = obj.curr;
|
$.post("{:url('article/detail')}", { id: id, page: page }, function () {
|
||||||
var url = "{:url('article/detail',['id'=>$article.id])}";
|
location.href = url + '?page=' + page + '#flyReply';
|
||||||
var id = "{$article.id}";
|
|
||||||
$.post("{:url('article/detail')}",{"id":id,"page":page},function(){
|
|
||||||
window.location.href = url + '?page=' + page + '#flyReply';
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
//下载
|
//下载
|
||||||
$('#zip-download').click(function (){
|
$('#zip-download').click(function (){
|
||||||
@ -364,11 +364,7 @@ layui.use(['fly', 'face','colorpicker', 'laypage'], function(){
|
|||||||
|
|
||||||
{//图片点击放大}
|
{//图片点击放大}
|
||||||
{include file="/public/images-click" /}
|
{include file="/public/images-click" /}
|
||||||
{:hook('markdownhook')}
|
|
||||||
{include file="/public/qr-read" /}
|
{include file="/public/qr-read" /}
|
||||||
|
|
||||||
{volist name="push_js" id="vo"}
|
|
||||||
{$vo.jscode|raw}
|
|
||||||
{/volist}
|
|
||||||
|
|
||||||
{/block}
|
{/block}
|
@ -47,6 +47,8 @@
|
|||||||
</div>
|
</div>
|
||||||
{//右栏}
|
{//右栏}
|
||||||
<div class="layui-col-md4">
|
<div class="layui-col-md4">
|
||||||
|
{:hook('live')}
|
||||||
|
{:hook('kankan')}
|
||||||
{:hook('signhook', ['id'=>1])}
|
{:hook('signhook', ['id'=>1])}
|
||||||
|
|
||||||
<!--首页图片广告-->
|
<!--首页图片广告-->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user