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,