feat(shop): 添加商品详情页轮播图点击放大预览功能

- 在 src/pages/shop/product-detail.tsx 的轮播图 Image 上添加 onClick 事件
- 使用 Taro.previewImage 实现图片全屏预览和左右滑动浏览
- 同样在 src/pages/points/product-detail.tsx 商品图片添加点击预览功能
- 新增完整的 shop-api 秒杀模块,包含实体、参数、mapper、service、controller 和定时任务
- 实现防重复提交、活动校验、限购校验和原子扣库存的秒杀核心下单逻辑
- 提供管理端 CRUD 与用户端秒杀订单相关接口
- 引入定时任务 SeckillStatusTask 定时更新秒杀活动状态
- 添加秒杀模块相关数据库建表脚本和接口路径对齐前端设计
This commit is contained in:
2026-06-26 22:25:07 +08:00
parent 93d0b5b476
commit 44ca5bbbfc
4 changed files with 26 additions and 1 deletions

View File

@@ -230,7 +230,12 @@ const ProductDetailPage: React.FC = () => {
>
{images.map((img, idx) => (
<SwiperItem key={idx}>
<Image className='w-full h-full' src={img} mode='aspectFill' />
<Image
className='w-full h-full'
src={img}
mode='aspectFill'
onClick={() => Taro.previewImage({ current: img, urls: images })}
/>
</SwiperItem>
))}
{images.length === 0 && (