邮箱弹框点击事件

This commit is contained in:
caishi 2021-06-11 17:21:11 +08:00 committed by caishi
parent a209b29100
commit 2d79d144a0
1 changed files with 8 additions and 4 deletions

View File

@ -181,10 +181,11 @@ export function TPMIndexHOC(WrappedComponent) {
}
}
if(response.data && response.data.login){
if(response.data.need_edit_info){
if(!response.data.has_gitea_user || (response.data.has_gitea_user && !response.data.is_sync_pwd)){
this.setState({
giteaVisible:true,
email:response.data.email
email:response.data.email,
is_sync_pwd:response.data.is_sync_pwd
})
}
}
@ -212,8 +213,11 @@ export function TPMIndexHOC(WrappedComponent) {
}
onOk =(values)=>{
let url = `/users/sync_user_info.json`;
const { current_user } = this.state;
let url = `/accounts/gitea_register.json`;
const { email , current_user , is_sync_pwd } = this.state;
if(email && !is_sync_pwd){
url = `/users/change_password.json`;
}
axios.post(url,{
login:current_user && current_user.login,
...values