From 774013abd3fe0d49eb2f85fac6b5375476428ffb Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 20 Mar 2020 20:45:12 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=85=B3=E5=8D=A1=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/challenges_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/controllers/challenges_controller.rb b/app/controllers/challenges_controller.rb index 4024a2629..527ba4f05 100644 --- a/app/controllers/challenges_controller.rb +++ b/app/controllers/challenges_controller.rb @@ -166,6 +166,10 @@ class ChallengesController < ApplicationController @shixun_modify = (@challenges.select{|c| c.status.present? }.size == @challenges.size) + logger.info("########shixun_modify:#{@shixun_modify}") + logger.info("########challenges.size:#{@challenges.size}") + logger.info("########challenge_inspect:#{@challenges.inspect}") + #@challenges = @shixun.challenges.fields_for_list @editable = @shixun.status == 0 # before_action:有判断权限,如果没发布,则肯定是管理人员 @user = current_user From ab2f7838011a6e1ab55f283eedfbc8ae20027c54 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 20 Mar 2020 21:04:35 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E5=85=B3=E5=8D=A1?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/challenges_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/challenges_controller.rb b/app/controllers/challenges_controller.rb index 527ba4f05..4e043e799 100644 --- a/app/controllers/challenges_controller.rb +++ b/app/controllers/challenges_controller.rb @@ -164,7 +164,7 @@ class ChallengesController < ApplicationController @challenges = @shixun.challenges.joins(join_sql).select(base_columns).uniq - @shixun_modify = (@challenges.select{|c| c.status.present? }.size == @challenges.size) + @shixun_modify = (@challenges.select{|c| !c.status.nil? }.size == @challenges.size) logger.info("########shixun_modify:#{@shixun_modify}") logger.info("########challenges.size:#{@challenges.size}") From c21106715a8ff5026c54ec1b2a04986a94018fbe Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 20 Mar 2020 21:06:47 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=85=B3=E5=8D=A1=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E5=AE=9E=E8=AE=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/challenges_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/challenges_controller.rb b/app/controllers/challenges_controller.rb index 4e043e799..3f020a424 100644 --- a/app/controllers/challenges_controller.rb +++ b/app/controllers/challenges_controller.rb @@ -164,7 +164,7 @@ class ChallengesController < ApplicationController @challenges = @shixun.challenges.joins(join_sql).select(base_columns).uniq - @shixun_modify = (@challenges.select{|c| !c.status.nil? }.size == @challenges.size) + @shixun_modify = (@challenges.select{|c| !c.status.nil? }.size != @challenges.size) logger.info("########shixun_modify:#{@shixun_modify}") logger.info("########challenges.size:#{@challenges.size}") From ae19de859091d5b6ed09815c4fdebb630ef9a9d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 20 Mar 2020 21:19:11 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/user/usersInfo/InfosShixun.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/user/usersInfo/InfosShixun.js b/public/react/src/modules/user/usersInfo/InfosShixun.js index 2f4127dc8..89fb8814c 100644 --- a/public/react/src/modules/user/usersInfo/InfosShixun.js +++ b/public/react/src/modules/user/usersInfo/InfosShixun.js @@ -243,7 +243,7 @@ class InfosShixun extends Component{
  • this.changeCategory("collect")} href="javascript:void(0)" - className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}学习的
  • + className={is_current ? "font-16 w66" : "font-16 w80"}>{is_current ? "我" : "TA"}收藏的