Merge pull request '登录后如果打开首页,第一次默认进入个人详情页' (#355) from tongChong/forgeplus-react:hotfix_gitlink into gitlink_server

This commit is contained in:
xxq250 2022-04-06 14:36:49 +08:00
commit 87f26db26d
1 changed files with 4 additions and 7 deletions

View File

@ -176,13 +176,10 @@ export function TPMIndexHOC(WrappedComponent) {
email:response.data.email
})
}
}
if(response.data && response.data.login){
if(response.data.need_edit_info){
this.setState({
giteaVisible:true,
email:response.data.email
})
// 如果处于登录状态,且刚刚打开,那么跳到个人主页
if(this.props.match.path === "/" && this.props.history.length===2){
debugger
this.props.history.push(`/${response.data.login}`)
}
}
}