升级系统时重要信息提示
This commit is contained in:
parent
38d6f26b5a
commit
11eea83c78
1
app/admin/controller/.gitignore
vendored
1
app/admin/controller/.gitignore
vendored
@ -2,4 +2,5 @@ KeyAuth.php
|
||||
Version.php
|
||||
TimeLine.php
|
||||
Plugins.php
|
||||
App.php
|
||||
|
||||
|
@ -108,7 +108,7 @@ class Upgrade extends AdminController
|
||||
$res = json(['code'=>$version_code,'msg'=>$versions->msg]);
|
||||
}
|
||||
if($version_code == 1){
|
||||
$res = json(['code'=>$versions->code,'msg'=>$versions->msg,'version'=>$versions->version,'upnum'=>$versions->up_num]);
|
||||
$res = json(['code'=>$versions->code,'msg'=>$versions->msg,'version'=>$versions->version,'upnum'=>$versions->up_num,'info'=>$versions->info]);
|
||||
}
|
||||
if($version_code == 0){
|
||||
$res = json(['code'=>$versions->code,'msg'=>$versions->msg]);
|
||||
|
@ -103,12 +103,12 @@
|
||||
} else if (data.code == 1) {
|
||||
//可升级
|
||||
layer.close(loading);
|
||||
$('div#ver_nums').after('<div class="layui-input-inline layui-input-company">发现<span style="color:red">'+data.upnum+'</span>个新版本:<span style="color:red">可更新至v'+data.version+'</span></div>');
|
||||
$('div#ver_nums').after('<div class="layui-input-inline layui-input-company">发现<span style="color:red">'+data.upnum+'</span>个新版本:<span style="color:red">可更新至v' + data.version + ' [!!!重要:' + data.info + ']</span></div>');
|
||||
//$('div#ver_nums').after('<div class="layui-input-inline layui-input-company">发现<span style="color:red">'+data.upnum+'</span>个新版本:<span style="color:red">可更新至v'+data.version+'</span></div> <button class="layui-btn layui-btn-sm" lay-submit lay-filter="update_system" data-url="{$ver_num.upgrade_url}" id="update_system">确认升级</button>');
|
||||
$('button#upload-check').hide();
|
||||
|
||||
//更新系统
|
||||
layer.confirm('可更新至v'+data.version+' 确定升级?',{icon: 3, title:'升级系统'}, function(index){
|
||||
layer.confirm('更新v' + data.version + ',升级说明:<span style="color:red">[!!!重要:' + data.info + ']</span><br>确定升级?',{icon: 3, title:'升级系统'}, function(index){
|
||||
uploads(); //更新
|
||||
layer.close(index); //关闭load加载层
|
||||
});
|
||||
|
@ -16,7 +16,7 @@ return [
|
||||
// 应用名,此项不可更改
|
||||
'appname' => 'TaoLer',
|
||||
// 版本配置
|
||||
'version' => '1.9.26',
|
||||
'version' => '1.9.27',
|
||||
// 加盐
|
||||
'salt' => 'taoler',
|
||||
// 数据库备份目录
|
||||
|
@ -218,10 +218,10 @@ pre{position: relative; margin: 10px 0; padding: 15px; line-height: 20px; border
|
||||
*/
|
||||
|
||||
/* 搜索 */
|
||||
.fly-header .layui-nav .fly-search{display: inline-block; vertical-align: top; width: 50px; height: 50px; padding-top:20px;margin-right: 10px; text-align: center; cursor: pointer; font-size: 20px;}
|
||||
.fly-header .layui-nav .fly-search .layui-icon{font-size: 20px;}
|
||||
.fly-header .layui-nav .fly-search:hover{color: #5FB878;}
|
||||
.fly-header .layui-nav .fly-layer-search input{height: 75px; line-height: 75px; width: 500px; padding: 0 15px; font-size: 20px; border: none 0; background: none;}
|
||||
.fly-search{display: inline-block; vertical-align: top; width: 50px; height: 50px; padding-top:20px;margin-right: 10px; text-align: center; cursor: pointer; font-size: 20px;}
|
||||
.fly-search .layui-icon{font-size: 20px;}
|
||||
.fly-search:hover{color: #5FB878;}
|
||||
.fly-layer-search input{height: 75px; line-height: 75px; width: 500px; padding: 0 15px; font-size: 20px; border: none 0; background: none;}
|
||||
|
||||
|
||||
/* 底部 */
|
||||
|
@ -185,7 +185,7 @@ layui.define('fly', function(exports){
|
||||
$('.jieda-accept').remove();
|
||||
li.addClass('jieda-daan');
|
||||
li.find('.detail-about').append('<i class="iconfont icon-caina" title="最佳答案"></i>');
|
||||
location.reload();
|
||||
location.reload();
|
||||
} else {
|
||||
layer.msg(res.msg);
|
||||
}
|
||||
@ -204,9 +204,9 @@ layui.define('fly', function(exports){
|
||||
,title: '编辑回帖'
|
||||
,area: ['738px', '310px']
|
||||
,success: function(layero){
|
||||
fly.layEditor({
|
||||
elem: layero.find('textarea')
|
||||
});
|
||||
fly.layEditor({
|
||||
elem: layero.find('textarea')
|
||||
});
|
||||
}
|
||||
}, function(value, index){
|
||||
fly.json(commentUpdateDa, {
|
||||
@ -214,7 +214,7 @@ layui.define('fly', function(exports){
|
||||
,content: value
|
||||
}, function(res){
|
||||
layer.close(index);
|
||||
layer.msg(res.msg);
|
||||
layer.msg(res.msg);
|
||||
li.find('.detail-body').html(fly.content(value));
|
||||
});
|
||||
});
|
||||
|
1
public/view/common/blog/css/style.css
Normal file
1
public/view/common/blog/css/style.css
Normal file
File diff suppressed because one or more lines are too long
BIN
public/view/common/blog/fonts/iconfont.woff
Normal file
BIN
public/view/common/blog/fonts/iconfont.woff
Normal file
Binary file not shown.
BIN
public/view/common/blog/image/user-bg.jpg
Normal file
BIN
public/view/common/blog/image/user-bg.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
6
public/view/common/blog/js/view-image.min.js
vendored
Normal file
6
public/view/common/blog/js/view-image.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -63,23 +63,6 @@
|
||||
<p>{$sysInfo.state}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{//评论区}
|
||||
{if ( 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 class="fly-panel detail-box" id="flyReply">
|
||||
@ -125,6 +108,24 @@
|
||||
</ul>
|
||||
<div style="text-align: center" id="pages"></div>
|
||||
</div>
|
||||
|
||||
{//评论区}
|
||||
{if ( 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>
|
||||
|
||||
{// 右栏}
|
||||
@ -223,9 +224,7 @@
|
||||
othis.html(fly.content(html));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//tpl模板给发布时间赋值
|
||||
$("div.user-questions").children("span.user-post-time").each(function () {
|
||||
var othis = $(this),
|
||||
|
158
view/taoler/index/article/blog/cate.html
Normal file
158
view/taoler/index/article/blog/cate.html
Normal file
@ -0,0 +1,158 @@
|
||||
{extend name="public/base" /}
|
||||
|
||||
{block name="title"}{$cateinfo.catename} - {$sysInfo.webname}{/block}
|
||||
{block name="keywords"}{$cateinfo.catename},{$sysInfo.webname}{/block}
|
||||
{block name="description"}{$cateinfo.desc}{/block}
|
||||
{block name="ogtitle"}<meta property="og:title" content="{$cateinfo.catename} - {$sysInfo.webname}">{/block}
|
||||
{block name="ogdescription"}<meta property="og:description" content="{$cateinfo.desc}" />{/block}
|
||||
{block name="meta"}
|
||||
<!-- SEO优化 -->
|
||||
<meta name="Copyright" content="{$sysInfo.webname}">
|
||||
<meta property="og:type" content="website"/>
|
||||
<meta property="og:url" content="{$Request.domain}"/>
|
||||
<meta property="og:site_name" content="{$sysInfo.webname}"/>
|
||||
<meta property="og:image" content=""/>
|
||||
{/block}
|
||||
{block name="link"}
|
||||
<!-- 特效丶样式 -->
|
||||
<link rel="dns-prefetch" href="//q4.qlogo.cn">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{$Request.domain}/favicon.ico"/>
|
||||
<link rel="apple-touch-icon" sizes="180x180" href=""/>
|
||||
<link rel="apple-touch-icon-precomposed" href=""/>
|
||||
<link rel="stylesheet" href="{$Request.domain}/view/common/blog/css/style.css" type="text/css" charset="utf-8"/>
|
||||
<script src="/static/jquery-3.6.0.min.js"></script>
|
||||
{/block}
|
||||
|
||||
{block name="column"}{include file="/public/column" /}{/block}
|
||||
|
||||
{block name="content"}
|
||||
<main class="py-2 py-md-2 pb-3">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
<div class="post"><h1>{$sysInfo.webname}</h1></div>
|
||||
<section id="main" class="list-home list-grid list-grid-padding">
|
||||
{volist name="artList['data']" id="art"}
|
||||
<article class="list-item block card-plain">
|
||||
{if getOnepic($art.content)}
|
||||
<figure class="media media-3x2 col-4 col-md-4 d-none d-md-block">
|
||||
<a class="media-content" href="{$art.url}" title="{$art.title}">
|
||||
<img src="{:getOnepic($art.content)}" width="233" height="155" alt="{$art.title}">
|
||||
</a>
|
||||
</figure>
|
||||
{/if}
|
||||
<div class="list-width list-content">
|
||||
<div class="list-body">
|
||||
<h3>
|
||||
<a href="{$Request.domain}{$art.url}" title="{$art.title}" class="list-title fanpian">{$art.title}</a>
|
||||
</h3>
|
||||
<div class="list-desc d-block d-md-block text-sm text-secondary my-3">
|
||||
<p class="h-3x">{:getArtContent($art.content)}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-footer">
|
||||
<div class="d-flex flex-fill align-items-center text-muted text-xs">
|
||||
<time class="d-inline-block" datetime="{$art.create_time|date='Y-m-d'}">{$art.create_time|date='Y-m-d'}</time>
|
||||
<div class="d-inline-block mx-1 mx-md-2">
|
||||
<i class="text-primary">·</i>
|
||||
</div>
|
||||
<div class="d-inline-block">
|
||||
<a href="{$Request.domain}{:url('user/home',['id'=>$art.user.id])}" class="text-muted" title="发布于{$art.user.name}" rel="category">{$art.user.nickname ?: $art.user.name}</a>
|
||||
</div>
|
||||
<div class="flex-fill"></div>
|
||||
<div class="mx-1">
|
||||
<a href="{$Request.domain}{$art.url}" class="text-muted">阅读全文</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
{/volist}
|
||||
</section>
|
||||
<nav class="navigation pagination" role="navigation" aria-label="Posts Navigation">
|
||||
<div class="nav-links" style="padding-bottom: 10px;" id="pages">
|
||||
<ul class="page-navigator">
|
||||
<li class='current'><span aria-current="page">1</span></li>
|
||||
<li id="loadmore"><a style="margin-right: 0px;">当前第 1 页</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div class="sidebar col-lg-4 d-none d-lg-block">
|
||||
<div class="theiaStickySidebar">
|
||||
{if showSlider(3)}
|
||||
<dl class="function" id="rongkeji_tuwenad">
|
||||
<dt style="display:none;"></dt>
|
||||
{volist name="ad_cateImg" id="vo"}
|
||||
<dd class="function_c">
|
||||
<div><a href="{$vo.slid_href}" target="_blank" rel="nofollow"><img src="{$Request.domain}/{$vo.slid_img}" width="350" height="350" alt="图文广告"></a>
|
||||
</div>
|
||||
</dd>
|
||||
{/volist}
|
||||
</dl>
|
||||
{/if}
|
||||
<dl class="function" id="rongkeji_remenwenzhang">
|
||||
<dt class="function_t">热门文章</dt>
|
||||
<dd class="function_c">
|
||||
<ul>
|
||||
{volist name="artHot" id="vo"}
|
||||
<li style="display: block;">
|
||||
<div class="list-body fanpian">
|
||||
<a href="{$Request.domain}{$vo.url}" target="_blank">{$vo.title}</a>
|
||||
</div>
|
||||
<div class="list-footer">
|
||||
<div class="text-muted text-xs"><time class="d-inline-block">{$vo.create_time|date='Y-m-d'}</time></div>
|
||||
</div>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
{notempty name="flinks"}
|
||||
<dl class="function" id="divLinkage">
|
||||
<dt class="function_t">友情链接</dt>
|
||||
<dd class="function_c">
|
||||
<ul>
|
||||
{volist name="flinks" id="vo"}
|
||||
<li class="link-item"><a href="{$vo.slid_href}" target="_blank" title="{$vo.slid_name}">{$vo.slid_name}</a></li>
|
||||
{/volist}
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
{/notempty}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{include file="public/menu" /}
|
||||
{/block}
|
||||
{block name="script"}
|
||||
|
||||
<script type='text/javascript' src="{$Request.domain}/view/common/blog/js/theme.js"></script>
|
||||
<script>
|
||||
layui.use(['laypage'], function(){
|
||||
var laypage = layui.laypage;
|
||||
var $ = layui.jquery;
|
||||
|
||||
//执行一个laypage实例
|
||||
laypage.render({
|
||||
elem: 'pages' //注意,这里的 test1 是 ID,不用加 # 号
|
||||
,count: "{$artList['total']}" //数据总数,从服务端得到
|
||||
,limit: "{$artList['per_page']}"
|
||||
,curr : "{$artList['current_page']}"
|
||||
|
||||
//获取起始页
|
||||
,jump: function(obj, first){
|
||||
|
||||
//首次不执行
|
||||
if(!first){
|
||||
var page = obj.curr;
|
||||
location.href ="{$path}/"+page+'.html';
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/block}
|
462
view/taoler/index/article/blog/detail.html
Normal file
462
view/taoler/index/article/blog/detail.html
Normal file
@ -0,0 +1,462 @@
|
||||
{extend name="public/base" /}
|
||||
|
||||
{block name="title"}{$article.title} - {$sysInfo.webname}{/block}
|
||||
{block name="keywords"}{$article.keywords ?: $article.title}{/block}
|
||||
{block name="description"}{$article.title},{$article.description}{/block}
|
||||
{block name="ogtitle"}<meta property="og:title" content="{$article.title} - {$sysInfo.webname}">{/block}
|
||||
{block name="ogdescription"}<meta property="og:description" content="{$article.title},{$article.description ?? ''}" />{/block}
|
||||
{block name="ogimage"}<meta property="og:image" content="{:getOnepic($article.content)}"/>{/block}
|
||||
{block name="meta"}
|
||||
<!-- SEO优化 -->
|
||||
<meta property="og:type" content="article"/>
|
||||
<meta property="bytedance:published_time" content="{$article.create_time|date='c'}" />
|
||||
<meta property="bytedance:updated_time" content="{$article.update_time|date='c'}" />
|
||||
<meta property="og:updated_time" content="{$article.update_time|date='c'}" />
|
||||
<meta name="mobile-agent" content="format=html5;url={$Request.domain}{$Request.url}">
|
||||
{/block}
|
||||
{block name="link"}
|
||||
<link rel="stylesheet" href="{$Request.domain}/static/res/css/plyr.css" charset="utf-8">
|
||||
<!-- 谷歌JavaScript结构化 -->
|
||||
<script type="application/ld+json">{"@context": "https://schema.org","@type": "NewsArticle","headline": "{$article.title}","image" : "{:getOnepic($article.content)}","datePublished" : "{$article.create_time|date='c'}","dateModified": "{$article.update_time|date='c'}","author" : {"@type" : "Person","name" : "用户投稿","url": "{$Request.domain}"}},</script>
|
||||
<!-- 百度JavaScript结构化 -->
|
||||
<script type="application/ld+json">{"@context": "https://ziyuan.baidu.com/contexts/cambrian.jsonld","@id": "{$Request.domain}{$Request.url}","title": "{$article.title}","images": ["{:getOnepic($article.content)}"],"description": "{$article.description ?? ''}","pubDate": "{$article.create_time|date='c'}","upDate": "{$article.update_time|date='c'}"}</script>
|
||||
<!-- 特效丶样式 -->
|
||||
<link rel="stylesheet" href="{$Request.domain}/view/common/blog/css/style.css" type="text/css" charset="utf-8"/>
|
||||
<script type='text/javascript' src="{$Request.domain}/view/common/blog/js/view-image.min.js"></script>
|
||||
<script>window.ViewImage && ViewImage.init('.post-content img');</script>
|
||||
{/block}
|
||||
{block name="column"}<div class="layui-hide-xs">{include file="/public/column" /}</div>{/block}
|
||||
{block name="content"}
|
||||
<main class="py-2 py-md-2 pb-3" style="transform: none">
|
||||
<div class="container" style="transform: none">
|
||||
<div class="row" style="transform: none">
|
||||
<div class="col-lg-8" itemscope itemType="http://schema.org/BlogPosting">
|
||||
<div class="post card">
|
||||
<section class="card-body">
|
||||
<div class="post-header border-bottom mb-4 pb-4">
|
||||
<h1 class="h3 mb-3" itemprop="headline">{$article.title}</h1>
|
||||
<div class="meta d-flex align-items-center text-xs text-muted">
|
||||
<div>
|
||||
<div class="d-inline-block" itemprop="author" itemscope="" itemtype="https://schema.org/Person">
|
||||
Posted by <a href="{$Request.domain}" target="_blank" class="text-muted" itemprop="url"><span itemprop="name">{$article.user.name}</span></a>,<a href="{:url('cate',['ename'=>$article.cate.ename])}" target="_blank" class="text-muted" rel="category">{$article.cate.catename}</a>,<time class="d-inline-block" datetime="{$article.create_time|date='Y-m-d h:m:s'}" itemprop="datePublished">{$article.create_time}</time>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ml-auto text-sm yincang">
|
||||
<span class="mx-1">
|
||||
<small>已阅读 {$pv} 次</small>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="border-theme bg-primary"></div>
|
||||
</div>
|
||||
<article class="post-content detail-body" itemprop="articleBody" view-image>
|
||||
{$article.content|raw}
|
||||
</article>
|
||||
{//文章末尾}
|
||||
{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}
|
||||
<div style="margin-top: 25px;">本文链接:<a href="{$Request.domain}{$Request.url}">{$Request.domain}{$Request.url}</a></div>
|
||||
{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>{$sysInfo.state}</p>
|
||||
</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>
|
||||
</section>
|
||||
|
||||
<div class="card-footer text-center mt-4">
|
||||
<a href="javascript:" style="color: #FFF !important;" data-img="/zb_users/cache/theme/rongkeji/qr/cachee3a78f5d7639da99c9226ec504c2fcc6.png" data-title="手机扫一扫继续阅读" data-desc="微信或浏览器均可" class="single-popup shangzan mr-3 text-muted text-xs">手机浏览</a>
|
||||
<a href="javascript:" style="color: #FFF !important;" data-img="/zb_users/theme/rongkeji/image/wxpay.png" data-title="赞赏支持一下站长" data-desc="微信赞赏扫码" class="single-popup shangzan text-muted text-xs">赞赏支持</a>
|
||||
<div class="text-center text-muted text-xs" style="margin-top: 30px;">
|
||||
"作者已被打赏 0 次"
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="post card block d-flex p-4">
|
||||
<span class="d-inline-block text-muted mr-2 fanpian pb-2 mb-2"> # 上一篇: {$previous|raw}</span>
|
||||
<span class="d-inline-block text-muted mr-2 fanpian"># 下一篇: {$next|raw}</span>
|
||||
</div>
|
||||
{notempty name="relationArticle"}
|
||||
<section class="list-related">
|
||||
<div class="content-related card">
|
||||
<div class="card-body">
|
||||
<div class="mb-3">相关文章</div>
|
||||
<div class="list list-dots my-n2">
|
||||
{volist name="relationArticle" id="vo"}
|
||||
<div class="list-item py-2">
|
||||
<a href="{$Request.domain}{$vo.url}" target="_blank" class="list-title fanpian" title="{$vo.title}" rel="bookmark">{$vo.title} </a>
|
||||
</div>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{/notempty}
|
||||
|
||||
<section class="comments">
|
||||
<div class="card">
|
||||
<div class="card-body pt-4">
|
||||
{//评论内容}
|
||||
<div class="mb-3" id="flyReply">
|
||||
文章评论 <small class="font-theme text-muted">({$article.comments_count})</small>
|
||||
<ul class="jieda" id="jieda">
|
||||
{volist name="comments" 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>・<span>{$vo.user.city}</span></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">
|
||||
<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"><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" id="comment-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>
|
||||
<hr width="90%" style="border:1px dotted red;height:1px;margin:5px 0px;"; />
|
||||
<div>{$vo.user.sign|raw}</div>
|
||||
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
<div style="text-align: center" id="pages"></div>
|
||||
</div>
|
||||
{//评论区}
|
||||
{if (config('taoler.config.is_reply') == 1 ) AND ( $article.is_reply == 0 )}
|
||||
<div id="commentszbpmy" style="text-align: center;">
|
||||
<h5>评论已关闭!</h5>
|
||||
</div>
|
||||
{/if}
|
||||
{if (config('taoler.config.is_reply') == 1 ) AND ( $article.is_reply == 1 )}
|
||||
<div class="comment-respond">
|
||||
<form class="comment-form">
|
||||
|
||||
<div class="layui-form">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<a name="comment"></a>
|
||||
<div class="comment-textarea mb-3">
|
||||
<textarea id="L_content" name="content" required lay-verify="required" placeholder="{:lang('please input the content')}" class="layui-textarea fly-editor" style="height: 100px"></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>
|
||||
</form>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<div class="sidebar col-lg-4 d-none d-lg-block">
|
||||
<div class="theiaStickySidebar">
|
||||
{//作者}
|
||||
<dl class="function" id="rongkeji_User">
|
||||
<dt style="display:none;"></dt>
|
||||
<dd class="function_c">
|
||||
<div>
|
||||
<div class="widget-author-cover">
|
||||
<div class="media media-21x9">
|
||||
<div class="media-content" style="background-image:url(/view/common/blog/image/user-bg.jpg)">
|
||||
</div>
|
||||
</div>
|
||||
<div class="widget-author-avatar">
|
||||
<div class="flex-avatar w-80"><img alt="{$article.user.name}" src="{$article.user.user_img}" class="avatar" height="80" width="80">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="widget-author-meta text-center">
|
||||
<div class="p-3">
|
||||
<div class="h6 mb-2">{$article.user.name}</div>
|
||||
<div class="text-xs text-secondary mb-4">本站内容禁止任何人采集</div>
|
||||
<div class="row g-0 text-center">
|
||||
<div class="col"><div class="font-theme h5">{$article.user.article_count}</div><div class="text-xs text-muted">文章</div></div>
|
||||
<div class="col"><div class="font-theme h5">{$article.user.comments_count}</div><div class="text-xs text-muted">评论</div></div>
|
||||
<div class="col"><div class="font-theme h5">{$userTagCount}</div><div class="text-xs text-muted">标签</div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
{//广告}
|
||||
{if showSlider(4)}
|
||||
<dl class="function" id="rongkeji_tuwenad">
|
||||
<dt style="display:none;"></dt>
|
||||
{volist name="ad_art" id="vo"}
|
||||
<dd class="function_c">
|
||||
<div>
|
||||
<a href="{$vo.slid_href}" target="_blank" rel="nofollow"><img src="{$Request.domain}/{$vo.slid_img}" width="350" height="350" alt="图文广告"></a>
|
||||
</div>
|
||||
</dd>
|
||||
{/volist}
|
||||
</dl>
|
||||
{/if}
|
||||
{//热门文章}
|
||||
<dl class="function" id="rongkeji_remenwenzhang">
|
||||
<dt class="function_t">热门文章</dt>
|
||||
<dd class="function_c">
|
||||
<ul>
|
||||
{volist name="artHot" id="vo"}
|
||||
<li style="display: block;">
|
||||
<div class="list-body fanpian">
|
||||
<a href="{$vo.url}" target="_blank">{$vo.title}</a>
|
||||
</div>
|
||||
<div class="list-footer">
|
||||
<div class="text-muted text-xs"><time class="d-inline-block">{$vo.create_time|date='Y-m-d'}</time>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{/volist}
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
{//标签}
|
||||
{if count($hotTag) > 0}
|
||||
<dl class="function" id="rongkeji_retags">
|
||||
<dt class="function_t">热门标签</dt>
|
||||
<dd class="function_c">
|
||||
<ul>
|
||||
{volist name="hotTag" id="vo"}
|
||||
<li><a href="{$vo.url}" rel="tag">{$vo.name}</a></li>
|
||||
{/volist}
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
{/if}
|
||||
{//友情链接}
|
||||
{if count($flinks) > 0}
|
||||
<dl class="function" id="divLinkage">
|
||||
<dt class="function_t">友情链接</dt>
|
||||
<dd class="function_c">
|
||||
<ul>
|
||||
{volist name="flinks" id="vo"}
|
||||
<li class="link-item"><a href="{$vo.slid_href}" target="_blank" title="{$vo.slid_name}">{$vo.slid_name}</a></li>
|
||||
{/volist}
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{//crud管理模块}
|
||||
{include file="/public/crud" /}
|
||||
</main>
|
||||
{include file="public/menu" /}
|
||||
{/block}
|
||||
|
||||
{block name="script"}
|
||||
{:hook('taonyeditor')}
|
||||
<script type='text/javascript' src="{$Request.domain}/view/common/blog/js/theme.js"></script>
|
||||
<script>
|
||||
var collectionFind = "{:url('Collection/find')}",
|
||||
collection = "{:url('collection/')}",
|
||||
articleJieset = "{:url('Article/jieset')}",
|
||||
articleDelete = "{:url('Article/delete')}",
|
||||
commentJiedaZan = "{:url('Comment/jiedaZan')}",
|
||||
commentJiedaCai = "{:url('Comment/jiedaCai')}",
|
||||
commentGetDa = "{:url('Comment/getDa')}",
|
||||
commentUpdateDa = "{:url('Comment/updateDa')}",
|
||||
commentJiedaDelete = "{:url('Comment/jiedaDelete')}",
|
||||
langCollection = "{:lang('collection')}",
|
||||
langCancelCollection = "{:lang('cancel collection')}";
|
||||
|
||||
layui.use(['fly', 'face','colorpicker','plyr', 'laypage'], function(){
|
||||
var $ = layui.jquery
|
||||
,form = layui.form
|
||||
,fly = layui.fly
|
||||
,colorpicker = layui.colorpicker
|
||||
,plyr = layui.plyr
|
||||
,laytpl = layui.laytpl
|
||||
,uid = layui.cache.user.uid
|
||||
,laypage = layui.laypage;
|
||||
var id = "{$article.id}";
|
||||
|
||||
//如果你是采用模版自带的编辑器,你需要开启以下语句来解析。
|
||||
var taonystatus = "{:hook('taonystatus')}";
|
||||
// 编辑器插件启用状态
|
||||
var isShow = taonystatus ? false : true;
|
||||
if(isShow) {
|
||||
$('.detail-body').each(function(){
|
||||
var othis = $(this), html = othis.html();
|
||||
othis.html(fly.content(html));
|
||||
});
|
||||
}
|
||||
|
||||
//加载评论编辑器
|
||||
if(isShow == false) {
|
||||
$("#comment-edit").attr('type','');
|
||||
}
|
||||
|
||||
//tpl模板给发布时间赋值
|
||||
$('div.detail-hits').children('span.post-time').each(function(){
|
||||
var othis = $(this), html = othis.html();
|
||||
var string = laytpl('{{ d.time }}').render({
|
||||
//time: html
|
||||
time: othis.attr('data')
|
||||
});
|
||||
var posttime = layui.util.timeAgo(string, 1);
|
||||
othis.text(posttime);
|
||||
//console.log(othis.attr('data'));
|
||||
});
|
||||
|
||||
//文章点赞
|
||||
$("#article-zan").on('click',function(){
|
||||
//判断登陆
|
||||
if(uid == -1){
|
||||
layer.msg('请登录再点赞', {icon: 6}, function(){location.href = login})
|
||||
return false;
|
||||
}
|
||||
$.post("{:url('article/userZanArticle')}",{article_id:id,type:1},function(data){
|
||||
if(data.code == 0){
|
||||
layer.msg(data.msg,{icon:6,time:2000},function () {
|
||||
location.reload(true);
|
||||
});
|
||||
} else {
|
||||
layer.msg(data.msg,{icon:6,adim:6});
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
//预定义颜色项
|
||||
colorpicker.render({
|
||||
elem: '#color'
|
||||
,color: '#393d49'
|
||||
,predefine: true // 开启预定义颜色
|
||||
,size: 'xs'
|
||||
,done: function(color){
|
||||
//改变标题颜色
|
||||
$('h1').css("color", color);
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:"{:url('Article/titleColor')}",
|
||||
data:{id: id,title_color: color},
|
||||
dataType:'json',
|
||||
success:function(data){
|
||||
if(data.code == 0){
|
||||
layer.msg(data.msg,{icon:6,time:2000
|
||||
});
|
||||
} else {
|
||||
layer.open({content:data.msg,icon:5,adim:6});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
//评论需要登陆
|
||||
form.on('submit(user-comment)',function (data){
|
||||
var index = layer.load(1);
|
||||
var filed = data.field;
|
||||
if (uid == -1) {
|
||||
layer.msg('请先登陆',{icon:5,time:2000},function(){location.href = "{:url('login/index')}"});
|
||||
} else {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "{:url('article/comment')}",
|
||||
data: filed,
|
||||
dataType: "json",
|
||||
success:function (data) {
|
||||
if (data.code == 0) {
|
||||
layer.msg(data.msg,{icon:6,time:2000},function () {
|
||||
location.reload(true);
|
||||
});
|
||||
}else {
|
||||
layer.open({title:'评论失败',content:data.msg,icon:5,anim:6});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
//执行一个laypage实例
|
||||
laypage.render({
|
||||
elem: 'pages' //注意,这里的 test1 是 ID,不用加 # 号
|
||||
,count: "{$article.comments_count}" //数据总数,从服务端得到
|
||||
,limit: 10
|
||||
,curr : {$page}
|
||||
|
||||
//获取起始页
|
||||
,jump: function(obj, first){
|
||||
//首次不执行
|
||||
if(!first){
|
||||
var page = obj.curr;
|
||||
var url = "{:url('article/detail',['id'=>$article.id])}";
|
||||
var id = "{$article.id}";
|
||||
$.post("{:url('article/detail')}",{"id":id,"page":page},function(){
|
||||
window.location.href = url + '?page=' + page + '#flyReply';
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//下载
|
||||
$('#zip-download').click(function (){
|
||||
var id = "{$article.id}";
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url:"{:url('article/download')}",
|
||||
data:{id:id},
|
||||
success:function (data) {
|
||||
location.href = "{:url('article/download',['id'=>$article.id])}";
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//加载播放器
|
||||
plyr.setup();
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
{:hook('markdownhook')}
|
||||
{include file="/public/qr-read" /}
|
||||
|
||||
{volist name="push_js" id="vo"}
|
||||
{$vo.jscode|raw}
|
||||
{/volist}
|
||||
|
||||
{/block}
|
@ -83,7 +83,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{//评论}
|
||||
{//评论内容}
|
||||
<div class="fly-panel detail-box" id="flyReply">
|
||||
<span style="font-size:18px;">评论 {$article.comments_count}</span>
|
||||
<ul class="jieda" id="jieda">
|
||||
|
Loading…
Reference in New Issue
Block a user