From 94a59821c23aabb18a3b5b9f206023888897aa9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Wed, 6 Nov 2019 17:35:57 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Competitimain/CompetitionsIndex.js | 3 ++- .../Competitimain/Competitionsindex.css | 3 ++- .../Competitioncommon/CompetitionCommon.js | 10 +++++++- .../src/modules/osshackathon/Osshackathon.js | 23 ++++++++++++++++++- 4 files changed, 35 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/competitions/Competitimain/CompetitionsIndex.js b/public/react/src/modules/competitions/Competitimain/CompetitionsIndex.js index 9a23f66c1..1f582ce79 100644 --- a/public/react/src/modules/competitions/Competitimain/CompetitionsIndex.js +++ b/public/react/src/modules/competitions/Competitimain/CompetitionsIndex.js @@ -144,7 +144,8 @@ class CompetitionsIndex extends Component{ 报名截止时间:{item.enroll_end_time}, ]} extra={ -
+
+
奖金
diff --git a/public/react/src/modules/competitions/Competitimain/Competitionsindex.css b/public/react/src/modules/competitions/Competitimain/Competitionsindex.css index aa2c347f3..6aa2fd641 100644 --- a/public/react/src/modules/competitions/Competitimain/Competitionsindex.css +++ b/public/react/src/modules/competitions/Competitimain/Competitionsindex.css @@ -88,7 +88,8 @@ } .CompetitionsIndex .gutter-row{ - margin-right:20px; + /*margin-right:20px;*/ + width: 33%; } .pt50{ diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js index eb8e661a4..4ccd8fb6f 100755 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js @@ -373,7 +373,15 @@ class CompetitionCommon extends Component{ className={"color000"}>{data && data.start_time}~{data && data.end_time} {/**/} - + diff --git a/public/react/src/modules/osshackathon/Osshackathon.js b/public/react/src/modules/osshackathon/Osshackathon.js index 3b2d16178..eeaff6a2f 100644 --- a/public/react/src/modules/osshackathon/Osshackathon.js +++ b/public/react/src/modules/osshackathon/Osshackathon.js @@ -11,13 +11,34 @@ class Osshackathon extends Component { constructor(props) { super(props) this.state = { - + page:1, + limit:10, + search: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({ + + }) + } + }).catch((error)=>{ + console.log(error); + }) + } componentDidUpdate = (prevProps) => { From bc6b43c8876fdb01094edcce032213518769d511 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Wed, 6 Nov 2019 18:02:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/osshackathon/Osshackathon.js | 38 ++++++++++++++----- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/public/react/src/modules/osshackathon/Osshackathon.js b/public/react/src/modules/osshackathon/Osshackathon.js index eeaff6a2f..6b8cb3bf3 100644 --- a/public/react/src/modules/osshackathon/Osshackathon.js +++ b/public/react/src/modules/osshackathon/Osshackathon.js @@ -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'; @@ -13,7 +13,8 @@ class Osshackathon extends Component { this.state = { page:1, limit:10, - search:undefined + search:undefined, + data:undefined } } @@ -32,7 +33,7 @@ class Osshackathon extends Component { if(result.status==200){ console.log(result) this.setState({ - + data:result.data }) } }).catch((error)=>{ @@ -46,10 +47,21 @@ class Osshackathon extends Component { } render() { - // let {} = this.state; + let{data}=this.state; + console.log(this.state.data) return (
+
@@ -71,7 +83,7 @@ class Osshackathon extends Component {
- 报名整数:280个 + 报名整数:{data&&data.hackathon.hackathon_users_count}
@@ -79,7 +91,7 @@ class Osshackathon extends Component { - 大赛介绍 + {data&&data.hackathon.name} @@ -98,12 +110,18 @@ class Osshackathon extends Component {

- 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?"":

}

- + { + data&&data.hacks.length==0?"":data&&data.hacks.map((item,key)=>{ + return( + + ) + }) + } {/*学生身份*/} - +