From baa38da183b485bcfbfe335af788aafd12b7dd02 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 24 Jul 2019 13:57:39 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=B2=A1=E4=BB=A3=E7=A0=81=E7=9A=84?= =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E8=AF=84=E6=B5=8B=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index cf7ac6d2e..2ab0c6649 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -319,6 +319,7 @@ class ApplicationController < ActionController::Base # 通关后,把最后一次成功的代码存到数据库 # type 0 创始内容, 1 最新内容 def game_passed_code(path, myshixun, game_id) + return if path.blank? file_content = git_fle_content myshixun.repo_path, path unless file_content.present? raise("获取文件代码异常") From b0171aef5dba65d5319e2535af0897168a51899e Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 24 Jul 2019 14:01:28 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E9=9A=90=E8=97=8F=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E7=9A=84=E5=AE=9E=E8=AE=AD=E3=80=82=E8=AF=84?= =?UTF-8?q?=E6=B5=8B=E9=80=9A=E8=BF=87=E4=B8=8D=E4=BF=9D=E5=AD=98=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 2ab0c6649..5eca6ccf9 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -319,7 +319,8 @@ class ApplicationController < ActionController::Base # 通关后,把最后一次成功的代码存到数据库 # type 0 创始内容, 1 最新内容 def game_passed_code(path, myshixun, game_id) - return if path.blank? + # 如果代码窗口是隐藏的,则不用保存代码 + return if myshixun.shixun.hide_code file_content = git_fle_content myshixun.repo_path, path unless file_content.present? raise("获取文件代码异常") From 21b8b3de95ee3c9771e2947e48ad5fabdb50cb1e Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 24 Jul 2019 14:04:13 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=AF=84=E6=B5=8B=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index cf7ac6d2e..9fd7dc0b5 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -319,6 +319,7 @@ class ApplicationController < ActionController::Base # 通关后,把最后一次成功的代码存到数据库 # type 0 创始内容, 1 最新内容 def game_passed_code(path, myshixun, game_id) + return if myshixun.shixun.hide_code file_content = git_fle_content myshixun.repo_path, path unless file_content.present? raise("获取文件代码异常")