diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e6f2e1720..099d45406 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -258,7 +258,7 @@ module ApplicationHelper end def download_url attachment - attachment_path(attachment).gsub("/api","") + attachment_path(attachment) end # 耗时:天、小时、分、秒 diff --git a/app/views/games/picture_display.json.jbuilder b/app/views/games/picture_display.json.jbuilder index 770f0d71b..eb2309f9b 100644 --- a/app/views/games/picture_display.json.jbuilder +++ b/app/views/games/picture_display.json.jbuilder @@ -21,7 +21,7 @@ if @type == "image" elsif @type == "html" json.iframe_src File.read("#{@user_path}/#{@user_picture[0]}")&.html_safe elsif @type == "txt" - json.contents @contents.html_safe + json.contents @contents.to_s elsif @type =="qrcode" json.qrcode_str @qrcode_str elsif @type == "mp3" || @type == "mp4"