第三方登录-修改邮箱和密码
This commit is contained in:
parent
648c6e235b
commit
ab052ebace
|
@ -0,0 +1,9 @@
|
||||||
|
.ant-modal-mask{
|
||||||
|
z-index: 10000;
|
||||||
|
}
|
||||||
|
.ant-modal-wrap{
|
||||||
|
z-index: 10001;
|
||||||
|
.ant-form-explain{
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
}
|
|
@ -35,19 +35,14 @@ function EducoderAccount({form , visible , onOk , email}){
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<p className="mb15 edu-txt-center" style={{maxWidth:"350px",margin:"0px auto"}}>
|
<p className="mb15 edu-txt-center" style={{maxWidth:"350px",margin:"0px auto"}}>
|
||||||
{
|
为确保您能正常使用平台功能,请确认以下信息:
|
||||||
email ?
|
|
||||||
`平台已检测到您已绑定邮箱${email},请您确认如下操作`
|
|
||||||
:
|
|
||||||
"平台已检测到您未绑定邮箱,为不影响使用协同开发功能,请先绑定邮箱"
|
|
||||||
}
|
|
||||||
</p>
|
</p>
|
||||||
<Form {...layout}>
|
<Form {...layout}>
|
||||||
<Form.Item label="邮箱">
|
<Form.Item label="邮箱">
|
||||||
{getFieldDecorator("email",{
|
{getFieldDecorator("email",{
|
||||||
rules:[{required:true,message:"请输入邮箱账号"}]
|
rules:[{required:true,message:"请输入邮箱账号"}]
|
||||||
})(
|
})(
|
||||||
<Input placeholder="请输入您的邮箱账号" width="220px" disabled={email}/>
|
<Input placeholder="请输入您的邮箱账号" width="220px"/>
|
||||||
)}
|
)}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="密码">
|
<Form.Item label="密码">
|
||||||
|
|
|
@ -29,7 +29,7 @@ export function TPMIndexHOC(WrappedComponent) {
|
||||||
dataquerys: {},
|
dataquerys: {},
|
||||||
isloginCancel: undefined,
|
isloginCancel: undefined,
|
||||||
mygetHelmetapi: null,
|
mygetHelmetapi: null,
|
||||||
giteaVisible:true,
|
giteaVisible:false,
|
||||||
email:undefined
|
email:undefined
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -168,6 +168,14 @@ export function TPMIndexHOC(WrappedComponent) {
|
||||||
if (this.props.match.path === "/" && response.data.login) {
|
if (this.props.match.path === "/" && response.data.login) {
|
||||||
this.props.history.push(`/users/${response.data.login}`);
|
this.props.history.push(`/users/${response.data.login}`);
|
||||||
}
|
}
|
||||||
|
if(response.data && response.data.login){
|
||||||
|
if(response.data.need_edit_info){
|
||||||
|
this.setState({
|
||||||
|
giteaVisible:true,
|
||||||
|
email:response.data.email
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
|
@ -348,10 +356,24 @@ export function TPMIndexHOC(WrappedComponent) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onOk=()=>{
|
onOk =(values)=>{
|
||||||
|
let url = `/users/sync_user_info.json`;
|
||||||
|
const { current_user } = this.state;
|
||||||
|
axios.post(url,{
|
||||||
|
login:current_user && current_user.login,
|
||||||
|
...values
|
||||||
|
}).then(result=>{
|
||||||
|
if(result && result.data && result.data.status === 0){
|
||||||
|
this.setState({
|
||||||
|
giteaVisible:false,
|
||||||
|
email:undefined
|
||||||
|
})
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
|
}).catch(error=>{})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let { Footerdown, isRender, AccountProfiletype, AccountPhoneemailtype, current_user , giteaVisible , email } = this.state;
|
let { Footerdown, isRender, AccountProfiletype, AccountPhoneemailtype, current_user , giteaVisible , email } = this.state;
|
||||||
const common = {
|
const common = {
|
||||||
|
|
Loading…
Reference in New Issue