diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index baa8b0d85..d0a2e5e4b 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -13,7 +13,7 @@ class CoursesController < ApplicationController end before_action :require_login, except: [:index, :show, :students, :teachers, :board_list, :mine, :all_course_groups, - :left_banner, :top_banner, :informs, :online_learning, :course_groups] + :left_banner, :top_banner, :informs, :online_learning, :course_groups, :search_slim] before_action :check_account, only: [:new, :create, :apply_to_join_course, :join_excellent_course] before_action :check_auth, except: [:index, :show, :students, :teachers, :board_list, :mine, :all_course_groups, :left_banner, :top_banner, :apply_to_join_course, :exit_course, :course_groups] diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb index d9a62cf90..69323bf49 100644 --- a/app/controllers/main_controller.rb +++ b/app/controllers/main_controller.rb @@ -20,11 +20,8 @@ class MainController < ApplicationController uid_logger("main start is #{cookies[:_educoder_session]}") end - - if params[:path] && params[:path]&.include?("educoderh5") && params[:path].split("/").first == "educoderh5" - render file: 'public/h5build/index.html', :layout => false - # TODO: 这块之后需要整合,到上面去,或者架构重新变化,统一跳转到index后再路由分发 - elsif params[:path] && params[:path]&.include?("h5educoderbuild") && params[:path].split("/").first == "h5educoderbuild" + # 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 diff --git a/app/controllers/weapps/shixun_lists_controller.rb b/app/controllers/weapps/shixun_lists_controller.rb index 4db1e171f..d4fc8e8e7 100644 --- a/app/controllers/weapps/shixun_lists_controller.rb +++ b/app/controllers/weapps/shixun_lists_controller.rb @@ -1,5 +1,4 @@ class Weapps::ShixunListsController < ApplicationController - before_action :require_login def index results = Weapps::ShixunSearchService.call(search_params, current_laboratory) diff --git a/app/controllers/weapps/subjects_controller.rb b/app/controllers/weapps/subjects_controller.rb index ab578e5e1..e5c3eb316 100644 --- a/app/controllers/weapps/subjects_controller.rb +++ b/app/controllers/weapps/subjects_controller.rb @@ -1,5 +1,5 @@ class Weapps::SubjectsController < Weapps::BaseController - before_action :require_login + before_action :require_login, except: [:index, :show] before_action :find_subject, except: [:index] # 首页