dev_auth
杨树林 6 years ago
parent 236a81f407
commit 4805538c77

@ -70,6 +70,7 @@ class Registration extends React.Component {
members_count: 0, members_count: 0,
mode: 0, mode: 0,
region_schools: [], region_schools: [],
admin: false,
} }
} }
@ -85,6 +86,9 @@ class Registration extends React.Component {
const {keyword, page, per_page} = this.state; const {keyword, page, per_page} = this.state;
this.Getdata(keyword, page, per_page, this.props.user.admin);// 获取列表数据 this.Getdata(keyword, page, per_page, this.props.user.admin);// 获取列表数据
this.GetenrollmentAPI();//获取我的报名配置 this.GetenrollmentAPI();//获取我的报名配置
this.setState({
admin: this.props.user.admin
})
} catch (e) { } catch (e) {
// const {keyword, page, per_page} = this.state; // const {keyword, page, per_page} = this.state;
// this.Getdata(keyword, page, per_page, this.props.isAdmin()); // this.Getdata(keyword, page, per_page, this.props.isAdmin());
@ -107,6 +111,9 @@ class Registration extends React.Component {
this.GetenrollmentAPI(); this.GetenrollmentAPI();
//取模式 //取模式
this.Getdataheader(); this.Getdataheader();
this.setState({
admin: this.props.user.admin
})
} }
} }
@ -824,7 +831,7 @@ class Registration extends React.Component {
render() { render() {
const {page, mode, pages, limit, type, tmodalsType, tmodalsTypes, data, count, competition_teams, Newtit, itemiddata, messagePerbool, messageexitol, GetenrollmentAPI, loadingstate, pint, competition_name, mutiple_limited, teamutiple_limited, members_count} = this.state; const {page, admin, mode, pages, limit, type, tmodalsType, tmodalsTypes, data, count, competition_teams, Newtit, itemiddata, messagePerbool, messageexitol, GetenrollmentAPI, loadingstate, pint, competition_name, mutiple_limited, teamutiple_limited, members_count} = this.state;
return ( return (
<div className="newMain clearfix newMainybot"> <div className="newMain clearfix newMainybot">
@ -894,15 +901,15 @@ class Registration extends React.Component {
></CompetitionMaxImg> ></CompetitionMaxImg>
{/*大图结尾*/} {/*大图结尾*/}
{/*没数据*/} {/*没数据*/}
{ {admin === true ?
pint === 1 || pint === 3 ? (pint === 1 || pint === 3 ?
<div style={{ <div style={{
marginTop: "22px" marginTop: "22px"
}}> }}>
<p>参赛总人数<span style={{color: "#459BE5"}}>{members_count}</span><span <p>参赛总人数<span style={{color: "#459BE5"}}>{members_count}</span><span
style={{marginLeft: "5px"}}></span> style={{marginLeft: "5px"}}></span>
</p> </p>
</div> </div> : "")
: ""} : ""}
{/*列表*/} {/*列表*/}
{ {
@ -1060,4 +1067,4 @@ export default Registration;
// //
// //
// }) // })
// } // }

Loading…
Cancel
Save