fix(SkuSelector): 修正价格显示逻辑避免价格错误

- 调整fakeSku中price字段优先使用product.price,确保价格正确显示
- 修改currentPrice计算顺序,使price优先于salePrice,符合实际售价需求
- 统一价格逻辑,避免SKU弹窗和商品详情页价格不一致问题
- 添加注释说明ShopGoods和ShopGoodsSku中price与salePrice的区别及优先级规则
This commit is contained in:
2026-06-27 01:08:04 +08:00
parent 9f1c50b7a4
commit cdab04de21
6 changed files with 32 additions and 83 deletions

View File

@@ -11,7 +11,7 @@ interface PayModalProps {
const PAY_TYPES = [
{ id: 1, name: '微信支付', desc: '推荐使用', icon: 'pay-wechat' },
{ id: 0, name: '余额支付', desc: '使用账户余额', icon: 'pay-balance' },
{ id: 0, name: '货到付款', desc: '使用账户余额', icon: 'pay-balance' },
]
const PayModal: React.FC<PayModalProps> = ({ visible, amount, onClose, onConfirm }) => {
@@ -60,7 +60,7 @@ const PayModal: React.FC<PayModalProps> = ({ visible, amount, onClose, onConfirm
<View className='p-4'>
{/* 关闭按钮 */}
<View className='flex justify-end mb-2'>
<View
<View
className='w-6 h-6 rounded-full bg-gray-100 flex items-center justify-center'
onClick={handleClose}
>