Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

issues25489
daiao 5 years ago
commit bcd390178d

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

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

Loading…
Cancel
Save