issue回复的修改
This commit is contained in:
parent
bc5e455f0f
commit
d47f887fd1
|
@ -36,10 +36,8 @@
|
|||
<div class="cl"></div>
|
||||
</div>
|
||||
<div class="post-interactive border-bottom">
|
||||
<div class="post-interactive-column c-grey2">回复 (<!=issues.journals_count!>)</div>
|
||||
<div class="post-interactive-column c-grey2">赞 (<!=issues.issue_praise_count!>)</div>
|
||||
<div class="post-interactive-column c-grey2">回复 <span class="reply-num">(<!=issues.journals_count!>)</span></div>
|
||||
<div class="post-interactive-column c-grey2"><span class="paise-text">赞</span> <span class="praise-num">(<!=issues.issue_praise_count!>)</span></div>
|
||||
<div class="post-interactive-reply c-grey2">回复 <span class="reply-num">(<!=issues.journals_count!>)</span></div>
|
||||
<div class="post-interactive-praise c-grey2"><span class="paise-text">赞</span> <span class="praise-num">(<!=issues.issue_praise_count!>)</span></div>
|
||||
</div>
|
||||
<div id="all_issue_reply">
|
||||
<! for(var j = (issues.issue_journals.length -1); j >= 0; --j){ !>
|
||||
|
@ -72,11 +70,11 @@
|
|||
<script id="t:issue-detail-reply" type="text/html">
|
||||
<div class="post-reply-wrap border-bottom">
|
||||
<div class="post-reply-row">
|
||||
<div class="post-reply-avatar fl"><img src="<!=reply.user.img_url!>" width="45" height="45" class="border-radius" /></div>
|
||||
<div class="post-reply-avatar fl"><img src="<!=issue_reply.user.img_url!>" width="45" height="45" class="border-radius" /></div>
|
||||
<div class="ml55">
|
||||
<div class="post-reply-user hidden"><!=reply.user.realname!></div>
|
||||
<div class="post-reply-content c-grey2 mb10"><!:=reply.notes!></div>
|
||||
<div class="post-reply-date fl"><!=reply.created_on!></div>
|
||||
<div class="post-reply-user hidden"><!=issue_reply.user.realname!></div>
|
||||
<div class="post-reply-content c-grey2 mb10"><!:=issue_reply.notes!></div>
|
||||
<div class="post-reply-date fl"><!=issue_reply.created_on!></div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
|
|
|
@ -80,7 +80,6 @@ $(document).ready(function(){
|
|||
url: apiUrl + 'new_comment/' + homeworkID, //提交的页面,方法名
|
||||
data: userInfo, //参数,如果没有,可以为null
|
||||
success: function (data) { //如果执行成功,那么执行此方法
|
||||
alert(data.result); //用data.d来获取后台传过来的json语句,或者是单纯的语句
|
||||
setReplyTemplate(data.data);
|
||||
},
|
||||
error: function (err) { //如果执行不成功,那么执行此方法
|
||||
|
|
|
@ -15,7 +15,7 @@ $(document).ready(function(){
|
|||
|
||||
var setReplyTemplate = function(data){
|
||||
console.log(data);
|
||||
var html=bt('t:issue-detail-reply',{reply: data});
|
||||
var html=bt('t:issue-detail-reply',{issue_reply: data});
|
||||
$('#all_issue_reply').prepend(html);
|
||||
};
|
||||
|
||||
|
@ -49,10 +49,10 @@ $(document).ready(function(){
|
|||
|
||||
};
|
||||
|
||||
var homeworkUrl = window.location.search;
|
||||
var homeworkID = homeworkUrl.split("=")[1];
|
||||
var IssueUrl = window.location.search;
|
||||
var IssueID = IssueUrl.split("=")[1];
|
||||
|
||||
loadDataFromServer(homeworkID);
|
||||
loadDataFromServer(IssueID);
|
||||
|
||||
//点击回复按钮,插入回复内容
|
||||
var IssueReplyInsert = function(){
|
||||
|
@ -74,17 +74,16 @@ $(document).ready(function(){
|
|||
|
||||
//获取并传送回复用户数据
|
||||
var userInfo = {
|
||||
"Type" : "Issue",
|
||||
"Content" : postInput
|
||||
"type" : "Issue",
|
||||
"content" : postInput
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
type: "POST", //提交方式
|
||||
dataType: "json", //类型
|
||||
url: apiUrl + 'new_comment/' + homeworkID, //提交的页面,方法名
|
||||
url: apiUrl + 'new_comment/' + IssueID, //提交的页面,方法名
|
||||
data: userInfo, //参数,如果没有,可以为null
|
||||
success: function (data) { //如果执行成功,那么执行此方法
|
||||
alert(data.result); //用data.d来获取后台传过来的json语句,或者是单纯的语句
|
||||
setReplyTemplate(data.data);
|
||||
},
|
||||
error: function (err) { //如果执行不成功,那么执行此方法
|
||||
|
|
Loading…
Reference in New Issue