From e291922fbec971cd413fc1a0e6a618f4488b8d8f Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 14 Feb 2020 16:12:55 +0800 Subject: [PATCH] 1 --- app/controllers/main_controller.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index ee34bd7bd..91e5f3669 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -20,12 +20,10 @@ class MainController < ApplicationController uid_logger("main start is #{cookies[:_educoder_session]}") end 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 + if params[:path].split("/").first == "h5" + render file: 'public/h5build/index.html', :layout => false + else + render file: 'public/react/build/index.html', :layout => false end - render file: 'public/react/build/index.html', :layout => false end end \ No newline at end of file