feat(image): 全项目应用图片压缩优化
- 将图片显示统一替换为 getCompressedImageUrl 函数处理压缩 - 覆盖 35 个文件,包括 4 个组件和 31 个页面 - 主要组件:LazyImage、ProductCard、OrderCard、SkuSelector 内部自动压缩图片 - 主要页面:购物车、订单、积分、活动、拼团、秒杀、收藏、浏览历史等 - 跳过用户头像、二维码、商品详情大图及所有 Taro.previewImage 调用 - 调整压缩默认宽度为 300,保持质量90,启用压缩功能
This commit is contained in:
@@ -87,3 +87,9 @@
|
||||
- **默认参数**: `width=750, quality=90, enabled=true`
|
||||
- **安全处理**: 空 URL 返回空串、已含 `x-oss-process` 不重复拼接、根据已有 query 参数自动选 `?`/`&` 分隔符
|
||||
- **使用约定**: 列表/卡片等缩略图场景使用此函数;预览大图(`Taro.previewImage`)直接用原 URL,不调用此函数
|
||||
|
||||
## 全项目应用 getCompressedImageUrl
|
||||
- **修改范围**: 35 个文件(4 个组件 + 31 个页面文件)
|
||||
- **组件**: LazyImage、ProductCard、OrderCard、SkuSelector — 组件内部自动压缩
|
||||
- **页面**: shop/cart/checkout/category/index/seckill-list/group-buy-list/group-buy-detail, order/detail/evaluate/evaluate-detail/after-sale-*, order-list, user/favorite-list/history-list/benefit-*, points/*, store/goods/orders, index/index/article-list, activity/event/*, group-buy-list/detail, seckill-list/detail, history-list, favorite-list
|
||||
- **跳过(不压缩)**: 头像(user/user, user/member, user/profile, user/index, user/team, store/center)、二维码(share, user/promotion)、商品详情大图/轮播(shop/product-detail, shop/seckill-detail)、所有 Taro.previewImage 调用
|
||||
|
||||
Reference in New Issue
Block a user