竞赛跳转

issues25489
杨树林 6 years ago
parent 57d2d5ffd3
commit d47d37301b

@ -50,6 +50,7 @@ class CompetitionCommon extends Component{
//获取头部信息 //获取头部信息
getbannerdata=()=>{ getbannerdata=()=>{
debugger
let menuid=this.props.location.search.replace('?menu=', ''); let menuid=this.props.location.search.replace('?menu=', '');
let url=`/competitions/${this.props.match.params.identifier}/common_header.json`; let url=`/competitions/${this.props.match.params.identifier}/common_header.json`;
axios.get(url).then((response) => { axios.get(url).then((response) => {
@ -83,7 +84,8 @@ class CompetitionCommon extends Component{
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
}) })
console.log("CompetitionCommonCompetitionCommon");
console.log(this.props.user);
if (this.props.user && this.props.user.login != "") { if (this.props.user && this.props.user.login != "") {
const zul = `/competitions/${this.props.match.params.identifier}/competition_staff.json`; const zul = `/competitions/${this.props.match.params.identifier}/competition_staff.json`;
axios.get((zul)).then((result) => { axios.get((zul)).then((result) => {

@ -280,7 +280,7 @@ class Infos extends Component{
} }
></Route> ></Route>
{/* 实训 */} {/* 实训项目 */}
<Route exact path="/users/:username/shixuns" <Route exact path="/users/:username/shixuns"
render={ render={
(props) => (<InfosShixun {...this.props} {...props} {...this.state} {..._commonProps}/>) (props) => (<InfosShixun {...this.props} {...props} {...this.state} {..._commonProps}/>)
@ -294,7 +294,7 @@ class Infos extends Component{
} }
></Route> ></Route>
{/* 项目 */} {/* 开发项目 */}
<Route exact path="/users/:username/projects" <Route exact path="/users/:username/projects"
render={ render={
(props) => (<InfosProject {...this.props} {...props} {...this.state} {..._commonProps}/>) (props) => (<InfosProject {...this.props} {...props} {...this.state} {..._commonProps}/>)

@ -45,6 +45,7 @@ class InfosShixun extends Component{
status, status,
sort_by, sort_by,
page, page,
sort_direction,
per_page:this.props.is_current && category && page ==1?17:16 per_page:this.props.is_current && category && page ==1?17:16
}}).then((result)=>{ }}).then((result)=>{
if(result){ if(result){

Loading…
Cancel
Save