From 7db4da50816a2059fe53467d1b59774a1f748d61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=BF=A0=E6=9E=97?= <170083662@qq.com> Date: Sat, 11 Oct 2025 20:20:14 +0800 Subject: [PATCH] =?UTF-8?q?feat(shop):=20=E8=B0=83=E6=95=B4=E5=95=86?= =?UTF-8?q?=E5=93=81=E8=AF=A6=E6=83=85=E9=A1=B5=E5=88=86=E4=BA=AB=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E6=AF=94=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改分享图片URL,添加OSS处理参数- 设置图片尺寸为500x40,裁剪模式填充 - 保持图片宽高比为5:4 - 当图片不存在时返回undefined --- src/shop/goodsDetail/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shop/goodsDetail/index.tsx b/src/shop/goodsDetail/index.tsx index 50fe83e..3b716eb 100644 --- a/src/shop/goodsDetail/index.tsx +++ b/src/shop/goodsDetail/index.tsx @@ -189,7 +189,7 @@ const GoodsDetail = () => { return { title: goods?.name || '精选商品', path: `/shop/goodsDetail/index?id=${goodsId}`, - imageUrl: goods?.image, // 分享图片 + imageUrl: goods?.image ? `${goods.image}?x-oss-process=image/resize,w_500,h_400,m_fill` : undefined, // 分享图片,调整为5:4比例 success: function (res: any) { console.log('分享成功', res); Taro.showToast({