From 3a951c70f5941a34edfd090ae138ab71990eccbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Wed, 15 Jul 2026 14:50:22 +0800 Subject: [PATCH] =?UTF-8?q?feat(shop):=20=E5=88=97=E8=A1=A8=E5=95=86?= =?UTF-8?q?=E5=93=81=E5=9B=BE=E7=89=87=E6=94=B9=E7=94=A8=20OSS=20=E5=8E=8B?= =?UTF-8?q?=E7=BC=A9=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - src/views/shop/shopGoodsBrowse/index.vue 中引入 getCompressedImageUrl - 商品图片 :src 改为使用 getCompressedImageUrl(record.goodsImage) - 统一默认宽度 240px,质量 90,自动补全 OSS 域名 - 跳过已含 x-oss-process 的 URL 保持预览行为不变 --- .workbuddy/memory/2026-07-15.md | 7 +++++++ src/views/shop/shopGoodsBrowse/index.vue | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.workbuddy/memory/2026-07-15.md b/.workbuddy/memory/2026-07-15.md index 44ec0a8..d20368d 100644 --- a/.workbuddy/memory/2026-07-15.md +++ b/.workbuddy/memory/2026-07-15.md @@ -106,3 +106,10 @@ - `confirmSubscribe` 无需改动(用 `currentProduct.productId`,已自动是 65)。 - `getProductDetail(65)` 返回的 product 含 name/priceType/price,前端参考价 `monthPrice = price/100`、`yearPrice = monthPrice*10` 仍适用。 - vue-tsc 验证 dashboard 零 error TS(总错误 1778 不变)。 + +## shopGoodsBrowse 列表商品图片改用 OSS 压缩函数 + +- 文件:`src/views/shop/shopGoodsBrowse/index.vue` +- 引入 `getCompressedImageUrl`(来自 `src/utils/image.ts`),将商品图片 `:src="record.goodsImage"` 改为 `:src="getCompressedImageUrl(record.goodsImage)"`。 +- 与 `shopGoods`、`shopOrder`、`dashboard` 等页面保持一致:默认宽度 240px、质量 90、自动补全 OSS 域名、跳过已含 `x-oss-process` 的 URL。 +- 预览行为未改(仍走 a-image 默认 src 预览)。 diff --git a/src/views/shop/shopGoodsBrowse/index.vue b/src/views/shop/shopGoodsBrowse/index.vue index 3ba9c22..7e1f19e 100644 --- a/src/views/shop/shopGoodsBrowse/index.vue +++ b/src/views/shop/shopGoodsBrowse/index.vue @@ -15,7 +15,7 @@