Merge remote-tracking branch 'origin/dev_aliyun' into dev_aliyun

dev_auth
杨树明 5 years ago
commit 11885a70a0

@ -13,7 +13,7 @@ class Competitions::CompetitionsController < Competitions::BaseController
competitions =
case params[:category]
when 'nearly_published' then competitions.where(status: false)
when 'progressing' then competitions.where('end_time > NOW()')
when 'progressing' then competitions.where('status = 1 and end_time > NOW()')
when 'ended' then competitions.where('end_time < NOW()')
else competitions
end

@ -244,11 +244,7 @@ module CoursesHelper
course_group_ids = course.group_course_power(user_id)
course_groups =
if course_group_ids.present?
sql = %Q{
SELECT * FROM course_groups WHERE id in(SELECT course_group_id FROM teacher_course_groups WHERE id
IN(#{course_group_ids.join(",")})) order by position ASC
}
CourseGroup.find_by_sql(sql)
course.course_groups.where(id: course_group_ids).includes(:course_members)
else
course.course_groups.includes(:course_members)
end

@ -17,9 +17,13 @@ class SyncTrustieJob < ApplicationJob
"number": count
}
uri = URI.parse(url)
http = Net::HTTP.new(uri.hostname, uri.port)
http.send_request('PUT', uri.path, sync_json.to_json, {'Content-Type' => 'application/json'})
Rails.logger.info("#######_________response__sync__end_____#########")
if token_url.include?("https://")
http.use_ssl = true
end
response = http.send_request('PUT', uri.path, sync_json.to_json, {'Content-Type' => 'application/json'})
Rails.logger.info("#######_________response__sync__end_____#########{response.body}")
end
end

@ -53,15 +53,18 @@ class CompetitionMaxImg extends React.Component {
</div>
:
type === 3 ?
<div className="registrationback"
style={{"background": `url(${getImageUrl(`images/educoder/competitions/tipregistit.jpg`)})`}}>
style={{"background": `url(${getImageUrl(`images/educoder/competitions/tipregistit.jpg`)})`}}
>
<p className="registrationbackp1">Educoder竞赛平台</p>
<p className="registrationbackp4">高校智能课堂与综合实训平台</p>
<div className="registrationbackp2button2">
<div className="registbut11">
<p className="registrationbackp2">Educoder是一个面向计算机类的互联网IT教育和实战平台</p>
<p className="registrationbackp3">提供企业级工程实训以实现工程化专业教学的自动化和智能化</p>
<div className="registrationbackp2button">
<div className="registbut1">
<p onClick={() => this.props.Jointheteam()}>加入战队</p>
</div>
<div className="registbut22">
<div className="registbut2">
<p onClick={() => this.props.Createateam()}>创建战队</p>
</div>
@ -69,15 +72,18 @@ class CompetitionMaxImg extends React.Component {
</div>
:
type === 4 || type === 5 ?
<div className="registrationback1"
style={{"background": `url(${getImageUrl(`images/educoder/competitions/tipregistit.jpg`)})`}}>
<p className="registrationbackp11">Educoder竞赛平台</p>
<p className="registrationbackp22">高校智能课堂与综合实训平台</p>
<div className="registrationbackp2button3">
<div className="registbut111">
<div className="registrationback"
style={{"background": `url(${getImageUrl(`images/educoder/competitions/tipregistit.jpg`)})`}}
>
<p className="registrationbackp1">Educoder竞赛平台</p>
<p className="registrationbackp2">Educoder是一个面向计算机类的互联网IT教育和实战平台</p>
<p className="registrationbackp3">提供企业级工程实训以实现工程化专业教学的自动化和智能化</p>
<div className="registrationbackp2button">
<div className="registbut1">
<p onClick={() => this.props.Jointheteam()}>加入战队</p>
</div>
<div className="registbut222">
<div className="registbut2">
<p onClick={() => this.props.Createateam()}>创建战队</p>
</div>
@ -122,3 +128,36 @@ class CompetitionMaxImg extends React.Component {
}
export default CompetitionMaxImg;
// // type3
// /*<div className="registrationback"*/
// /* style={{"background": `url(${getImageUrl(`images/educoder/competitions/tipregistit.jpg`)})`}}>*/
// /* <p className="registrationbackp1">Educoder竞赛平台</p>*/
// /* <p className="registrationbackp4">高校智能课堂与综合实训平台</p>*/
// /* <div className="registrationbackp2button2">*/
// /* <div className="registbut11">*/
// /* <p onClick={() => this.props.Jointheteam()}>加入战队</p>*/
// /* </div>*/
// /* <div className="registbut22">*/
// /* <p onClick={() => this.props.Createateam()}>创建战队</p>*/
// /* </div>*/
//
// /* </div>*/
// /*</div>*/
//
//
// // type === 4 || type === 5
// // <div className="registrationback1"
// // style={{"background": `url(${getImageUrl(`images/educoder/competitions/tipregistit.jpg`)})`}}>
// // <p className="registrationbackp11">Educoder竞赛平台</p>
// // <p className="registrationbackp22">高校智能课堂与综合实训平台</p>
// // <div className="registrationbackp2button3">
// // <div className="registbut111">
// // <p onClick={() => this.props.Jointheteam()}>加入战队</p>
// // </div>
// // <div className="registbut222">
// // <p onClick={() => this.props.Createateam()}>创建战队</p>
// // </div>
// //
// // </div>
// // </div>

@ -118,10 +118,10 @@
.registbut1 {
margin-right: 46px;
text-align: center;
background: #ffffff;
background: #0BDEE6;
border-radius: 10px;
height: 54px;
width: 156px;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
@ -181,7 +181,7 @@
.registbut1 p {
width: 100%;
height: 100%;
color: #05101A;
color: #ffffff;
line-height: 54px;
font-size: 20px;
font-weight: bold;
@ -205,7 +205,7 @@
line-height: 54px;
width: 100%;
height: 100%;
color: #05101A;
color: #ffffff;
font-size: 20px;
font-weight: bold;
cursor: pointer
@ -235,10 +235,10 @@
text-align: center;
color: #05101A;
font-size: 20px;
background: #ffffff;
background: #F8EC25;
height: 54px;
width: 156px;
border-radius: 4px;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;

Loading…
Cancel
Save