diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index 69323bf49..dd0b1ee97 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -8,24 +8,24 @@ class MainController < ApplicationController end def index - domain_session = params[:_educoder_session] - if domain_session - uid_logger("main start domain_session is #{domain_session}") - if cookies[:_educoder_session] != domain_session - cookies[:_educoder_session] = nil - cookies[:_educoder_session] = domain_session - end - - - uid_logger("main start is #{cookies[:_educoder_session]}") - end - - # TODO: 这块之后需要整合,者架构重新变化,统一跳转到index后再路由分发 - if params[:path] && params[:path]&.include?("h5educoderbuild") && params[:path].split("/").first == "h5educoderbuild" - render file: 'public/h5educoderbuild/index.html', :layout => false - else - render file: 'public/react/build/index.html', :layout => false - end + # domain_session = params[:_educoder_session] + # if domain_session + # uid_logger("main start domain_session is #{domain_session}") + # if cookies[:_educoder_session] != domain_session + # cookies[:_educoder_session] = nil + # cookies[:_educoder_session] = domain_session + # end + # + # + # uid_logger("main start is #{cookies[:_educoder_session]}") + # end + # + # # TODO: 这块之后需要整合,者架构重新变化,统一跳转到index后再路由分发 + # if params[:path] && params[:path]&.include?("h5educoderbuild") && params[:path].split("/").first == "h5educoderbuild" + # render file: 'public/h5educoderbuild/index.html', :layout => false + # else + # render file: 'public/react/build/index.html', :layout => false + # end end end \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 7da30bc7e..6b2f7d22c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1463,7 +1463,7 @@ Rails.application.routes.draw do get 'oauth/get_code', to: 'oauth#get_code' get 'oauth/get_token_callback', to: 'oauth#get_token_callback' - # root 'main#index' + root 'main#index' ## react用