删除二次评论

deploy
DESKTOP-4RNDQIC\29019 2020-04-13 18:32:38 +08:00
parent 154842d92d
commit b8a22a8816
4 changed files with 9 additions and 61 deletions

View File

@ -54,7 +54,9 @@ class Blog extends Controller
'type' => $this->querys['type'],
'debug' => true,
'article'=>true,
"typedocs" => $typedocs
"typedocs" => $typedocs,
"comments" => $doccoment,
"comment_count" => count($doccoment),
]);
else
View::renderTemplate("/blog/basic.html",[
@ -62,7 +64,9 @@ class Blog extends Controller
'article'=>true,
'content'=>$content,
'type' => $this->querys['type'],
"typedocs" => $typedocs
"typedocs" => $typedocs,
"comments" => $doccoment,
"comment_count" => count($doccoment),
]);
}else{
View::renderTemplate("/blog/basic.html",['title'=>'test','index'=>false]);

View File

@ -23,6 +23,6 @@ class DocComment extends Controller
public function getDocCommentAction(){
$comment = new Models\DocComment();
var_dump($this->input);
var_dump($comment->DocComments(1));
var_dump($comment->DocComments(8));
}
}

View File

@ -227,7 +227,7 @@ ul li a{
<!--发表评论区begin-->
<div>
<div class="comment-num">
<span>1条评论</span>
<span>{{comment_count}}条评论</span>
</div>
<div>
<div>
@ -250,7 +250,7 @@ ul li a{
<li comment_id="{$data.id}">
<div >
<div>
<img class="head-pic" src="{$data.head_pic}" alt="">
<img class="head-pic" src="/api/App/Views/blog/res/pic/default.jpg" alt="">
</div>
<div class="cm">
<div class="cm-header">
@ -268,62 +268,6 @@ ul li a{
</div>
</div>
<!--二级评论begin-->
<ul class="children">
<volist name="data.children" id="child" >
<li comment_id="{$child.id}">
<div >
<div>
<img class="head-pic" src="{$child.head_pic}" alt="">
</div>
<div class="children-cm">
<div class="cm-header">
<span>{$child.nickname}</span>
<span>{$child.create_time}</span>
</div>
<div class="cm-content">
<p>
{$child.content}
</p>
</div>
<div class="cm-footer">
<a class="comment-reply" replyswitch="off" comment_id="{$child.id}" href="javascript:void(0);">回复</a>
</div>
</div>
</div>
<!--三级评论begin-->
<ul class="children">
<volist name="child.children" id="grandson" >
<li comment_id="{$grandson.id}">
<div >
<div>
<img class="head-pic" src="{$grandson.head_pic}" alt="">
</div>
<div class="children-cm">
<div class="cm-header">
<span>{$grandson.nickname}</span>
<span>{$grandson.create_time}</span>
</div>
<div class="cm-content">
<p>
{$grandson.content}
</p>
</div>
<div class="cm-footer">
<!-- <a class="comment-reply" comment_id="1" href="javascript:void(0);">回复</a> -->
</div>
</div>
</div>
</li>
</volist>
</ul>
<!--三级评论end-->
</li>
</volist>
</ul>
<!--二级评论end-->
</li>
</volist>

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB