From ec295991717ff056558d9d655b2b068d40e8dad9 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 12 Feb 2020 16:13:32 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=9A=84?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=88=97=E8=A1=A8=E7=BB=9F=E4=B8=80=E5=8F=96?= =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E4=BA=BA=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/weapps/subjects/index.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/weapps/subjects/index.json.jbuilder b/app/views/weapps/subjects/index.json.jbuilder index 8f61f150c..fd12827b0 100644 --- a/app/views/weapps/subjects/index.json.jbuilder +++ b/app/views/weapps/subjects/index.json.jbuilder @@ -1,6 +1,6 @@ json.subjects @subjects do |subject| json.(subject, :id, :excellent, :name, :stages_count, :shixuns_count) - json.myshixuns_count subject.excellent ? subject.member_count : subject.myshixuns_count + json.myshixuns_count subject.member_count json.challenges_count subject.subject_challenge_count json.image_url url_to_avatar(subject) json.allow_visit subject.status > 1 || User.current.manager_of_subject?(subject) || User.current.admin? From da0591105c4d7497726d3f1040f34cf6266cfa01 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 12 Feb 2020 16:39:25 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=9A=84?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=88=97=E8=A1=A8=E7=BB=9F=E4=B8=80=E5=8F=96?= =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E4=BA=BA=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/weapps/subjects/index.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/weapps/subjects/index.json.jbuilder b/app/views/weapps/subjects/index.json.jbuilder index fd12827b0..412f87e77 100644 --- a/app/views/weapps/subjects/index.json.jbuilder +++ b/app/views/weapps/subjects/index.json.jbuilder @@ -1,6 +1,6 @@ json.subjects @subjects do |subject| json.(subject, :id, :excellent, :name, :stages_count, :shixuns_count) - json.myshixuns_count subject.member_count + json.myshixuns_count subject.shixuns_count json.challenges_count subject.subject_challenge_count json.image_url url_to_avatar(subject) json.allow_visit subject.status > 1 || User.current.manager_of_subject?(subject) || User.current.admin? From 19e9fdfc692d129ead601974a88d4280916d26ef Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 12 Feb 2020 16:47:00 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=9A=84?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E5=88=97=E8=A1=A8=E7=BB=9F=E4=B8=80=E5=8F=96?= =?UTF-8?q?=E5=AD=A6=E4=B9=A0=E4=BA=BA=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/weapps/subjects/index.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/weapps/subjects/index.json.jbuilder b/app/views/weapps/subjects/index.json.jbuilder index 412f87e77..7e97f4562 100644 --- a/app/views/weapps/subjects/index.json.jbuilder +++ b/app/views/weapps/subjects/index.json.jbuilder @@ -1,6 +1,6 @@ json.subjects @subjects do |subject| json.(subject, :id, :excellent, :name, :stages_count, :shixuns_count) - json.myshixuns_count subject.shixuns_count + json.myshixuns_count subject.myshixuns_count json.challenges_count subject.subject_challenge_count json.image_url url_to_avatar(subject) json.allow_visit subject.status > 1 || User.current.manager_of_subject?(subject) || User.current.admin? From f9fc7f3eef22a6bba8067bb5c10e127c1c534eb6 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Wed, 12 Feb 2020 16:49:27 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=9A=84?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E5=8F=96=E5=AE=9E=E8=AE=AD=E4=BA=BA?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/subject.rb | 4 ++++ app/views/weapps/subjects/show.json.jbuilder | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/subject.rb b/app/models/subject.rb index fc43cfb11..99ba4b72b 100644 --- a/app/models/subject.rb +++ b/app/models/subject.rb @@ -65,6 +65,10 @@ class Subject < ApplicationRecord excellent ? CourseMember.where(role: 4, course_id: courses.pluck(:id)).pluck(:user_id).length : shixuns.pluck(:myshixuns_count).sum end + def myshixuns_count + shixuns.pluck(:myshixuns_count).sum + end + def all_score subject_shixun_score + subject_shixun_choose_score end diff --git a/app/views/weapps/subjects/show.json.jbuilder b/app/views/weapps/subjects/show.json.jbuilder index 29a30a89a..476e3e797 100644 --- a/app/views/weapps/subjects/show.json.jbuilder +++ b/app/views/weapps/subjects/show.json.jbuilder @@ -3,7 +3,7 @@ json.subject do json.description @subject.description json.shixuns_count @subject.shixuns_count json.challenges_count @subject.subject_challenge_count - json.member_count @subject.member_count + json.member_count @subject.myshixuns_count json.subject_score @subject.all_score json.learning_notes @subject.learning_notes end From 3aeca621cbbd4bea1c41abd35d9841df69532787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Wed, 12 Feb 2020 23:56:40 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/paths/statics/index.js | 2 +- .../react/src/modules/paths/statics/index.scss | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/paths/statics/index.js b/public/react/src/modules/paths/statics/index.js index 46689311d..b10809f99 100644 --- a/public/react/src/modules/paths/statics/index.js +++ b/public/react/src/modules/paths/statics/index.js @@ -247,7 +247,7 @@ const App = (props) => {
学习统计 - Android综合实训之物联网移动应用 +