From 05038761ba7411a73ab4c06ad46ea65ed0014e04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 31 Dec 2019 11:22:57 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 24493dd13..b0d0b2f3f 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -51,7 +51,7 @@ if (isDev) { checkSubmitFlg=true window.setTimeout(function () { checkSubmitFlg=false; - }, 2500); + }, 2000); }else if(checkSubmitFlg===false){ $.ajax({url:proxy,async:false,success:function(data){ if(data.status===0){ @@ -61,7 +61,7 @@ if (isDev) { checkSubmitFlg=true window.setTimeout(function () { checkSubmitFlg=false; - }, 2500); + }, 2000); } } window._debugType = debugType; @@ -224,6 +224,7 @@ export function initAxiosInterceptors(props) { } if (response.data.status === 501) { + window.location.reload() notification.warning({ description:response.data.message || '访问异常,请求不合理', }) From 13f7d8c06f780f923e2af68297a6ef6cfc19e80c Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 31 Dec 2019 11:25:01 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/admins/base_controller.rb | 1 - app/controllers/application_controller.rb | 2 +- app/controllers/schools_controller.rb | 1 - app/views/admins/shared/_sidebar.html.erb | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/controllers/admins/base_controller.rb b/app/controllers/admins/base_controller.rb index 9a4a25013..0451b77d1 100644 --- a/app/controllers/admins/base_controller.rb +++ b/app/controllers/admins/base_controller.rb @@ -6,7 +6,6 @@ class Admins::BaseController < ApplicationController layout 'admin' skip_before_action :verify_authenticity_token - before_action :require_login, :require_admin! after_action :rebind_event_if_ajax_render_partial diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 4faa42107..ba246829d 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -282,7 +282,7 @@ class ApplicationController < ActionController::Base end def user_setup - # reacct静态资源加载不需要走这一步 + # # reacct静态资源加载不需要走这一步 return if params[:controller] == "main" # Find the current user Rails.logger.info("current_laboratory is #{current_laboratory} domain is #{request.subdomain}") diff --git a/app/controllers/schools_controller.rb b/app/controllers/schools_controller.rb index dc9f6c091..ae0315cdd 100644 --- a/app/controllers/schools_controller.rb +++ b/app/controllers/schools_controller.rb @@ -15,7 +15,6 @@ class SchoolsController < ApplicationController schools = School.all keyword = params[:keyword].to_s.strip schools = schools.where('name LIKE ?', "%#{keyword}%") if keyword - render_ok(schools: schools.select(:id, :name).as_json) end diff --git a/app/views/admins/shared/_sidebar.html.erb b/app/views/admins/shared/_sidebar.html.erb index 4b84068e7..09c115b06 100644 --- a/app/views/admins/shared/_sidebar.html.erb +++ b/app/views/admins/shared/_sidebar.html.erb @@ -2,7 +2,7 @@