修正评论列表显示

This commit is contained in:
liyukun 2021-12-13 00:43:25 +08:00
parent 8f28bb8b58
commit 12d64668c6
2 changed files with 3 additions and 3 deletions

View File

@ -662,7 +662,7 @@ function tpl_get_comment_list($id, $type, $pageSize = 10, $orderBy)
switch ($type) { switch ($type) {
case 'top': case 'top':
//根据自定义条件获取文章where语句 //根据自定义条件获取文章where语句
$commentModel = $commentModel->where('document_id', $id); $commentModel = $commentModel->where('document_id', $id)->where('pid', 0);
break; break;
case 'son': case 'son':
//获取栏目下文章 //获取栏目下文章

View File

@ -208,7 +208,7 @@
</div> </div>
<ol class="commentlist"> <ol class="commentlist">
{ape:comment typeId="$apeField['id']" void='field'} {ape:comment type="top" typeId="$apeField['id']" void='field'}
<li class="comment"> <li class="comment">
<div class="comment-item" id="comment-{$field['id']}"> <div class="comment-item" id="comment-{$field['id']}">
<div class="comment-media"> <div class="comment-media">
@ -229,7 +229,7 @@
</span> </span>
</div> </div>
</div> </div>
{ape:comment type="top" typeId="$field['id']" void="vo"} {ape:comment type="son" typeId="$field['id']" void="vo"}
<ol class="children"> <ol class="children">
<li class="comment"> <li class="comment">
<div class="comment-item" id="comment-{$vo.id}"> <div class="comment-item" id="comment-{$vo.id}">