diff --git a/app/models/laboratory.rb b/app/models/laboratory.rb index 53e66ece0..f319ace80 100644 --- a/app/models/laboratory.rb +++ b/app/models/laboratory.rb @@ -19,7 +19,7 @@ class Laboratory < ApplicationRecord return if subdomain.blank? rails_env = EduSetting.get('rails_env') - subdomain = subdomain.slice(0, subdomain.size - rails_env.size - 1) if subdomain.end_with?(rails_env) # winse.dev => winse + subdomain = subdomain.slice(0, subdomain.size - rails_env.size - 1) if rails_env && subdomain.end_with?(rails_env) # winse.dev => winse find_by_identifier(subdomain) end diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index cddea79a6..9cf68503d 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -93,14 +93,16 @@ export function initAxiosInterceptors(props) { config.url = url; } } - // - // if (requestMap[config.url] === true) { // 避免重复的请求 导致页面f5刷新 也会被阻止 显示这个方法会影响到定制信息 - // console.log(config); - // console.log(JSON.parse(config)); - // console.log(config.url); - // console.log("被阻止了是重复请求================================="); - // return false; - // } + + if (config.method === "post") { + if (requestMap[config.url] === true) { // 避免重复的请求 导致页面f5刷新 也会被阻止 显示这个方法会影响到定制信息定制信息是get 请求 + // console.log(config); + // console.log(JSON.parse(config)); + // console.log(config.url); + // console.log("被阻止了是重复请求================================="); + return false; + } + } // 非file_update请求 if (config.url.indexOf('update_file') === -1) { requestMap[config.url] = true; diff --git a/public/react/src/modules/courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js index d364f7ada..2610656cc 100644 --- a/public/react/src/modules/courses/Resource/Fileslistitem.js +++ b/public/react/src/modules/courses/Resource/Fileslistitem.js @@ -209,6 +209,9 @@ class Fileslistitem extends Component{ text-overflow:ellipsis; white-space:nowrap } + .mt2{ + margin-top:2px; + } `}
- {title} + {title}
请先上传资源
:""} -+
-