路由回调为newcompetitions

dev_auth
杨树明 5 years ago
parent 803c92d509
commit 94fdd66cf2

@ -486,7 +486,7 @@ class App extends Component {
{/*/!*众包创新*!/*/}
{/*<Route path={"/crowdsourcing"} component={ProjectPackages}/>*/}
{/*竞赛*/}
<Route path={"/competitions"}
<Route path={"/newcompetitions"}
render={
(props) => {

@ -814,9 +814,9 @@ class Registration extends React.Component {
<div style={{marginBottom: '12px'}}>
<Breadcrumb separator=">">
<Breadcrumb.Item><Link to={"/competitions"}>在线竞赛</Link></Breadcrumb.Item>
<Breadcrumb.Item><Link to={"/newcompetitions"}>在线竞赛</Link></Breadcrumb.Item>
<Breadcrumb.Item><Link
to={`/competitions/${this.props.match.params.identifier}/common_header`}>{competition_name === undefined || competition_name === null || competition_name === "" ? "全国高校计算机大赛" : competition_name}</Link></Breadcrumb.Item>
to={`/newcompetitions/${this.props.match.params.identifier}/common_header`}>{competition_name === undefined || competition_name === null || competition_name === "" ? "全国高校计算机大赛" : competition_name}</Link></Breadcrumb.Item>
{/*<Breadcrumb.Item*/}
{/* href={`/competitions/${this.props.match.params.identifier}/common_header`}></Breadcrumb.Item>*/}
<Breadcrumb.Item>报名</Breadcrumb.Item>

@ -304,7 +304,7 @@ class PersonalCompetititem extends React.Component {
>
<div className="regitemimgs555">
<a
href={`/competitions/${this.props.match.params.identifier}/competition_teams/${item.id}`}
href={`/newcompetitions/${this.props.match.params.identifier}/competition_teams/${item.id}`}
style={{
color: "#459be5",
width: "100%",
@ -364,7 +364,7 @@ class PersonalCompetititem extends React.Component {
>
<div className="regitemimgs555">
<a
href={`/competitions/${this.props.match.params.identifier}/competition_teams/${item.id}`}
href={`/newcompetitions/${this.props.match.params.identifier}/competition_teams/${item.id}`}
style={{
color: "#459be5",
width: "100%",

@ -124,7 +124,7 @@ class CompetitionsIndex extends Component{
size="large"
dataSource={datas&&datas}
renderItem={(item,key) => (
<a href={item.competition_status==="ended"?`/competitions/${item.identifier}/common_header`:item.competition_status==="nearly_published"? this.props.current_user&&this.props.current_user.business===true?`/competitions/${item.identifier}/common_header`:this.props.current_user&&this.props.current_user.admin===true?`/competitions/${item.identifier}/common_header`:null:item.competition_status==="progressing"?`/competitions/${item.identifier}/common_header`:null}
<a href={item.competition_status==="ended"?`/newcompetitions/${item.identifier}/common_header`:item.competition_status==="nearly_published"? this.props.current_user&&this.props.current_user.business===true?`/newcompetitions/${item.identifier}/common_header`:this.props.current_user&&this.props.current_user.admin===true?`/newcompetitions/${item.identifier}/common_header`:null:item.competition_status==="progressing"?`/newcompetitions/${item.identifier}/common_header`:null}
className={item.competition_status==="ended"?"competitionstitlesshou":item.competition_status==="nearly_published"?
this.props.current_user&&this.props.current_user.admin===true?"competitionstitlesshou":this.props.current_user&&this.props.current_user.business===true?"competitionstitlesshou":"endedfont":"competitionstitlesshou"}
>
@ -182,7 +182,7 @@ class CompetitionsIndex extends Component{
title={<a className={item.competition_status==="ended"?"competitionstitlesshou":item.competition_status==="nearly_published"?
this.props.current_user&&this.props.current_user.admin===true?"competitionstitlesshou":this.props.current_user&&this.props.current_user.business===true?"competitionstitlesshou":"endedfont":"competitionstitlesshou"}>
<a className={"competitionstitles"}
href={item.competition_status==="ended"?`/competitions/${item.identifier}/common_header`:item.competition_status==="nearly_published"? this.props.current_user&&this.props.current_user.business===true?`/competitions/${item.identifier}/common_header`:this.props.current_user&&this.props.current_user.admin===true?`/competitions/${item.identifier}/common_header`:null:item.competition_status==="progressing"?`/competitions/${item.identifier}/common_header`:null}
href={item.competition_status==="ended"?`/newcompetitions/${item.identifier}/common_header`:item.competition_status==="nearly_published"? this.props.current_user&&this.props.current_user.business===true?`/newcompetitions/${item.identifier}/common_header`:this.props.current_user&&this.props.current_user.admin===true?`/newcompetitions/${item.identifier}/common_header`:null:item.competition_status==="progressing"?`/newcompetitions/${item.identifier}/common_header`:null}
>{item.name}{item.sub_title===null?"":`——${item.sub_title}`}</a>
{/*<span>{item.sub_title===null?"":*/}
{/*<Tag className="competitionsrelative" color="#87d068">{item.sub_title}</Tag>}*/}

@ -241,8 +241,8 @@ class Competitionteams extends Component{
<div className={"educontent clearfix mt20 "}>
<Breadcrumb separator=">">
<Breadcrumb.Item><Link to={"/competitions"}>{data&&data.name}</Link></Breadcrumb.Item>
<Breadcrumb.Item><Link to={`/competitions/${this.props.match.params.identifier}/enroll`}>报名</Link></Breadcrumb.Item>
<Breadcrumb.Item><Link to={"/newcompetitions"}>{data&&data.name}</Link></Breadcrumb.Item>
<Breadcrumb.Item><Link to={`/newcompetitions/${this.props.match.params.identifier}/enroll`}>报名</Link></Breadcrumb.Item>
<Breadcrumb.Item>战队详情</Breadcrumb.Item>
</Breadcrumb>

@ -240,7 +240,7 @@ class CompetitionCommon extends Component{
data===undefined?"":<div className={"educontent clearfix mt20 "}>
<Breadcrumb separator=">">
<Breadcrumb.Item><Link to={"/competitions"}>在线竞赛</Link></Breadcrumb.Item>
<Breadcrumb.Item><Link to={"/newcompetitions"}>在线竞赛</Link></Breadcrumb.Item>
<Breadcrumb.Item>{data&&data.name}</Breadcrumb.Item>
</Breadcrumb>
@ -284,7 +284,7 @@ class CompetitionCommon extends Component{
<div className="gutter-box CompetitionsIndexbottomvalue Competitioncolor516">{data.competition_status==="nearly_published"?"--":data&&data.visits_count}</div>
</Col>
<Col className="gutter-row rankbeicenter" span={6}>
<div className="gutter-box CompetitionsIndexbottomvalue Competitioncolor516" onClick={data.competition_status==="nearly_published"?"":()=>this.gotocourse(`/competitions/${this.props.match.params.identifier}/enroll`)}>{data.competition_status==="nearly_published"?"--":data&&data.member_count}</div>
<div className="gutter-box CompetitionsIndexbottomvalue Competitioncolor516" onClick={data.competition_status==="nearly_published"?"":()=>this.gotocourse(`/newcompetitions/${this.props.match.params.identifier}/enroll`)}>{data.competition_status==="nearly_published"?"--":data&&data.member_count}</div>
</Col>
</Row>
</Col>
@ -317,7 +317,7 @@ class CompetitionCommon extends Component{
报名截止
</Button>:
data.competition_status==="progressing"?<Button type="primary" block className={"Competitionfontsize22"}>
{data.mode===2?<a onClick={()=>this.gotocourse()}>立即报名</a>:<a onClick={()=>this.gotocourse(`/competitions/${this.props.match.params.identifier}/enroll`)}></a>}
{data.mode===2?<a onClick={()=>this.gotocourse()}>立即报名</a>:<a onClick={()=>this.gotocourse(`/newcompetitions/${this.props.match.params.identifier}/enroll`)}></a>}
</Button>:""}
</Col>
<Col className={"mt10 Competitionfontsize16"}>{data&&data.enroll_end_time===null?"":`报名截止时间:${data&&data.enroll_end_time}`}</Col>

@ -68,7 +68,7 @@ class CompetitionContents extends Component{
const operations = <div>
<Button className={"fr"} type="primary" ghost onClick={()=>this.props.Competitionedit()}>编辑</Button>
<Button className={"fr mr20"} type="primary" ghost>
<a onClick={()=>this.derivefun(`/competitions/${this.props.match.params.identifier}/charts.xlsx`)}>导出</a>
<a onClick={()=>this.derivefun(`/newcompetitions/${this.props.match.params.identifier}/charts.xlsx`)}>导出</a>
</Button>
</div>
const columns = [

@ -53,7 +53,7 @@ class Competitions extends Component {
<Switch>
{/*新版竞赛战队详情*/}
<Route path="/competitions/:identifier/competition_teams/:competition_team_id"
<Route path="/newcompetitions/:identifier/competition_teams/:competition_team_id"
render={
(props) => (<CompetitionTeams {...this.props} {...props} {...this.state} />)
}
@ -62,21 +62,21 @@ class Competitions extends Component {
{/*新版竞赛报名*/}
<Route
path="/competitions/:identifier/enroll"
path="/newcompetitions/:identifier/enroll"
render={
(props) => (<Registration {...this.props} {...props} {...this.state}/>)
}
/>
{/*新版竞赛详情页面*/}
<Route path="/competitions/:identifier/common_header"
<Route path="/newcompetitions/:identifier/common_header"
render={
(props) => (<CompetitionCommon {...this.props} {...props} {...this.state} />)
}
></Route>
{/*新版竞赛首页*/}
<Route path="/competitions"
<Route path="/newcompetitions"
render={
(props) => (<CompetitionsIndex {...this.props} {...props} {...this.state} />)
}

Loading…
Cancel
Save