diff --git a/src/upload/upload.js b/src/upload/upload.js index 16145cb..12633e5 100644 --- a/src/upload/upload.js +++ b/src/upload/upload.js @@ -34,7 +34,7 @@ export class UploadContainer extends Component { } handleSubmit() { - if ((this.state.msg === "" && this.file === null) || this.state.submitting) return; + if (this.file === null || this.state.submitting) return; this.setState({ submitting: true }); localStorage.removeItem('msgTemp'); } @@ -49,9 +49,7 @@ export class UploadContainer extends Component { return alert('提交内容失败:' + data); } this.setState({ submitting: false, msg: "", url: "", file: null }); - alert('内容提交成功啦').then(({ isConfirmed }) => { - if (isConfirmed) window.close(); - }); + alert('内容提交成功啦'); }); } } @@ -109,7 +107,7 @@ export class UploadContainer extends Component {