@ -454,7 +454,7 @@ class GamesController < ApplicationController
begin
@content = git_fle_content(@myshixun.repo_path, path) || ""
rescue
if params[:retry].present?
if params[:retry].to_i == 1
# 检测TPM对应的路径代码是否正常
@ -77,14 +77,17 @@ class Challenge < ApplicationRecord
def user_tpi_status user_id
# todo: 以前没加索引导致相同关卡,同一用户有多个games
# 允许跳关则直接开启
return 1 if shixun.task_pass
game = games.where(user_id: user_id).take
if game.blank?
self.position == 1 ? 1 : 0
elsif game.status == 2
2
else
1
if shixun.task_pass
0
end