From 7ccc549ccd336422fff3a5e75b86d08211da7834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 30 Jul 2019 16:57:27 +0800 Subject: [PATCH] b --- .../PackageIndexNEIBannerConcent.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js index ab362b812..a7e998fea 100644 --- a/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js +++ b/public/react/src/modules/projectPackages/PackageIndexNewandEdit/PackageIndexNEIBannerConcent.js @@ -94,9 +94,6 @@ class PackageIndexNEIBannerConcent extends Component { }) }else{ console.log(this.props.current_user&&this.props.current_user.username) - this.setState({ - contact_name:this.props.current_user&&this.props.current_user.username - }) } let Url = `/project_package_categories.json`; @@ -114,16 +111,23 @@ class PackageIndexNEIBannerConcent extends Component { console.log(error) }) + this.setState({ + contact_name:this.props.current_user&&this.props.current_user.username + }) + // this.contentMdRef.current.setValue("测试赋值") } componentDidUpdate = (prevProps) => { + if(prevProps.current_user.username != this.props.current_user.username){ - console.log(this.props.current_user) + if(this.props.current_user!=undefined){ this.setState({ contact_name:this.props.current_user.username }) + } } + } //获取验证码; getverificationcode =()=>{