添加帖子裂变浏览量,修复搜索多应用链接
This commit is contained in:
parent
d537d05394
commit
0f912e8f52
@ -64,7 +64,7 @@ class Article extends BaseController
|
||||
switch ($type) {
|
||||
//查询文章,15个分1页
|
||||
case 'jie':
|
||||
$artList = ArticleModel::field('id,title,title_color,cate_id,user_id,create_time,is_top,is_hot,jie')->with([
|
||||
$artList = ArticleModel::field('id,title,title_color,cate_id,user_id,create_time,is_top,is_hot,jie,pv')->with([
|
||||
'cate' => function($query){
|
||||
$query->where('delete_time',0)->field('id,catename');
|
||||
},
|
||||
@ -80,7 +80,7 @@ class Article extends BaseController
|
||||
break;
|
||||
|
||||
case 'hot':
|
||||
$artList = ArticleModel::field('id,title,title_color,cate_id,user_id,create_time,is_top,is_hot,jie')->with([
|
||||
$artList = ArticleModel::field('id,title,title_color,cate_id,user_id,create_time,is_top,is_hot,jie,pv')->with([
|
||||
'cate' => function($query){
|
||||
$query->where('delete_time',0)->field('id,catename');
|
||||
},
|
||||
@ -96,7 +96,7 @@ class Article extends BaseController
|
||||
break;
|
||||
|
||||
case 'top':
|
||||
$artList = ArticleModel::field('id,title,title_color,cate_id,user_id,create_time,is_top,is_hot,jie')->with([
|
||||
$artList = ArticleModel::field('id,title,title_color,cate_id,user_id,create_time,is_top,is_hot,jie,pv')->with([
|
||||
'cate' => function($query){
|
||||
$query->where('delete_time',0)->field('id,catename');
|
||||
},
|
||||
@ -112,7 +112,7 @@ class Article extends BaseController
|
||||
break;
|
||||
|
||||
default:
|
||||
$artList = ArticleModel::field('id,title,title_color,cate_id,user_id,create_time,is_top,is_hot,jie')->with([
|
||||
$artList = ArticleModel::field('id,title,title_color,cate_id,user_id,create_time,is_top,is_hot,jie,pv')->with([
|
||||
'cate' => function($query){
|
||||
$query->where('delete_time',0)->field('id,catename');
|
||||
},
|
||||
|
@ -28,4 +28,6 @@ Route::rule('postcode','login/postcode');
|
||||
Route::rule('respass','login/respass');
|
||||
Route::rule('reg','Login/reg')
|
||||
->middleware(\app\middleware\CheckRegister::class);
|
||||
|
||||
Route::rule('search/[:keywords]', 'index/search'); // 搜索
|
||||
|
@ -705,7 +705,7 @@ layui.define(['layer', 'laytpl', 'form', 'element', 'upload', 'util'], function(
|
||||
,shadeClose: true
|
||||
,maxWidth: 10000
|
||||
,skin: 'fly-layer-search'
|
||||
,content: ['<form action="/index/search">'
|
||||
,content: ['<form action='+searchUrl+'>'
|
||||
,'<input autocomplete="off" placeholder="搜索内容,回车跳转" type="text" name="keywords">'
|
||||
,'</form>'].join('')
|
||||
,success: function(layero){
|
||||
|
@ -34,7 +34,7 @@
|
||||
</a>
|
||||
<span>{$art.create_time|date='Y-m-d'}</span>
|
||||
|
||||
<!--span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i class="iconfont icon-kiss"></i> 60</span-->
|
||||
<span class="layui-hide-xs" title="人气"><i class="iconfont" title="人气"></i> {$art.pv}</span>
|
||||
{if ($art.jie == 1)}<span class="layui-badge fly-badge-accept layui-hide-xs">已结</span>{/if}
|
||||
<span class="fly-list-nums">
|
||||
<i class="iconfont icon-pinglun1" title="回答"></i> {$art.comments_count}
|
||||
|
@ -237,6 +237,7 @@
|
||||
}).extend({
|
||||
fly: 'index'
|
||||
}).use('fly');
|
||||
var replyurl = "{:url('index/reply')}";
|
||||
var replyUrl = "{:url('index/reply')}",
|
||||
searchUrl = "{:url('index/search')}";
|
||||
</script>
|
||||
{/block}
|
Loading…
Reference in New Issue
Block a user