Merge pull request '调整glcc pj检测和setting接口新增个人建站域名返回' (#143) from KingChan/forgeplus:chenjing into standalone_develop
This commit is contained in:
commit
29b6c1a4d2
|
@ -2,6 +2,7 @@ class SettingsController < ApplicationController
|
|||
def show
|
||||
@old_projects_url = nil
|
||||
get_navbar
|
||||
site_page_deploy_domain
|
||||
get_add_menu
|
||||
get_common_menu
|
||||
get_sub_competitions
|
||||
|
@ -34,6 +35,10 @@ class SettingsController < ApplicationController
|
|||
# end
|
||||
end
|
||||
|
||||
def site_page_deploy_domain
|
||||
@deploy_domain = EduSetting.find_by_name("site_page_deploy_domain").try(:value)
|
||||
end
|
||||
|
||||
def get_add_menu
|
||||
@add = []
|
||||
Site.add.select(:id, :name, :url, :key).to_a.map(&:serializable_hash).each do |site|
|
||||
|
|
|
@ -24,7 +24,7 @@ class GlccMediumTermExamineMaterial < ActiveRecord::Base
|
|||
state = []
|
||||
# code_or_pr_url = "https://www.gitlink.org.cn/Gitlink/forgeplus/pulls/337"
|
||||
url_array = code_or_pr_url.split("/")
|
||||
gitlink_index = url_array.index("www.gitlink.org.cn") || url_array.index("gitlink.org.cn")
|
||||
gitlink_index = url_array.index("www.gitlink.org.cn") || url_array.index("gitlink.org.cn") || url_array.index("testforgeplus.trustie.net")
|
||||
pull_index = url_array.index("pulls")
|
||||
|
||||
#发送没有在gitlink上提交PR的邮件
|
||||
|
|
|
@ -32,6 +32,7 @@ json.setting do
|
|||
json.nav_logo_url default_setting.nav_logo_url&.[](1..-1)
|
||||
json.login_logo_url default_setting.login_logo_url&.[](1..-1)
|
||||
json.tab_logo_url default_setting.tab_logo_url&.[](1..-1)
|
||||
json.site_page_deploy_domain @deploy_domain
|
||||
|
||||
json.subject_banner_url default_setting.subject_banner_url&.[](1..-1)
|
||||
json.course_banner_url default_setting.course_banner_url&.[](1..-1)
|
||||
|
|
Loading…
Reference in New Issue