认证重新渲染

dev_forum
caishi 6 years ago
parent aabb2886f0
commit 15545fab0f

@ -801,10 +801,10 @@ a.white-btn.use_scope-btn:hover{
position: absolute; position: absolute;
} }
.ant-input{ .ant-input,.ant-input .ant-input-suffix{
background-color: #fafafa!important; background-color: #fafafa!important;
} }
.ant-input:focus{ .ant-input:focus,.ant-input:focus .ant-input-suffix{
background-color:#ffffff!important; background-color:#ffffff!important;
} }

@ -16,7 +16,7 @@ class AccountCertification extends Component {
showRealNameCertificationModal = (index) => { showRealNameCertificationModal = (index) => {
this.setState({ this.setState({
certification:index certification:index,
}) })
this.realNameCertificationModal.setVisible(true) this.realNameCertificationModal.setVisible(true)
} }
@ -25,9 +25,11 @@ class AccountCertification extends Component {
let {basicInfo} = this.props; let {basicInfo} = this.props;
return ( return (
<div> <div>
<RealNameCertificationModal ref="realNameCertificationModal" {...this.props} {this.state.certification===1?<RealNameCertificationModal ref="realNameCertificationModal" {...this.props}
wrappedComponentRef={(form) => this.realNameCertificationModal = form} certification={certification} wrappedComponentRef={(form) => this.realNameCertificationModal = form} certification={certification}
></RealNameCertificationModal> ></RealNameCertificationModal>:<RealNameCertificationModal ref="realNameCertificationModal" {...this.props}
wrappedComponentRef={(form) => this.realNameCertificationModal = form} certification={certification}
></RealNameCertificationModal>}
<div className="basicForm"> <div className="basicForm">
<style>{` <style>{`
.basicForm .title { .basicForm .title {

@ -30,7 +30,6 @@ class RealNameCertificationModal extends Component{
constructor(props){ constructor(props){
super(props); super(props);
this.state={ this.state={
fileList:[]
} }
} }
@ -38,7 +37,6 @@ class RealNameCertificationModal extends Component{
} }
setVisible = (visible) => { setVisible = (visible) => {
this.setState({ fileList:[] });
this.refs.modalWrapper.setVisible(visible) this.refs.modalWrapper.setVisible(visible)
} }
@ -120,8 +118,6 @@ class RealNameCertificationModal extends Component{
loading: false, loading: false,
})); }));
} }
let fileList = [...info.fileList];
this.setState({ fileList });
} }
render(){ render(){
@ -294,7 +290,7 @@ class RealNameCertificationModal extends Component{
<span className="idPic-uploader demoImg"> <span className="idPic-uploader demoImg">
<img src={`${certification == 1 ? authImg : jobImg}`} alt="avatar" style={{ maxHeight: '110px'}}/> <img src={`${certification == 1 ? authImg : jobImg}`} alt="avatar" style={{ maxHeight: '110px'}}/>
</span> </span>
<Dragger {...uploadProps2} fileList = {this.state.fileList}> <Dragger {...uploadProps2}>
{imageUrl2 ? {imageUrl2 ?
// <a href={imageUrl2} target="_blank" title="点击重新上传图片"></a> // <a href={imageUrl2} target="_blank" title="点击重新上传图片"></a>
<img src={imageUrl2} alt="avatar" style={{ maxHeight: '110px'}}/> <img src={imageUrl2} alt="avatar" style={{ maxHeight: '110px'}}/>

Loading…
Cancel
Save