diff --git a/src/views/secondHandCar/components/upload-common.vue b/src/views/secondHandCar/components/upload-common.vue index c1c4f128..04e935fa 100644 --- a/src/views/secondHandCar/components/upload-common.vue +++ b/src/views/secondHandCar/components/upload-common.vue @@ -84,13 +84,12 @@ export default { }, async handleFileRead(file) { const formData = new FormData(); + console.log("file.file",file.file) + if(!file.file){ + this.$toast('获取文件失败,请重新上传') + } formData.append("file", file.file); let res = await uploadImage(formData); - /* try { - console.log("res", res) - } catch (e) { - console.log("e", e) - }*/ // 为文件添加唯一标识符 file.uid = Date.now(); // 使用时间戳作为唯一标识符 if (this.text == '行驶证照片') {