dev_sync_trustie
杨树林 5 years ago
parent 32398333ec
commit 5785d4e4cb

@ -486,7 +486,14 @@ class App extends Component {
{/*/!*众包创新*!/*/} {/*/!*众包创新*!/*/}
{/*<Route path={"/crowdsourcing"} component={ProjectPackages}/>*/} {/*<Route path={"/crowdsourcing"} component={ProjectPackages}/>*/}
{/*竞赛*/} {/*竞赛*/}
<Route path={"/newcompetitions"} component={NewCompetitions}/> <Route path={"/newcompetitions"}
render={
(props) => {
return (<NewCompetitions {...this.props} {...props} {...this.state} />)
}
}></Route>
{/*认证*/} {/*认证*/}
<Route path="/account" component={AccountPage}/> <Route path="/account" component={AccountPage}/>

@ -76,6 +76,15 @@ class Registration extends React.Component {
// //// //////console.log("调用子组件 "); // //// //////console.log("调用子组件 ");
// //////console.log(this.props.isAdmin()); // //////console.log(this.props.isAdmin());
// //// //////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) => { componentDidUpdate = (prevProps) => {
@ -88,8 +97,6 @@ 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();
} }
} }
@ -388,7 +395,7 @@ class Registration extends React.Component {
}) })
return return
} }
if (this.props.isAdmin() === true) { if (this.props.user.admin === true) {
//老师 //老师
if (this.state.teacher_staff === null) { if (this.state.teacher_staff === null) {
//禁止老师 //禁止老师
@ -442,7 +449,7 @@ class Registration extends React.Component {
}) })
return return
} }
if (this.props.isAdmin() === true) { if (this.props.user.admin === true) {
//老师 //老师
if (this.state.teacher_staff === null) { if (this.state.teacher_staff === null) {
//禁止老师 //禁止老师
@ -704,10 +711,13 @@ class Registration extends React.Component {
{/* <WordsBtn className="fl">报名</WordsBtn>*/} {/* <WordsBtn className="fl">报名</WordsBtn>*/}
{/* </p>*/} {/* </p>*/}
{/*</div>*/} {/*</div>*/}
<Breadcrumb separator=">"> <div style={{marginBottom: '12px'}}>
<Breadcrumb.Item href="">在线竞赛</Breadcrumb.Item> <Breadcrumb separator=">">
<Breadcrumb.Item href="">全国高校计算机大赛</Breadcrumb.Item> <Breadcrumb.Item href="/newcompetitions">在线竞赛</Breadcrumb.Item>
</Breadcrumb> <Breadcrumb.Item href="">全国高校计算机大赛</Breadcrumb.Item>
<Breadcrumb.Item href="">报名</Breadcrumb.Item>
</Breadcrumb>
</div>
{/*大图*/} {/*大图*/}
<CompetitionMaxImg type={type} Jointheteam={() => this.Jointheteam()} <CompetitionMaxImg type={type} Jointheteam={() => this.Jointheteam()}
pint={pint} pint={pint}
@ -722,7 +732,8 @@ class Registration extends React.Component {
<div style={{ <div style={{
marginTop: "22px" 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> </p>
</div> </div>
: ""} : ""}

@ -62,7 +62,8 @@ class RegistrationSearch extends React.Component {
textAlign: "right", textAlign: "right",
lineHeight: " 24px" lineHeight: " 24px"
}}>战队总数<span }}>战队总数<span
style={{color: "#459BE5", fontSize: "16px"}}>{this.props.count}</span></p> style={{color: "#459BE5", fontSize: "16px"}}>{this.props.count}</span><span
style={{marginLeft: "5px",}}></span></p>
</div> </div>
) )
} }

@ -365,11 +365,13 @@
width: 78px; width: 78px;
background-color: transparent; background-color: transparent;
margin-bottom: 9px; margin-bottom: 9px;
border-radius: 50%;
} }
.personregitemimg { .personregitemimg {
height: 64px; height: 64px;
width: 64px; width: 64px;
border-radius: 50%;
} }
@ -384,13 +386,17 @@
height: 69px; height: 69px;
margin-top: 3px; margin-top: 3px;
background-color: transparent; background-color: transparent;
border-radius: 50%;
} }
.regitemimgs2 { .regitemimgs2 {
margin-top: 16px; margin-top: 16px;
width: 49px; width: 49px;
height: 51px; height: 51px;
margin-left: 25px margin-left: 25px;
border-radius: 50%;
} }
.regitemimgs22 { .regitemimgs22 {
@ -398,6 +404,8 @@
width: 28px; width: 28px;
height: 28px; height: 28px;
margin-left: 20px; margin-left: 20px;
border-radius: 50%;
} }
.regitemimgs3 { .regitemimgs3 {

@ -56,7 +56,24 @@ class PersonModal extends Component {
} }
} }
componentDidMount() { componentDidMount() {
var data = [];
var datas = {
enrollable: false,
id: this.props.user.user_id,
name: this.props.user.real_name,
school_name: this.props.user.user_school,
student_id: null,
identity: this.props.user.user_identity,
type: "创建者",
};
data.push(datas);
this.setState({
myuser: this.props.user,
mydatas: data,
})
this.setState({
GetenrollmentAPI: this.props.GetenrollmentAPI,
})
} }
componentDidUpdate = (prevProps) => { componentDidUpdate = (prevProps) => {

@ -58,7 +58,7 @@ class PersonalCompetit extends React.Component {
<div style={{ <div style={{
marginTop: "22px" marginTop: "22px"
}}> }}>
<p>参赛总人数<span style={{color: "#459BE5"}}>132</span></p> <p>参赛总人数<span style={{color: "#459BE5"}}>132</span><span style={{marginLeft: "5px"}}></span></p>
</div> </div>
: ""} : ""}

@ -148,10 +148,14 @@ class PersonalCompetititem extends React.Component {
fontSize: "16px", fontSize: "16px",
}}>{data[0].invite_code === null || data[0].invite_code === undefined ? "" : data[0].invite_code}</span> }}>{data[0].invite_code === null || data[0].invite_code === undefined ? "" : data[0].invite_code}</span>
</div> </div>
<input style={{ <div style={{
display: "none" overflow: 'hidden',
}} id="copy_invite_code" height: "0px",
value={data[0].invite_code === null || data[0].invite_code === undefined ? "" : data[0].invite_code}/> width: "0px"
}}>
<input id="copy_invite_code"
value={data[0].invite_code === null || data[0].invite_code === undefined ? "" : data[0].invite_code}/>
</div>
</div> </div>
{data[0].invite_code === null || data[0].invite_code === undefined ? {data[0].invite_code === null || data[0].invite_code === undefined ?
<i className="regitemimgs3 iconfont icon-fuzhi1 font-14 font-n" <i className="regitemimgs3 iconfont icon-fuzhi1 font-14 font-n"

@ -41,6 +41,8 @@ class Competitions extends Component {
} }
componentDidMount(){ componentDidMount(){
console.log("Competitions竞赛");
console.log(this.props);
window.document.title = '竞赛'; window.document.title = '竞赛';
} }

Loading…
Cancel
Save