laboratory setting url

competitions
p31729568 5 years ago
parent 2d4fb385cf
commit c05bf44ed9

@ -34,7 +34,7 @@ class LaboratorySetting < ApplicationRecord
def logo_url(type) def logo_url(type)
return nil unless Util::FileManage.exists?(self, type) return nil unless Util::FileManage.exists?(self, type)
Util::FileManage.source_disk_file_url(self, type)[1..-1] # 前端不兼容带 / 的 Util::FileManage.source_disk_file_url(self, type)
end end
def self.default_config def self.default_config

@ -2,9 +2,9 @@ json.setting do
setting = @laboratory.laboratory_setting setting = @laboratory.laboratory_setting
json.name setting.name || default_setting.name json.name setting.name || default_setting.name
json.nav_logo_url setting.nav_logo_url || default_setting.nav_logo_url json.nav_logo_url (setting.nav_logo_url || default_setting.nav_logo_url)&.[](1..-1)
json.login_logo_url setting.login_logo_url || default_setting.login_logo_url json.login_logo_url (setting.login_logo_url || default_setting.login_logo_url)&.[](1..-1)
json.tab_logo_url setting.tab_logo_url || default_setting.tab_logo_url json.tab_logo_url (setting.tab_logo_url || default_setting.tab_logo_url)&.[](1..-1)
json.navbar setting.navbar || default_setting.navbar json.navbar setting.navbar || default_setting.navbar

Loading…
Cancel
Save