no message
parent
ed20719290
commit
b2e84e12bc
|
@ -66,6 +66,9 @@ class NewUi extends Controller
|
|||
}
|
||||
}
|
||||
function articleAction(){
|
||||
$commentModel = new Models\DocComment();
|
||||
$doccoment = $commentModel->DocComments((int)$this->params[0]);
|
||||
|
||||
if(sizeof($this->params) > 0){
|
||||
}
|
||||
$docModel = new Models\Doc();
|
||||
|
@ -107,6 +110,8 @@ class NewUi extends Controller
|
|||
"group_types"=>$groupstype,
|
||||
"title"=>urldecode ($this->params[1]),
|
||||
"doc"=>$doc[0],
|
||||
"comments" => $doccoment,
|
||||
"comment_count" => count($doccoment),
|
||||
]);
|
||||
else{
|
||||
View::renderTemplate("/blog/article.html",[
|
||||
|
@ -120,6 +125,8 @@ class NewUi extends Controller
|
|||
"group_types"=>$groupstype,
|
||||
"title"=>urldecode ($this->params[1]),
|
||||
"doc"=>$doc[0],
|
||||
"comments" => $doccoment,
|
||||
"comment_count" => count($doccoment),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,8 +3,10 @@
|
|||
<head>
|
||||
<title>{{ title }}</title>
|
||||
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
|
||||
<link href="/api/App/Views/blog/css/comment.css" rel="stylesheet" type="text/css">
|
||||
<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
|
||||
<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="/api/App/Views/blog/js/comment.js"></script>
|
||||
</head>
|
||||
|
||||
<body style="background: #eee">
|
||||
|
@ -59,7 +61,7 @@
|
|||
<ul class="nav nav-tabs" style="font-size: 12px;">
|
||||
{% for docid,doc in typedoc.arr %}
|
||||
<li class="active" style="width: 100%; background:#d4ccb0;">
|
||||
<a style="background:#d4ccb0;" href="http://192.168.3.100/api/public/NewUi/article/{{ docid }}/{{ doc.title }}">
|
||||
<a style="background:#d4ccb0;" href="https://www.testingcloud.club/wapi/NewUi/article/{{ docid }}/{{ doc.title }}">
|
||||
{{doc.title}}
|
||||
</a></li>
|
||||
{% endfor %}
|
||||
|
@ -75,6 +77,60 @@
|
|||
{{ doc.content | raw }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="comment-filed">
|
||||
<!--发表评论区begin-->
|
||||
<div>
|
||||
<div class="comment-num">
|
||||
<span>{{comment_count}}条评论</span>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
<textarea class="txt-commit" replyid="0"></textarea>
|
||||
</div>
|
||||
<div class="div-txt-submit">
|
||||
<a class="comment-submit" parent_id="0" style="" href="javascript:void(0);"><span style=''>发表评论</span></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--发表评论区end-->
|
||||
<!--评论列表显示区begin-->
|
||||
<!-- {$commentlist} -->
|
||||
<div class="comment-filed-list" >
|
||||
<div><span>全部评论</span></div>
|
||||
<div class="comment-list" >
|
||||
<!--一级评论列表begin-->
|
||||
<ul class="comment-ul">
|
||||
<volist name="commlist" id="data">
|
||||
{% for comment in comments %}
|
||||
<li comment_id="{{comment.id}}">
|
||||
<div >
|
||||
<div>
|
||||
<img class="head-pic" src="/api/App/Views/blog/res/pic/default.jpg" alt="">
|
||||
</div>
|
||||
<div class="cm">
|
||||
<div class="cm-header">
|
||||
<span>{{comment.author}}</span>
|
||||
<span>{{comment.time}}</span>
|
||||
</div>
|
||||
<div class="cm-content">
|
||||
<p>
|
||||
{{comment.content}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="cm-footer">
|
||||
<a class="comment-reply" comment_id="{$data.id}" href="javascript:void(0);">回复</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</volist>
|
||||
</ul>
|
||||
<!--一级评论列表end-->
|
||||
</div>
|
||||
</div>
|
||||
<!--评论列表显示区end-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
|
Loading…
Reference in New Issue