From e9e9ba9d69367842759bd4eafb309efda0d2c78b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 25 Oct 2019 10:30:26 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E8=AF=A6=E6=83=85=E5=A4=B4?= =?UTF-8?q?=E9=83=A8=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Competitioncommon/CompetitionCommon.js | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js index 2fcdfb524..3991277fb 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommon.js @@ -60,22 +60,23 @@ class CompetitionCommon extends Component{ }).catch((error) => { console.log(error) }) + //console.log(this.props) + if(this.props.user&&this.props.user.login!= ""){ + + const zul = `/competitions/${this.props.match.params.identifier}/competition_staff.json`; + axios.get((zul)).then((result) => { + if (result) { + if (result.data) { + this.setState({ + signupdata:result.data + }) + } + } + }).catch((error) => { + //console.log(error); + }) + } - // console.log("调用了GetenrollmentAPI"); - const zul = `/competitions/${this.props.match.params.identifier}/competition_staff.json`; - axios.get((zul)).then((result) => { - if (result) { - if (result.data) { - - this.setState({ - signupdata:result.data - }) - - } - } - }).catch((error) => { - //// //////console.log(error); - }) } getrightdatas=(e)=>{ @@ -258,7 +259,7 @@ class CompetitionCommon extends Component{ 已结束 : data.competition_status==="progressing"?:""}