Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

issues25489
daiao 5 years ago
commit 371c736f7e

@ -144,7 +144,8 @@ class CompetitionsIndex extends Component{
<span>报名截止时间{item.enroll_end_time}</span>,
]}
extra={
<div className={"pt50"} style={{"width":'305px'}}>
<div className={"pt50"} style={{"width":'314px'}}>
<Row gutter={16}>
<Col className="gutter-row" span={6}>
<div className="gutter-box CompetitionsIndexdadels">奖金</div>

@ -88,7 +88,8 @@
}
.CompetitionsIndex .gutter-row{
margin-right:20px;
/*margin-right:20px;*/
width: 33%;
}
.pt50{

@ -373,7 +373,15 @@ class CompetitionCommon extends Component{
className={"color000"}>{data && data.start_time}{data && data.end_time}</span></Col>
{/*<Col></Col>*/}
</Col>
<style>
{
`
.ant-col-6{
width: 30%;
}
`
}
</style>
<Col className={"competitionbannerdiv mt10"}>
<Row gutter={16}>
<Col className="gutter-row" span={6}>

@ -1,6 +1,6 @@
import React, {Component} from 'react';
import axios from 'axios';
import {SnackbarHOC, WordsBtn,getImageUrl} from 'educoder';
import {SnackbarHOC, WordsBtn,getImageUrl,markdownToHTML} from 'educoder';
import {Row, Col,Input,Divider,Card,Button} from 'antd';
import { TPMIndexHOC } from '../tpm/TPMIndexHOC';
import { CNotificationHOC } from '../courses/common/CNotificationHOC';
@ -11,13 +11,35 @@ class Osshackathon extends Component {
constructor(props) {
super(props)
this.state = {
page:1,
limit:10,
search:undefined,
data:undefined
}
}
componentDidMount() {
this.getosshackathon();
}
getosshackathon=()=>{
let {page,limit,search}=this.state;
let url=`/osshackathon.json`;
axios.get(url,{params:{
page:page,
limit:limit,
search:search,
}}).then((result)=>{
if(result.status==200){
console.log(result)
this.setState({
data:result.data
})
}
}).catch((error)=>{
console.log(error);
})
}
componentDidUpdate = (prevProps) => {
@ -25,10 +47,21 @@ class Osshackathon extends Component {
}
render() {
// let {} = this.state;
let{data}=this.state;
console.log(this.state.data)
return (
<div className="newMain clearfix newMainybot">
<style>
{
`
.ant-btn-primary{
background: #4CACFF;
border-color: #4CACFF;
}
`
}
</style>
<div className={"educontent mb20 persmstyle"} style={{width: "1200px", marginTop: "26px"}}>
@ -50,7 +83,7 @@ class Osshackathon extends Component {
<Col span={3} className={"fr textright"}>
<div>
报名整数<span className={"color-red"}>280</span>
报名整数<span className={"color-red"}>{data&&data.hackathon.hackathon_users_count}</span>
</div>
</Col>
@ -58,7 +91,7 @@ class Osshackathon extends Component {
<Row className={"mt20"}>
<Col span={6} className={"Osshackathonfont"}>
大赛介绍
{data&&data.hackathon.name}
</Col>
<Col span={3} className={"fr textright"}>
<Button type="primary">编辑</Button>
@ -77,12 +110,18 @@ class Osshackathon extends Component {
<Divider />
<p className={"Osshackathonfontlist mb30"}>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista
probare, quae sunt a te dicta? Refert tamen, quo modo.
{data&&data.hackathon.description===null?"":<div className={"markdown-body"}
dangerouslySetInnerHTML={{__html: markdownToHTML(data&&data.hackathon.description).replace(/▁/g, "▁▁▁")}}></div>}
</p>
{
data&&data.hacks.length==0?"":data&&data.hacks.map((item,key)=>{
return(
<span></span>
)
})
}
{/*学生身份*/}
<Card className={"OsshackathonCard"}>
<Card className={"OsshackathonCard mb20"}>
<Row>
<Col span={6} className={"OsshackathonCardtitle"}>

Loading…
Cancel
Save