From 48fe4d404fe14b2c2f404d5c263572d2984c6450 Mon Sep 17 00:00:00 2001 From: zhouxueli <2841188632@qq.com> Date: Fri, 14 Mar 2025 14:35:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8C=E6=89=8B=E8=BD=A6=E4=BA=A4=E6=98=93?= =?UTF-8?q?=EF=BC=8C=E4=B8=8A=E4=BC=A0=E7=85=A7=E7=89=87=E6=8A=9B=E5=87=BA?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/secondHandCar/components/upload-common.vue | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 == '行驶证照片') {