From 68fa947dd2fc9747d833a2b2a3daefc34af492ec 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, 10 Jan 2020 18:19:58 +0800 Subject: [PATCH] =?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/AppConfig.js | 2 +- .../react/src/modules/forums/MemoDetailMDEditor.js | 2 +- public/react/src/modules/tpm/TPMIndexHOC.js | 14 +++++++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index 5f870b683..4e500334e 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -42,7 +42,7 @@ if (isDev) { // 老师 //debugType="teacher"; // 学生 -//debugType="student"; +debugType="student"; function railsgettimes(proxy) { diff --git a/public/react/src/modules/forums/MemoDetailMDEditor.js b/public/react/src/modules/forums/MemoDetailMDEditor.js index b8bcc47fb..29bb08833 100644 --- a/public/react/src/modules/forums/MemoDetailMDEditor.js +++ b/public/react/src/modules/forums/MemoDetailMDEditor.js @@ -80,7 +80,7 @@ class MemoDetailMDEditor extends Component { return } if(this.props.checkIfProfileCompleted()===false){ - this.props.showhideAccountPhoneemailDialog() + this.props.showaccountprofileDialog() return } const content = this.commentMDEditor.getValue(); diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index 363acdba1..7d37ea073 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -396,7 +396,7 @@ export function TPMIndexHOC(WrappedComponent) { }); } - + fetchUser = () => { let url = `/users/get_user_info.json` let courseId; @@ -590,6 +590,17 @@ export function TPMIndexHOC(WrappedComponent) { checkIfProfileCompleted = () => { return this.state.current_user && this.state.current_user.profile_completed } + + showaccountprofileDialog = () => { + this.dialogObj = { + content: '您需要去完成您的个人资料,才能使用此功能', + okText: '立即完成', + okHref: '/account/profile' + } + this.setState({ + AccountProfiletype: true, + }) + } showProfessionalCertificationDialog = () => { this.dialogObj = { content: '您需要去完成您的职业认证,才能使用此功能', @@ -713,6 +724,7 @@ export function TPMIndexHOC(WrappedComponent) { showProfileCompleteDialog: this.showProfileCompleteDialog, showhideAccountPhoneemailDialog:this.showhideAccountPhoneemailDialog, checkIfProfileCompleted: this.checkIfProfileCompleted, + showaccountprofileDialog:this.showaccountprofileDialog, checkIfProfessionalCertification: this.checkIfProfessionalCertification, showProfessionalCertificationDialog: this.showProfessionalCertificationDialog,