| | |
| | | |
| | | //上传图片 |
| | | fileUpload(file) { |
| | | console.log(file, "file"); |
| | | |
| | | return new Promise((resolve, reject) => { |
| | | const isJPG = file.file.type === 'image/jpeg' || file.file.type === 'image/png' |
| | | console.log(isJPG, "isJPG"); |
| | | if (!isJPG) { |
| | | Message.error('上传文件只能是 jpg/png 格式!') |
| | | return reject() |
| | |
| | | tool |
| | | .getFileMd5(file.file, size * 1024) |
| | | .then(async (e) => { |
| | | console.log(this.questionData.askAbout.one == e, "this.questionData.askAbout.one == e"); |
| | | |
| | | if (!(this.questionData.askAbout.one == e)) { |
| | | const imgData = new FormData() |
| | | imgData.append('Md5', e) |