|
|
|
@ -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,
|
|
|
|
|