fix(SkuSelector): 修正价格显示逻辑避免价格错误
- 调整fakeSku中price字段优先使用product.price,确保价格正确显示 - 修改currentPrice计算顺序,使price优先于salePrice,符合实际售价需求 - 统一价格逻辑,避免SKU弹窗和商品详情页价格不一致问题 - 添加注释说明ShopGoods和ShopGoodsSku中price与salePrice的区别及优先级规则
This commit is contained in:
@@ -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}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user