From c73c303189fa80ab7f61ce539204260d418848e7 Mon Sep 17 00:00:00 2001 From: scrin <2277317060@qq.com> Date: Sun, 30 Nov 2025 15:14:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=9B=B7=E8=BE=BE=E7=8A=B6?= =?UTF-8?q?=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/index.vue | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/views/index.vue b/src/views/index.vue index c6858bc..8e641f5 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -1584,9 +1584,11 @@ const openCamera2 = () => { const handleCameraChange2 = (e) => { const file = e.target.files[0] if (!file) return - // const url = URL.createObjectURL(file) - UpdateImage({files: [file]}).then(v=>{ + const files = new FormData() + files.append('files', file); + // const url = URL.createObjectURL(file) + UpdateImage(files).then(v=>{ const url = v.ls?.[0] dialog3Form.value.fileList.push({ name: file.name, @@ -1744,8 +1746,11 @@ const openCamera = () => { const handleCameraChange = (e) => { const file = e.target.files[0] if (!file) return + + const files = new FormData() + files.append('files', file); // const url = URL.createObjectURL(file) - UpdateImage({files: [file]}).then(v=>{ + UpdateImage(files).then(v=>{ const url = v.ls?.[0] dialog1Form.value.fileList.push({ name: file.name, @@ -1970,9 +1975,11 @@ const openCamera1 = () => { const handleCameraChange1 = (e) => { const file = e.target.files[0] if (!file) return - const url = URL.createObjectURL(file) - UpdateImage({files: [file]}).then(v=>{ + const files = new FormData() + files.append('files', file); + // const url = URL.createObjectURL(file) + UpdateImage(files).then(v=>{ const url = v.ls?.[0] dialog2Form.value.fileList.push({ name: file.name, @@ -2184,9 +2191,11 @@ const openCamera3 = () => { const handleCameraChange3 = (e) => { const file = e.target.files[0] if (!file) return - // const url = URL.createObjectURL(file) - UpdateImage({files: [file]}).then(v=>{ + const files = new FormData() + files.append('files', file); + // const url = URL.createObjectURL(file) + UpdateImage(files).then(v=>{ const url = v.ls?.[0] dialog4Form.value.fileList.push({ name: file.name,