Files
xinlong-shop-taro/.workbuddy/memory/2026-06-27.md
赵忠林 cdab04de21 fix(SkuSelector): 修正价格显示逻辑避免价格错误
- 调整fakeSku中price字段优先使用product.price,确保价格正确显示
- 修改currentPrice计算顺序,使price优先于salePrice,符合实际售价需求
- 统一价格逻辑,避免SKU弹窗和商品详情页价格不一致问题
- 添加注释说明ShopGoods和ShopGoodsSku中price与salePrice的区别及优先级规则
2026-06-27 01:08:04 +08:00

19 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 2026-06-27 工作日志
## SKU选择器价格显示错误修复
- **文件**: `src/components/business/SkuSelector/index.tsx`
- **问题**: 商品详情页价格显示 ¥1019但点击"立即购买"后SKU弹窗显示 ¥2519
- **根因**: `currentPrice` 计算式中 `salePrice` 优先级高于 `price`。ShopGoods 模型中 `price`=实际售价(1019)`salePrice`=市场/原价(2519)
- **修复**:
1. 第190行: `currentPrice` 优先级改为 `price` 优先于 `salePrice`
2. 第160行: 单规格 fakeSku 的 price 字段同样修正
## 确认订单页:货到付款 → 货到付款
- **文件**: `src/pages/shop/checkout.tsx`
- **改动内容**:
1. 支付方式名称:货到付款 → 货到付款,图标"余"→"货",副文案改为"商品送达后付款"
2. 移除用户余额加载逻辑loadUserBalance、userBalance、loadingBalance 状态)
3. 移除余额不足校验和充值引导弹窗
4. payType=0 改为货到付款:提交后直接创建订单并跳转,不走在线支付流程
5. 清理未使用的导入payByBalance、getUserBalance、repairOrder