调整上传文件限制和搜索功能

chromesetting
杨树明 5 years ago
parent 8a2f434fe5
commit 9e550a8bb6

@ -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{
<img src={`${certification == 1 ? authImg : jobImg}`} alt="avatar" style={{ maxHeight: '110px'}}/>
</span>
<Dragger {...uploadProps2}
accept=".png,.jpg,.bmp"
accept=".png,.jpg,.bmp,.jpeg"
>
{imageUrl2 ?
// <a href={imageUrl2} target="_blank" title="点击重新上传图片"></a>

@ -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({

Loading…
Cancel
Save