comments num
This commit is contained in:
parent
c29d6ebfa8
commit
987adc6b5f
@ -132,7 +132,7 @@ class Article extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
// 热议文章
|
// 热议文章
|
||||||
$artHot = ArticleModel::field('id,title')->withCount('comments')->where('status',1)->whereTime('create_time', 'year')->order('comments_count','desc')->limit(10)->select();
|
$artHot = ArticleModel::field('id,title')->withCount('comments')->where(['status'=>1,'delete_time'=>0])->whereTime('create_time', 'year')->order('comments_count','desc')->limit(10)->select();
|
||||||
//分类右栏广告
|
//分类右栏广告
|
||||||
$ad_cate = Db::name('slider')->where('slid_status',1)->where('delete_time',0)->where('slid_type',5)->whereTime('slid_over','>=',time())->select();
|
$ad_cate = Db::name('slider')->where('slid_status',1)->where('delete_time',0)->where('slid_type',5)->whereTime('slid_over','>=',time())->select();
|
||||||
//通用右栏
|
//通用右栏
|
||||||
@ -178,7 +178,7 @@ class Article extends BaseController
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// 热议文章
|
// 热议文章
|
||||||
$artHot = ArticleModel::field('id,title')->withCount('comments')->where('status',1)->whereTime('create_time', 'year')->order('comments_count','desc')->limit(10)->select();
|
$artHot = ArticleModel::field('id,title')->withCount('comments')->where(['status'=>1,'delete_time'=>0])->whereTime('create_time', 'year')->order('comments_count','desc')->limit(10)->select();
|
||||||
//文章广告
|
//文章广告
|
||||||
$ad_article = Db::name('slider')->where('slid_status',1)->where('delete_time',0)->where('slid_type',4)->whereTime('slid_over','>=',time())->select();
|
$ad_article = Db::name('slider')->where('slid_status',1)->where('delete_time',0)->where('slid_type',4)->whereTime('slid_over','>=',time())->select();
|
||||||
//通用右栏
|
//通用右栏
|
||||||
|
@ -164,7 +164,7 @@
|
|||||||
{volist name="artHot" id="vo"}
|
{volist name="artHot" id="vo"}
|
||||||
<dd>
|
<dd>
|
||||||
<a href="{:url('article/detail',['id' => $vo.id])}">{$vo.title}</a>
|
<a href="{:url('article/detail',['id' => $vo.id])}">{$vo.title}</a>
|
||||||
<span><i class="iconfont icon-pinglun1"></i> {$comments->count()}</span>
|
<span><i class="iconfont icon-pinglun1"></i> {$vo.comments_count}</span>
|
||||||
</dd>
|
</dd>
|
||||||
{/volist}
|
{/volist}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user