forked from Gitlink/forgeplus-react
邮箱弹框点击事件
This commit is contained in:
parent
a209b29100
commit
2d79d144a0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue