|
|
|
@ -62,7 +62,7 @@ class Registration extends React.Component {
|
|
|
|
|
itemid: undefined,
|
|
|
|
|
itemiddata: [],
|
|
|
|
|
pint: 0,
|
|
|
|
|
|
|
|
|
|
competition_name: undefined,
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -101,6 +101,7 @@ class Registration extends React.Component {
|
|
|
|
|
|
|
|
|
|
//获取报名配置API
|
|
|
|
|
GetenrollmentAPI = () => {
|
|
|
|
|
console.log("调用了GetenrollmentAPI");
|
|
|
|
|
const url = `/competitions/${this.props.match.params.identifier}/competition_staff.json`;
|
|
|
|
|
axios.get((url)).then((result) => {
|
|
|
|
|
if (result) {
|
|
|
|
@ -161,6 +162,7 @@ class Registration extends React.Component {
|
|
|
|
|
data: result.data.my_teams,
|
|
|
|
|
competition_teams: result.data.competition_teams,
|
|
|
|
|
personal: result.data.personal,
|
|
|
|
|
competition_name: result.data.competition_name
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
//普通账号
|
|
|
|
@ -291,6 +293,7 @@ class Registration extends React.Component {
|
|
|
|
|
competition_teams: result.data.competition_teams,
|
|
|
|
|
data: result.data.my_teams,
|
|
|
|
|
personal: result.data.personal,
|
|
|
|
|
competition_name: result.data.competition_name
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
@ -556,7 +559,7 @@ class Registration extends React.Component {
|
|
|
|
|
messageexitol: true
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
let url = `/competitions/${"gcc-task-2020"}/competition_teams/${this.state.itemid}/leave.json`;
|
|
|
|
|
let url = `/competitions/${this.props.match.params.identifier}/competition_teams/${this.state.itemid}/leave.json`;
|
|
|
|
|
axios.post(url).then((response) => {
|
|
|
|
|
if (response) {
|
|
|
|
|
if (response.data) {
|
|
|
|
@ -618,7 +621,7 @@ class Registration extends React.Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
const {page, pages, limit, type, tmodalsType, tmodalsTypes, data, count, competition_teams, Newtit, itemiddata, messagePerbool, messageexitol, GetenrollmentAPI, loadingstate, pint} = this.state;
|
|
|
|
|
const {page, pages, limit, type, tmodalsType, tmodalsTypes, data, count, competition_teams, Newtit, itemiddata, messagePerbool, messageexitol, GetenrollmentAPI, loadingstate, pint, competition_name} = this.state;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="newMain clearfix ">
|
|
|
|
@ -646,7 +649,9 @@ class Registration extends React.Component {
|
|
|
|
|
tmodalsType === true ?
|
|
|
|
|
<PersonModal modalsType={tmodalsType} {...this.props} {...this.state} Newtit={Newtit}
|
|
|
|
|
itemiddata={itemiddata} GetenrollmentAPI={GetenrollmentAPI}
|
|
|
|
|
Tmoconfirm1={(bool) => this.Tmoconfirm1(bool)}></PersonModal>
|
|
|
|
|
Tmoconfirm1={(bool) => this.Tmoconfirm1(bool)}
|
|
|
|
|
GetenrollmentAPIopens={() => this.GetenrollmentAPI()}
|
|
|
|
|
></PersonModal>
|
|
|
|
|
:
|
|
|
|
|
""
|
|
|
|
|
}
|
|
|
|
@ -677,7 +682,8 @@ class Registration extends React.Component {
|
|
|
|
|
<div style={{marginBottom: '12px'}}>
|
|
|
|
|
<Breadcrumb separator=">">
|
|
|
|
|
<Breadcrumb.Item href="/newcompetitions">在线竞赛</Breadcrumb.Item>
|
|
|
|
|
<Breadcrumb.Item href="">全国高校计算机大赛</Breadcrumb.Item>
|
|
|
|
|
<Breadcrumb.Item
|
|
|
|
|
href="">{competition_name === undefined || competition_name === null || competition_name === "" ? "全国高校计算机大赛" : competition_name}</Breadcrumb.Item>
|
|
|
|
|
<Breadcrumb.Item href="">报名</Breadcrumb.Item>
|
|
|
|
|
</Breadcrumb>
|
|
|
|
|
</div>
|
|
|
|
|