|
|
|
@ -51,7 +51,7 @@ class Infos extends Component{
|
|
|
|
|
super(props);
|
|
|
|
|
this.state={
|
|
|
|
|
data:undefined,
|
|
|
|
|
is_current:true,
|
|
|
|
|
is_current:undefined,
|
|
|
|
|
is_edit:false,
|
|
|
|
|
sign:undefined,
|
|
|
|
|
type:0,
|
|
|
|
@ -93,6 +93,7 @@ class Infos extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取个人主页信息
|
|
|
|
|
getInfo = (user_login) =>{
|
|
|
|
|
let url =`/users/${user_login}/homepage_info.json`;
|
|
|
|
@ -219,18 +220,25 @@ class Infos extends Component{
|
|
|
|
|
render(){
|
|
|
|
|
let {
|
|
|
|
|
data ,
|
|
|
|
|
is_current,
|
|
|
|
|
is_edit,
|
|
|
|
|
sign,
|
|
|
|
|
type,
|
|
|
|
|
followed,
|
|
|
|
|
id,
|
|
|
|
|
login,
|
|
|
|
|
isRenders,
|
|
|
|
|
moduleName,
|
|
|
|
|
next_gold
|
|
|
|
|
}=this.state;
|
|
|
|
|
|
|
|
|
|
let isCurrent = true;
|
|
|
|
|
let currentLogin;
|
|
|
|
|
if(this.props.current_user && this.props.current_user.login != this.props.match.params.username){
|
|
|
|
|
isCurrent=false;
|
|
|
|
|
currentLogin = this.props.current_user.login;
|
|
|
|
|
}
|
|
|
|
|
const _commonProps = {
|
|
|
|
|
is_current: isCurrent,
|
|
|
|
|
login: currentLogin
|
|
|
|
|
}
|
|
|
|
|
return(
|
|
|
|
|
<div className="newMain">
|
|
|
|
|
{this.state.updata===undefined?"":<UpgradeModals
|
|
|
|
@ -242,6 +250,7 @@ class Infos extends Component{
|
|
|
|
|
<InfosBanner
|
|
|
|
|
{...this.props}
|
|
|
|
|
{...this.state}
|
|
|
|
|
{..._commonProps}
|
|
|
|
|
signFor={this.signFor}
|
|
|
|
|
followPerson={this.followPerson}
|
|
|
|
|
></InfosBanner>
|
|
|
|
@ -255,7 +264,7 @@ class Infos extends Component{
|
|
|
|
|
{/* http://localhost:3007/courses/1309/homework/9300/setting */}
|
|
|
|
|
<Route exact path="/users/:username/package"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<InfosPackage {...this.props} {...props} {...this.state} />)
|
|
|
|
|
(props) => (<InfosPackage {...this.props} {...props} {...this.state} {..._commonProps}/>)
|
|
|
|
|
}
|
|
|
|
|
></Route>
|
|
|
|
|
|
|
|
|
@ -263,42 +272,42 @@ class Infos extends Component{
|
|
|
|
|
{/* http://localhost:3007/courses/1309/homework/9300/setting */}
|
|
|
|
|
<Route exact path="/users/:username/courses"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<InfosCourse {...this.props} {...props} {...this.state} />)
|
|
|
|
|
(props) => (<InfosCourse {...this.props} {...props} {...this.state} {..._commonProps}/>)
|
|
|
|
|
}
|
|
|
|
|
></Route>
|
|
|
|
|
|
|
|
|
|
{/* 实训 */}
|
|
|
|
|
<Route exact path="/users/:username/shixuns"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<InfosShixun {...this.props} {...props} {...this.state} />)
|
|
|
|
|
(props) => (<InfosShixun {...this.props} {...props} {...this.state} {..._commonProps}/>)
|
|
|
|
|
}
|
|
|
|
|
></Route>
|
|
|
|
|
|
|
|
|
|
{/* 实训课程 */}
|
|
|
|
|
<Route exact path="/users/:username/paths"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<InfosPath {...this.props} {...props} {...this.state} />)
|
|
|
|
|
(props) => (<InfosPath {...this.props} {...props} {...this.state} {..._commonProps}/>)
|
|
|
|
|
}
|
|
|
|
|
></Route>
|
|
|
|
|
|
|
|
|
|
{/* 项目 */}
|
|
|
|
|
<Route exact path="/users/:username/projects"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<InfosProject {...this.props} {...props} {...this.state} />)
|
|
|
|
|
(props) => (<InfosProject {...this.props} {...props} {...this.state} {..._commonProps}/>)
|
|
|
|
|
}
|
|
|
|
|
></Route>
|
|
|
|
|
|
|
|
|
|
{/* 项目 */}
|
|
|
|
|
<Route exact path="/users/:username/videoes"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<InfosVideo {...this.props} {...props} {...this.state} />)
|
|
|
|
|
(props) => (<InfosVideo {...this.props} {...props} {...this.state} {..._commonProps}/>)
|
|
|
|
|
}
|
|
|
|
|
></Route>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Route exact path="/users/:username"
|
|
|
|
|
render={
|
|
|
|
|
(props) => (<InfosCourse {...this.props} {...props} {...this.state} />)
|
|
|
|
|
(props) => (<InfosCourse {...this.props} {...props} {...this.state} {..._commonProps}/>)
|
|
|
|
|
}
|
|
|
|
|
></Route>
|
|
|
|
|
|
|
|
|
|