|
|
|
@ -76,6 +76,15 @@ class Registration extends React.Component {
|
|
|
|
|
// //// //////console.log("调用子组件 ");
|
|
|
|
|
// //////console.log(this.props.isAdmin());
|
|
|
|
|
// //// //////console.log(this.props.isAdmin())
|
|
|
|
|
try {
|
|
|
|
|
const {keyword, page, per_page} = this.state;
|
|
|
|
|
this.Getdata(keyword, page, per_page, this.props.user.admin);
|
|
|
|
|
this.GetenrollmentAPI();
|
|
|
|
|
} catch (e) {
|
|
|
|
|
// const {keyword, page, per_page} = this.state;
|
|
|
|
|
// this.Getdata(keyword, page, per_page, this.props.isAdmin());
|
|
|
|
|
// this.GetenrollmentAPI();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidUpdate = (prevProps) => {
|
|
|
|
@ -88,8 +97,6 @@ class Registration extends React.Component {
|
|
|
|
|
const {keyword, page, per_page} = this.state;
|
|
|
|
|
this.Getdata(keyword, page, per_page, this.props.user.admin);
|
|
|
|
|
this.GetenrollmentAPI();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -388,7 +395,7 @@ class Registration extends React.Component {
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.props.isAdmin() === true) {
|
|
|
|
|
if (this.props.user.admin === true) {
|
|
|
|
|
//老师
|
|
|
|
|
if (this.state.teacher_staff === null) {
|
|
|
|
|
//禁止老师
|
|
|
|
@ -442,7 +449,7 @@ class Registration extends React.Component {
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.props.isAdmin() === true) {
|
|
|
|
|
if (this.props.user.admin === true) {
|
|
|
|
|
//老师
|
|
|
|
|
if (this.state.teacher_staff === null) {
|
|
|
|
|
//禁止老师
|
|
|
|
@ -704,10 +711,13 @@ class Registration extends React.Component {
|
|
|
|
|
{/* <WordsBtn className="fl">报名</WordsBtn>*/}
|
|
|
|
|
{/* </p>*/}
|
|
|
|
|
{/*</div>*/}
|
|
|
|
|
<Breadcrumb separator=">">
|
|
|
|
|
<Breadcrumb.Item href="">在线竞赛</Breadcrumb.Item>
|
|
|
|
|
<Breadcrumb.Item href="">全国高校计算机大赛</Breadcrumb.Item>
|
|
|
|
|
</Breadcrumb>
|
|
|
|
|
<div style={{marginBottom: '12px'}}>
|
|
|
|
|
<Breadcrumb separator=">">
|
|
|
|
|
<Breadcrumb.Item href="/newcompetitions">在线竞赛</Breadcrumb.Item>
|
|
|
|
|
<Breadcrumb.Item href="">全国高校计算机大赛</Breadcrumb.Item>
|
|
|
|
|
<Breadcrumb.Item href="">报名</Breadcrumb.Item>
|
|
|
|
|
</Breadcrumb>
|
|
|
|
|
</div>
|
|
|
|
|
{/*大图*/}
|
|
|
|
|
<CompetitionMaxImg type={type} Jointheteam={() => this.Jointheteam()}
|
|
|
|
|
pint={pint}
|
|
|
|
@ -722,7 +732,8 @@ class Registration extends React.Component {
|
|
|
|
|
<div style={{
|
|
|
|
|
marginTop: "22px"
|
|
|
|
|
}}>
|
|
|
|
|
<p>参赛总人数:<span style={{color: "#459BE5"}}>{data === null || data === undefined ? 0 : data.length}</span>人
|
|
|
|
|
<p>参赛总人数:<span style={{color: "#459BE5"}}>{data === null || data === undefined ? 0 : data.length}</span><span
|
|
|
|
|
style={{marginLeft: "5px"}}>人</span>
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
: ""}
|
|
|
|
|