diff --git a/app/api/mobile/entities/activity.rb b/app/api/mobile/entities/activity.rb index d58057b62..82d021248 100644 --- a/app/api/mobile/entities/activity.rb +++ b/app/api/mobile/entities/activity.rb @@ -27,7 +27,7 @@ module Mobile elsif ac.act_type == "Message" || ac.act_type == "BlogComment" || ac.act_type == "JournalsForMessage" ac.nil? || ac.act.nil? ? 0 : ac.act.children.count elsif ac.act_type == "Issue" - ac.nil? || ac.act.nil? ? 0 : ac.act.journals.count + ac.nil? || ac.act.nil? ? 0 : ac.act.journals.where("notes != null").count end when :subject if ac.act_type == "HomeworkCommon" diff --git a/app/api/mobile/entities/issue.rb b/app/api/mobile/entities/issue.rb index de60adddf..777bb1ce8 100644 --- a/app/api/mobile/entities/issue.rb +++ b/app/api/mobile/entities/issue.rb @@ -23,7 +23,7 @@ module Mobile when :issue_status IssueStatus.find(issue.status_id).name when :journals_count - issue.journals.count + issue.journals.where("notes != null").count when :project_name issue.project.name end diff --git a/public/assets/wechat/activities.html b/public/assets/wechat/activities.html index 972c6113e..ffa7f2658 100644 --- a/public/assets/wechat/activities.html +++ b/public/assets/wechat/activities.html @@ -66,7 +66,7 @@
@@ -88,7 +88,7 @@ @@ -148,7 +148,7 @@ @@ -182,7 +182,7 @@ @@ -205,7 +205,7 @@ diff --git a/public/javascripts/wechat/homework_detail.js b/public/javascripts/wechat/homework_detail.js index 094a1d432..b22cb3521 100644 --- a/public/javascripts/wechat/homework_detail.js +++ b/public/javascripts/wechat/homework_detail.js @@ -23,9 +23,9 @@ $(document).ready(function(){ $('.post-reply-submit').click(function(){ replyInsert(); }); - $('post-interactive-praise').click(function(){ + /*$('post-interactive-praise').click(function(){ praiseClick(); - }); + });*/ }; var loadDataFromServer = function(id){ @@ -92,11 +92,11 @@ $(document).ready(function(){ }; //点赞效果 - var praiseClick = function(){ + /*var praiseClick = function(){ var praiseNum = $(".post-interactive-praise").text().match(/\d+/g); praiseNum++; $(".praise-num").text("(" + praiseNum + ")"); - }; + };*/ }); \ No newline at end of file diff --git a/public/javascripts/wechat/issue_detail.js b/public/javascripts/wechat/issue_detail.js index fe2f4531f..dcd5ae723 100644 --- a/public/javascripts/wechat/issue_detail.js +++ b/public/javascripts/wechat/issue_detail.js @@ -20,9 +20,9 @@ $(document).ready(function(){ $('.post-reply-submit').click(function(){ replyInsert(); }); - $('post-interactive-praise').click(function(){ + /*$('post-interactive-praise').click(function(){ praiseClick(); - }); + });*/ }; var loadDataFromServer = function(id){ @@ -67,14 +67,14 @@ $(document).ready(function(){ //获取并传送回复用户数据 var userInfo = { - "replyType" : "homework_assignment", - "replyContent" : postInput + "Type" : "Issue", + "Content" : postInput }; $.ajax({ type: "POST", //提交方式 dataType: "json", //类型 - url: "前台地址/后台方法", //提交的页面,方法名 + url: apiUrl + 'new_comment/' + homeworkID, //提交的页面,方法名 data: userInfo, //参数,如果没有,可以为null success: function (data) { //如果执行成功,那么执行此方法 alert(data.result); //用data.d来获取后台传过来的json语句,或者是单纯的语句 @@ -85,14 +85,14 @@ $(document).ready(function(){ }); } - } + }; //点赞效果 - var praiseClick = function(){ + /*var praiseClick = function(){ var praiseNum = $(".post-interactive-praise").text().match(/\d+/g); praiseNum++; $(".praise-num").text("(" + praiseNum + ")"); - } + }*/ }); \ No newline at end of file