|
|
|
@ -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) { //如果执行不成功,那么执行此方法
|
|
|
|
|