zengjun 1 день назад
Родитель
Сommit
ff70c6c0ba
1 измененных файлов с 4 добавлено и 3 удалено
  1. 4 3
      src/views/returned/register/index.vue

+ 4 - 3
src/views/returned/register/index.vue

@@ -298,7 +298,8 @@ const beforeReadImage = async (
     if (isHeicFile) {
       try {
         const convertedFile = await convertHeicHeifToWebp(f)
-        normalizedFiles.push(convertedFile)
+        const image = await smartCompressImage(convertedFile)
+        normalizedFiles.push(image)
       } catch (error) {
         console.error('HEIC/HEIF 转换失败:', error)
         showFailToast('HEIC/HEIF 转换失败,请使用 JPG/PNG/WEBP 格式')
@@ -306,8 +307,8 @@ const beforeReadImage = async (
       }
       continue
     }
-
-    normalizedFiles.push(f)
+    const image = await smartCompressImage(f)
+    normalizedFiles.push(image)
   }
 
   // 返回原始 File 数组 给 van-uploader 进行默认处理,