diff --git a/app/api/mobile/entities/activity.rb b/app/api/mobile/entities/activity.rb index 4d64a40d8..0c2cf68f2 100644 --- a/app/api/mobile/entities/activity.rb +++ b/app/api/mobile/entities/activity.rb @@ -19,7 +19,7 @@ module Mobile else ac.act unless ac.nil? || ac.act.nil? end - when :reply_num + when :reply_count if ac.act_type == "HomeworkCommon" ac.nil? || ac.act.nil? ? 0 : ac.act.journals_for_messages.count elsif ac.act_type == "News" @@ -29,7 +29,7 @@ module Mobile elsif ac.act_type == "Issue" ac.nil? || ac.act.nil? ? 0 : ac.act.journals.count end - when :activity_praise_num + when :activity_praise_count if ac.act_type == "HomeworkCommon" || ac.act_type == "News" || ac.act_type == "Message" || ac.act_type == "BlogComment" || ac.act_type == "JournalsForMessage" || ac.act_type == "Issue" ac.nil? || ac.act.nil? ? 0 : get_activity_praise_num(ac.act) end @@ -76,9 +76,9 @@ module Mobile end end end - expose :act_type - expose :container_type - expose :author, using: Mobile::Entities::User do |a, opt| + expose :act_type #缺陷/作业/讨论区/留言等类型 + expose :container_type #课程/项目/博客/个人 + expose :author, using: Mobile::Entities::User do |a, opt| #用户信息 if a.is_a? ::UserActivity if a.act_type == "ProjectCreateInfo" get_user(get_project(a.act_id).user_id) @@ -91,12 +91,12 @@ module Mobile end end end - act_expose :homework_common_detail_manual - act_expose :reply_num - act_expose :activity_praise_num - act_expose :user_act - act_expose :course_project_name - act_expose :activity_type_name + act_expose :homework_common_detail_manual #作业相关信息 + act_expose :reply_count #回复数 + act_expose :activity_praise_count #点赞数 + act_expose :user_act #某个动态 + act_expose :course_project_name #课程/项目名字 + act_expose :activity_type_name #课程问答区/项目缺陷等 end end end \ No newline at end of file diff --git a/app/api/mobile/entities/issue.rb b/app/api/mobile/entities/issue.rb index 08edae5e2..7931f5b41 100644 --- a/app/api/mobile/entities/issue.rb +++ b/app/api/mobile/entities/issue.rb @@ -1,9 +1,19 @@ module Mobile module Entities class Issue