diff --git a/public/react/src/modules/user/modal/RealNameCertificationModal.js b/public/react/src/modules/user/modal/RealNameCertificationModal.js index 9b4d5e497..bb641af20 100644 --- a/public/react/src/modules/user/modal/RealNameCertificationModal.js +++ b/public/react/src/modules/user/modal/RealNameCertificationModal.js @@ -490,6 +490,13 @@ class RealNameCertificationModal extends Component{ action: this.props.current_user ? `${getUploadActionUrl()}` : '', className: 'idPic-uploader', onChange: this.handleChange2, + beforeUpload: (file) => { + const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png' || file.type === 'image/jpg' || file.type === 'image/bmp'; + if (!isJpgOrPng) { + this.props.showNotification('请上传正确文件格式'); + } + return isJpgOrPng; + }, }; // form合并了 @@ -740,7 +747,7 @@ class RealNameCertificationModal extends Component{ avatar {imageUrl2 ? // diff --git a/public/react/src/search/SearchPage.js b/public/react/src/search/SearchPage.js index c2afca884..1bf1d83d4 100644 --- a/public/react/src/search/SearchPage.js +++ b/public/react/src/search/SearchPage.js @@ -81,10 +81,11 @@ class SearchPage extends Component{ setdatafuns =(value)=>{ this.setState({ - keywords:value + keywords:value, + page:1 }) this.props.history.replace(`/search?value=${value}`) - this.getdata(this.state.page,this.state.type,value); + this.getdata(1,this.state.type,value); } paginationonChanges = (pageNumber) => { this.setState({