dev_forum
杨树林 6 years ago
parent 4dbd560f1b
commit a2d2590ec2

@ -274,7 +274,7 @@ class App extends Component {
<Switch>
{/*<Route path="/login" component={LoginRegisterPage}/>*/}
{/*认证*/}
<Route path="/profile" component={AccountPage}/>
<Route path="/account" component={AccountPage}/>
{/*403*/}
<Route path="/403" component={Shixunauthority}/>

@ -754,7 +754,7 @@ submittojoinclass=(value)=>{
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/shixuns`}>我的实训</Link></li>
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/paths`}>我的实践课程</Link></li>
<li><Link to={`/users/${this.props.current_user===undefined?"":this.props.current_user.login}/projects`}>我的项目</Link></li>
<li><a href={`/profile/basic`}>账号管理</a></li>
<li><a href={`/account/profile`}>账号管理</a></li>
{/*<li><a onClick={()=>this.educoderlogin()} >登入测试接口</a></li>*/}
{/*<li><a onClick={()=>this.trialapplications()} >试用申请</a> </li>*/}
{/*<li><Link to={`/interest`}>兴趣页</Link></li>*/}

@ -55,7 +55,7 @@ class AccountPage extends Component {
axios.get(url).then((result)=>{
if(result.data){
if(result.data && result.data.base_info_completed == false){
this.props.history.push(`/profile/basic/edit`);
this.props.history.push(`/account/profile/edit`);
}
this.setState({
basicInfo: Object.assign({}, {...result.data}, { avatar_url: `${result.data.avatar_url}?t=${new Date().getTime()}`})
@ -79,30 +79,30 @@ class AccountPage extends Component {
<AccountNav {...this.props} {...common}></AccountNav>
<div className="basicFormWrap">
<Switch {...this.props}>
<Route exact path="/profile/basic"
<Route exact path="/account/profile"
render={
(props) => (<AccountBasic {...this.props} {...props} {...this.state} {...common} />)
}
></Route>
<Route exact path="/profile/basic/edit"
<Route exact path="/account/profile/edit"
render={
(props) => (<AccountBasicEdit {...this.props} {...props} {...this.state} {...common} />)
}
></Route>
<Route exact path="/profile/certification"
<Route exact path="/account/certification"
render={
(props) => (<AccountCertification {...this.props} {...props} {...this.state} {...common} />)
}
></Route>
<Route exact path="/profile/secure"
<Route exact path="/account/secure"
render={
(props) => (<AccountSecure {...this.props} {...props} {...this.state} {...common} />)
}
></Route>
<Route exact path="/profile"
<Route exact path="/account"
render={
(props) => (<AccountBasic {...this.props} {...props} {...this.state} {...common} />)
}

@ -54,7 +54,7 @@ class AccountBasicEdit extends Component {
<div className="titleWrap">
<div className="title">基本信息</div>
<Button type="primary" style={{ marginRight: '16px'}}
ghost onClick={() => this.props.history.push('/profile/basic/edit')}>修改</Button>
ghost onClick={() => this.props.history.push('/account/profile/edit')}>修改</Button>
</div>
<Form onSubmit={this.handleSubmit}>

@ -4,19 +4,19 @@ import { SnackbarHOC, getImageUrl } from 'educoder';
import AccountImg from './AccountImg'
class AccountNav extends Component {
toBasic = () => {
this.props.history.push(`/profile/basic`)
this.props.history.push(`/account/profile`)
}
toCertification = () => {
this.props.history.push(`/profile/certification`)
this.props.history.push(`/account/certification`)
}
toSecure = () => {
this.props.history.push(`/profile/secure`)
this.props.history.push(`/account/secure`)
}
render() {
let { basicInfo } = this.props
console.log(this.props);
const path = window.location.pathname
const isBasic = path.indexOf('basic') != -1 || path == "/profile"
const isBasic = path.indexOf('basic') != -1 || path == "/account"
const isCertification = path.indexOf('certification') != -1
const isSecure = path.indexOf('secure') != -1
return (

Loading…
Cancel
Save