From 6f255492deb02d9bc2df7618845628b86ea19113 Mon Sep 17 00:00:00 2001 From: anke1460 Date: Wed, 4 Mar 2020 10:23:32 +0800 Subject: [PATCH 1/4] =?UTF-8?q?fix=20=E7=A7=BB=E5=8A=A8=E4=BA=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/ecloud_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/ecloud_controller.rb b/app/controllers/ecloud_controller.rb index f091356eb..c3421215d 100644 --- a/app/controllers/ecloud_controller.rb +++ b/app/controllers/ecloud_controller.rb @@ -262,7 +262,7 @@ class EcloudController < ApplicationController u.login = "ecoder_#{user_info['mobile']}" u.type ='User' u.status = User::STATUS_ACTIVE - u.nickname = user_info[:username] + u.nickname = user_info['username'] u.lastname = user_info['username'] end From 03163490c5bde197b4d753203ed6db7b48aad571 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 4 Mar 2020 10:45:31 +0800 Subject: [PATCH 2/4] 1 --- config/application.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/config/application.rb b/config/application.rb index 723f58766..31a94e7ed 100644 --- a/config/application.rb +++ b/config/application.rb @@ -38,7 +38,6 @@ module Educoderplus origins '*' # location of your api resource '/*', :headers => :any, :methods => [:get, :post, :delete, :options, :put] - resource 'http://outin-396971199eed11e991a100163e1c7426.oss-cn-shanghai.aliyuncs.com/*', :headers => :any, :methods => [:get, :post, :delete, :options, :put] end end end From 41484fb5863df657fe659d3a06f5bf1e3a8aaf56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Wed, 4 Mar 2020 11:08:21 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/scripts/build.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/react/scripts/build.js b/public/react/scripts/build.js index ef253aa83..77e2a4599 100644 --- a/public/react/scripts/build.js +++ b/public/react/scripts/build.js @@ -217,9 +217,11 @@ function generateNewIndexJsp() { ` var jsMinAllRegex = / var result = data .replace(jsMinAllRegex, code) + .replace(flvMinAllRegex, code) // .replace('/js/js_min_all.js', `${cdnHost}/react/build/js/js_min_all.js?v=${newVersion}`) // .replace('/js/js_min_all_2.js', `${cdnHost}/react/build/js/js_min_all_2.js?v=${newVersion}`) From 414b34dbf61695f1dd0d480a65966471932a10c5 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 4 Mar 2020 11:10:19 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E8=A7=86=E9=A2=91Https?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/tasks/get_video_data.rake | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/tasks/get_video_data.rake b/lib/tasks/get_video_data.rake index d38164923..2a009790e 100644 --- a/lib/tasks/get_video_data.rake +++ b/lib/tasks/get_video_data.rake @@ -29,6 +29,24 @@ namespace :video do end end + desc "将http修改成http" + task modify_http_to_https_file_url: :environment do + p "s" + if ENV['args'] + course_id = ENV['args'].split(",")[0] + video_ids = CourseVideo.where(course_id: course_id).pluck(:video_id) + videos = Video.where(id: video_ids) + if videos + videos.each do |v| + if v.file_url + file_url = v.file_url.gsub("http:", "https:") + v.update_column(:file_url, file_url) + end + end + end + end + end + # 执行示例 bundle exec rake video:sample args=2933,'2019-08-19 00:00:00','2019-11-09 23:59:59' task :sample => :environment do if ENV['args']