From 3a1fd25cbd2ddaae2db3f36295b2ed29e077039b Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 14 Feb 2020 16:20:24 +0800 Subject: [PATCH 1/3] 1 --- app/controllers/main_controller.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index e5cc4ebf5..945a7e870 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -19,8 +19,7 @@ class MainController < ApplicationController uid_logger("main start is #{cookies[:_educoder_session]}") end - Rails.logger("params paths is #{params}") - if params[:path] == "h5" + if params[:path].split("/").first == "h5" render file: 'public/h5build/index.html', :layout => false else render file: 'public/react/build/index.html', :layout => false From a0bc629d20450b16a826974130bd9a0cc29dc0a5 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 14 Feb 2020 16:21:58 +0800 Subject: [PATCH 2/3] 1 --- app/controllers/main_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index 945a7e870..611ac19e0 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -19,7 +19,7 @@ class MainController < ApplicationController uid_logger("main start is #{cookies[:_educoder_session]}") end - if params[:path].split("/").first == "h5" + if params[:path] && params[:path].split("/").first == "h5" render file: 'public/h5build/index.html', :layout => false else render file: 'public/react/build/index.html', :layout => false From 8287de764b4279790e0992eb69982665c7d2b1bd Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 14 Feb 2020 16:25:23 +0800 Subject: [PATCH 3/3] =?UTF-8?q?educoderh5=E9=A1=B5=E9=9D=A2=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/main_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index 611ac19e0..244b7f540 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -19,7 +19,7 @@ class MainController < ApplicationController uid_logger("main start is #{cookies[:_educoder_session]}") end - if params[:path] && params[:path].split("/").first == "h5" + if params[:path] && params[:path].split("/").first == "educoderh5" render file: 'public/h5build/index.html', :layout => false else render file: 'public/react/build/index.html', :layout => false