From 38c2061d8b6a4d2435ba91558b342e987f6bcffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 26 Jul 2019 18:29:06 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/login/LoginDialog.js | 5 +--- .../modules/user/LoginRegisterComponent.js | 22 +++++++------- .../react/src/modules/user/Notcompletedysl.js | 30 +++++++++++-------- 3 files changed, 30 insertions(+), 27 deletions(-) diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index a4dee4b4c..50038366d 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -367,10 +367,7 @@ class LoginDialog extends Component { description:response.data.message, }); }else{ - if(response.data.profile_completed !== null || response.data.profile_completed === false){ - this.setMyEduCoderModals(); - return; - } + broadcastChannelPostMessage('refreshPage') this.setState({ diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index 9b1533bea..9006dc64c 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -340,10 +340,10 @@ class LoginRegisterComponent extends Component { } - if(response.data.profile_completed !== null || response.data.profile_completed === false){ - this.setMyEduCoderModals(); - return; - } + // if(response.data.profile_completed !== null || response.data.profile_completed === false){ + // this.setMyEduCoderModals(); + // return; + // } if (response.status === 200) { if (response.data.status === 402) { @@ -458,13 +458,13 @@ class LoginRegisterComponent extends Component { return; } }else { - this.setState({ - logins: "", - dragOk: false, - codes: "", - passwords: "", - Agreetotheterms: "", - }) + // this.setState({ + // logins: "", + // dragOk: false, + // codes: "", + // passwords: "", + // Agreetotheterms: "", + // }) this.setMyEduCoderModals(); } } diff --git a/public/react/src/modules/user/Notcompletedysl.js b/public/react/src/modules/user/Notcompletedysl.js index f9c260209..e15a118ff 100644 --- a/public/react/src/modules/user/Notcompletedysl.js +++ b/public/react/src/modules/user/Notcompletedysl.js @@ -16,19 +16,25 @@ class Notcompletedysl extends Component { // console.log("Notcompletedysl"); // console.log("开发了402了"); - axios.interceptors.response.use((response) => { - // console.log(response); - if (response != undefined) - if (response && response.data.status === 402) { - this.setState({ - modalsType: true - }) - } - return response; - }, (error) => { - //TODO 这里如果样式变了会出现css不加载的情况 + if(this.props.modalsType!=undefined){ + this.setState({ + modalsType:this.props.modalsType + }) + } - }); + // axios.interceptors.response.use((response) => { + // // console.log(response); + // if (response != undefined) + // if (response && response.data.status === 402) { + // this.setState({ + // modalsType: true + // }) + // } + // return response; + // }, (error) => { + // //TODO 这里如果样式变了会出现css不加载的情况 + // + // }); } From a5e1645c38e797315f0dd4c91d6ca33481e640f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 26 Jul 2019 18:37:07 +0800 Subject: [PATCH 2/6] b --- public/react/src/modules/user/LoginRegisterComponent.js | 4 ++-- public/react/src/modules/user/Notcompletedysl.js | 8 +------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/public/react/src/modules/user/LoginRegisterComponent.js b/public/react/src/modules/user/LoginRegisterComponent.js index 9006dc64c..3f54149bf 100644 --- a/public/react/src/modules/user/LoginRegisterComponent.js +++ b/public/react/src/modules/user/LoginRegisterComponent.js @@ -1038,10 +1038,10 @@ class LoginRegisterComponent extends Component { :
} -