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 =()=>{