From d5d0b22105189053d8e34ee514399668a826e765 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Fri, 14 Feb 2020 16:05:42 +0800 Subject: [PATCH] =?UTF-8?q?h5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/main_controller.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index 3e0e5388a..ee34bd7bd 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -19,10 +19,13 @@ class MainController < ApplicationController uid_logger("main start is #{cookies[:_educoder_session]}") end - if params[:path] == "h5" - render file: 'public/h5build/index.html', :layout => false - else - render file: 'public/react/build/index.html', :layout => false + Rails.logger("params paths is #{params[:path]}") + if params[:path].include("h5") + path = params[:path].split("/").second + if path == "h5" + render file: 'public/h5build/index.html', :layout => false + end end + render file: 'public/react/build/index.html', :layout => false end end \ No newline at end of file