未登录不弹框

This commit is contained in:
caishi 2021-03-22 14:19:50 +08:00
parent 83086e7d61
commit 98289b05aa
2 changed files with 9 additions and 7 deletions

View File

@ -437,7 +437,7 @@ body>.-task-title {
border: none;
padding: 0px;
}
.newFooter .module-list>a {
.newFooter .module-list a {
display: block;
color: #bbb;
line-height: 34px;

View File

@ -169,12 +169,14 @@ export function TPMIndexHOC(WrappedComponent) {
if (this.props.match.path === "/" && response.data.login) {
this.props.history.push(`/users/${response.data.login}`);
}
if(!response.data.has_gitea_user || (response.data.has_gitea_user && !response.data.is_sync_pwd)){
this.setState({
giteaVisible:true,
email:response.data.email,
is_sync_pwd:response.data.is_sync_pwd
})
if(response.data && response.data.login){
if(!response.data.has_gitea_user || (response.data.has_gitea_user && !response.data.is_sync_pwd)){
this.setState({
giteaVisible:true,
email:response.data.email,
is_sync_pwd:response.data.is_sync_pwd
})
}
}
}
}).catch((error) => {