From 942db5018d73383818ae07edf407ea4559923539 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 1 Aug 2019 15:25:43 +0800 Subject: [PATCH] =?UTF-8?q?mp3=E3=80=81mp4=E7=B1=BB=E5=AE=9E=E8=AE=AD?= =?UTF-8?q?=E7=9A=84=E5=88=B6=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/games/picture_display.json.jbuilder | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/app/views/games/picture_display.json.jbuilder b/app/views/games/picture_display.json.jbuilder index 770f0d71b..2bc88fdf4 100644 --- a/app/views/games/picture_display.json.jbuilder +++ b/app/views/games/picture_display.json.jbuilder @@ -25,28 +25,28 @@ elsif @type == "txt" elsif @type =="qrcode" json.qrcode_str @qrcode_str elsif @type == "mp3" || @type == "mp4" - # if @type == "mp4" - # json.orignal_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378171/123.mp4"}] - # json.user_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378172/456.mp4"}] - # json.answer_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378173/789.mp4"}] - # else - # json.orignal_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378174/58099.mp3"}] - # json.user_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378175/654058514.mp3"}] - # json.answer_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378175/654058514.mp3"}] - # end - json.orignal_file do - json.array! @orignal_picture do |file| - json.file_url attachment_show_users_path(:file_name => file, :path => @original_path) - end - end - json.user_file do - json.array! @user_picture do |file| - json.file_url attachment_show_users_path(:file_name => file, :path => @user_path, :time => Time.now.to_i) - end - end - json.answer_file do - json.array! @answer_picture do |file| - json.file_url attachment_show_users_path(:file_name => file, :path => @answer_path) - end + if @type == "mp4" + json.orignal_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378171/123.mp4"}] + json.user_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378172/456.mp4"}] + json.answer_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378173/789.mp4"}] + else + json.orignal_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378174/58099.mp3"}] + json.user_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378175/654058514.mp3"}] + json.answer_file [{"file_url": "http://120.27.231.56:48080/attachments/download/378175/654058514.mp3"}] end + # json.orignal_file do + # json.array! @orignal_picture do |file| + # json.file_url attachment_show_users_path(:file_name => file, :path => @original_path) + # end + # end + # json.user_file do + # json.array! @user_picture do |file| + # json.file_url attachment_show_users_path(:file_name => file, :path => @user_path, :time => Time.now.to_i) + # end + # end + # json.answer_file do + # json.array! @answer_picture do |file| + # json.file_url attachment_show_users_path(:file_name => file, :path => @answer_path) + # end + # end end \ No newline at end of file