Browse Source

Revert "feat: indent导出PDF.商品图片jpg_jpeg_png后缀强行转换小写."

This reverts commit 3c27a582df414f261ffdd997708d5b349f9190e3.
peter 1 day ago
parent
commit
c3ac9947a4
1 changed files with 4 additions and 15 deletions
  1. 4 15
      src/pages/indent-manage/indent/components/exportQuota2.vue

+ 4 - 15
src/pages/indent-manage/indent/components/exportQuota2.vue

@@ -431,26 +431,15 @@ const sliceImage = (urlString: string, width: number, height = width) => {
     const extractedString = urlString.replace(/^https?:\/\/[^/]+/, '')
     const resizedImageUrl = `https://mediahub.promocollection.com.au/fit-in/${width}x${height}${extractedString}`
     return resizedImageUrl
-  } else {
-    return ''
   }
 }
-const formatURL = (url: string) => {
-  console.log(url, 'url')
-  return url.length
-    ? url
-        .replace('.JPG', '.jpg')
-        .replace('.PNG', '.png')
-        .replace('.JPEG', '.jpeg')
-    : ''
-}
 
 const mainPicture = computed(() => {
   if (
     Array.isArray(productInfo.product_image) &&
     productInfo.product_image.length
   ) {
-    return formatURL(productInfo.product_image[0] || '')
+    return productInfo.product_image[0]
   }
   return ''
 })
@@ -459,7 +448,7 @@ const mainPicture2 = computed(() => {
     Array.isArray(productInfo.product_image) &&
     productInfo.product_image.length
   ) {
-    return formatURL(sliceImage(productInfo.product_image[0], 1000))
+    return sliceImage(productInfo.product_image[0], 1000)
   }
   return ''
 })
@@ -468,7 +457,7 @@ const otherPicture = computed(() => {
     Array.isArray(productInfo.product_image) &&
     productInfo.product_image.length > 1
   ) {
-    return productInfo.product_image.slice(1).map((i:string) => formatURL(i))
+    return productInfo.product_image.slice(1)
   }
   return []
 })
@@ -479,7 +468,7 @@ const otherPicture2 = computed(() => {
   ) {
     return productInfo.product_image
       .slice(1)
-      .map((i: string) => formatURL(sliceImage(i, 1000)))
+      .map((i: string) => sliceImage(i, 1000))
   }
   return []
 })