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,