联系官方销售客服
1835022288
028-61286886
list调用评论数据怎么判断评论如果有回复显示回复数
新闻内容页
<div class="xpinglun" style="height: auto;"> <ul> {list action=comment module=news cid=$id more=1 order=inputtime page=1 pagesize=10 urlrule=$urlrule} <li class="ds-post"> <div class="pllist"> <div class="pltx"> <img src="{dr_avatar($t.uid)}" > </div> <div class="plnr"> <div class="plnrbt">{$t.author}</div> <p>{dr_sns_content($t.content)}</p> <div class="plnrtp"> <span class="plnrtp-time">{dr_fdate($t.inputtime)}</span> <a class="ds-post-reply" target="_blank" href="javascript:void(0);" onclick="dr_reply_show({$t.id}, '{$t.author}')"> <span class="icon-comments-o text-main"></span> 回复 </a> <a target="_blank" href="javascript:void(0);" onclick="dr_zc_comment({$t.id})"> <span class="icon-thumbs-o-up text-main"></span> 支持(<span id="dr_comment_zc_{$t.id}">{$t.support}</span>) </a> <a target="_blank" href="javascript:void(0);" onclick="dr_fd_comment({$t.id})"> <span class="icon-thumbs-o-down text-main"></span> 反对(<span id="dr_comment_fd_{$t.id}">{$t.oppose}</span>) </a> {if $member.adminid} <a target="_blank" href="javascript:void(0);" onclick="dr_delete_comment({$t.id})"> <span class="icon-times text-red"></span> 删除 </a> {/if} <a style="float: right">评分: {if $t.sort1==1} <em class="text-red">★</em> {else if $t.sort1==2} <em class="text-red">★ ★</em> {else if $t.sort1==3} <em class="text-red">★ ★ ★ </em> {else if $t.sort1==4} <em class="text-red">★ ★ ★ ★ </em> {else if $t.sort1==5} <em class="text-red">★ ★ ★ ★ ★</em> {/if} </a> </div> </div> </div> <div id="ds-reset"> <div class="plk" id="dr_reply_{$t.id}" style="display:none;"></div> </div> </li> {if $t.in_reply} <ul class="xxpinglun"> {list action=comment module=news cid=$id reply=$t.id num=1 order=inputtime return=r} <li class="ds-post"> <div class="pllist"> <div class="pltx"> <img src="{dr_avatar($r.uid)}" > </div> <div class="plnr"> <div class="plnrbt">{$r.author}</div> <p>{dr_sns_content($r.content)}</p> </div> <div class="plnrtp"> <span class="plnrtp-time">{dr_fdate($r.inputtime)}</span> {if $member.adminid} <a target="_blank" href="javascript:void(0);" onclick="dr_delete_comment({$r.id})"> <span class="icon-times text-red"></span> 删除 </a> {/if} </div> </div> </li> {/list} </ul> {/if} {/list} </ul> <div class="pingpage"> {$pages} </div> </div>
这样写