查看效果问题

dev_aliyun_beta
daiao 5 years ago
parent 392f3f9e19
commit 5ca5f67d56

@ -440,7 +440,7 @@ class SubjectsController < ApplicationController
# 用户进展和获取的标签
def user_subject_progress challenge_ids
pass_games = Game.select(:id, :cost_time, :challenge_id).where(status: 2, user_id: current_user.id, challenge_id: challenge_ids) if current_user.logged?
pass_games = Challenge.left_joins(:games).where(challenges: {id: challenge_ids},games: {status: 2, user_id: current_user.id}) if current_user.logged?
@all_score = Challenge.where(id: challenge_ids).sum(:score)
# 如果没有通关的,没必要再继续统计了

@ -19,7 +19,7 @@ if @type == "image"
end
elsif @type == "html"
json.iframe_src File.read("#{@user_path}/#{@user_picture[0]}")&.html_safe
json.iframe_src File.read("#{@user_path}/#{@user_picture[0]}")&.html_safe if @user_picture[0].present?
elsif @type == "txt"
json.contents @contents.to_s
elsif @type =="qrcode"

Loading…
Cancel
Save