From a5d0fc212b5d624867b790bf4a48c92e39e45ef5 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 15:26:20 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=AB=9E=E8=B5=9B=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=91=98=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CompetitionContentspdfdownload.js | 14 ++++++++++++-- .../CompetitionContentspdfpeopledata.js | 13 ++++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js index 5ab19b709..eb304e007 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfdownload.js @@ -18,7 +18,18 @@ class CompetitionContentspdfdownload extends Component{ componentDidMount(){ window.document.title = '竞赛'; let url=`/competitions/${this.props.match.params.identifier}/prize.json`; - axios.get(url).then((response) => { + let query=this.props.location&&this.props.location.search; + const types = query.split('user_id=') + let userid; + if(types[1]===undefined){ + userid=this.props.user&&this.props.user.user_id; + }else{ + userid=types[1]; + } + axios.get(url,{params:{ + user_id:userid, + } + }).then((response) => { if(response.status===200){ let datas=response.data.teams; @@ -33,7 +44,6 @@ class CompetitionContentspdfdownload extends Component{ } }) } - this.setState({ data:response.data, teams:datas, diff --git a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js index 5a67235bd..aa550c0c5 100644 --- a/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js +++ b/public/react/src/modules/competitions/Competitioncommon/CompetitionCommonChild/CompetitionContentspdfChild/CompetitionContentspdfpeopledata.js @@ -39,7 +39,18 @@ class CompetitionContentspdfpeopledata extends Component { GetawardinformationAPI = () => { let url = `/competitions/${this.props.match.params.identifier}/prize.json`; - axios.get(url).then((result) => { + let query=this.props.location&&this.props.location.search; + const types = query.split('user_id=') + let userid; + if(types[1]===undefined){ + userid=this.props.user&&this.props.user.user_id; + }else{ + userid=types[1]; + } + axios.get(url,{params:{ + user_id:userid, + } + }).then((result) => { if (result.data) { this.setState({ formationdata: result.data.formationdata,