From ab052ebacea9538296465d56c73ff6e274e5f803 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 2 Apr 2021 18:40:59 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=AC=E4=B8=89=E6=96=B9=E7=99=BB=E5=BD=95-?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=82=AE=E7=AE=B1=E5=92=8C=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Component/EAccount.scss | 9 ++++++++ src/forge/Component/EducoderAccount.jsx | 9 ++------ src/modules/tpm/TPMIndexHOC.js | 28 ++++++++++++++++++++++--- 3 files changed, 36 insertions(+), 10 deletions(-) create mode 100644 src/forge/Component/EAccount.scss diff --git a/src/forge/Component/EAccount.scss b/src/forge/Component/EAccount.scss new file mode 100644 index 00000000..6f0bb97f --- /dev/null +++ b/src/forge/Component/EAccount.scss @@ -0,0 +1,9 @@ +.ant-modal-mask{ + z-index: 10000; +} +.ant-modal-wrap{ + z-index: 10001; + .ant-form-explain{ + position: absolute; + } +} \ No newline at end of file diff --git a/src/forge/Component/EducoderAccount.jsx b/src/forge/Component/EducoderAccount.jsx index b9b2f7af..51fe0ded 100644 --- a/src/forge/Component/EducoderAccount.jsx +++ b/src/forge/Component/EducoderAccount.jsx @@ -35,19 +35,14 @@ function EducoderAccount({form , visible , onOk , email}){ >

- { - email ? - `平台已检测到您已绑定邮箱${email},请您确认如下操作` - : - "平台已检测到您未绑定邮箱,为不影响使用协同开发功能,请先绑定邮箱" - } + 为确保您能正常使用平台功能,请确认以下信息:

{getFieldDecorator("email",{ rules:[{required:true,message:"请输入邮箱账号"}] })( - + )} diff --git a/src/modules/tpm/TPMIndexHOC.js b/src/modules/tpm/TPMIndexHOC.js index 0dabc332..87c9a03f 100644 --- a/src/modules/tpm/TPMIndexHOC.js +++ b/src/modules/tpm/TPMIndexHOC.js @@ -29,7 +29,7 @@ export function TPMIndexHOC(WrappedComponent) { dataquerys: {}, isloginCancel: undefined, mygetHelmetapi: null, - giteaVisible:true, + giteaVisible:false, email:undefined } } @@ -168,6 +168,14 @@ export function TPMIndexHOC(WrappedComponent) { if (this.props.match.path === "/" && 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) => { 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() { let { Footerdown, isRender, AccountProfiletype, AccountPhoneemailtype, current_user , giteaVisible , email } = this.state; const common = {