fix(SkuSelector): 修正价格显示逻辑避免价格错误
- 调整fakeSku中price字段优先使用product.price,确保价格正确显示 - 修改currentPrice计算顺序,使price优先于salePrice,符合实际售价需求 - 统一价格逻辑,避免SKU弹窗和商品详情页价格不一致问题 - 添加注释说明ShopGoods和ShopGoodsSku中price与salePrice的区别及优先级规则
This commit is contained in:
@@ -518,27 +518,27 @@ const CheckoutPage: React.FC = () => {
|
||||
<Text className='text-sm font-medium text-gray-800 mb-3 block'>支付方式</Text>
|
||||
|
||||
{/* 微信支付 */}
|
||||
<View
|
||||
className='flex items-center py-3 px-2 rounded-lg mb-2'
|
||||
style={{ backgroundColor: payType === 1 ? '#f0fdf4' : '#f9fafb' }}
|
||||
onClick={() => setPayType(1)}
|
||||
>
|
||||
<View className='w-8 h-8 rounded-full bg-green-50 flex items-center justify-center mr-3'>
|
||||
<Text className='text-sm'>微</Text>
|
||||
</View>
|
||||
<View className='flex-1'>
|
||||
<Text className='text-sm text-gray-800 block'>微信支付</Text>
|
||||
<Text className='text-xs text-gray-400 block'>推荐使用</Text>
|
||||
</View>
|
||||
<View
|
||||
className='w-5 h-5 rounded-full border-2 flex items-center justify-center'
|
||||
style={{ borderColor: payType === 1 ? '#22c55e' : '#d1d5db' }}
|
||||
>
|
||||
{payType === 1 && (
|
||||
<View className='w-2 h-2 rounded-full' style={{ backgroundColor: '#22c55e' }} />
|
||||
)}
|
||||
</View>
|
||||
</View>
|
||||
{/*<View*/}
|
||||
{/* className='flex items-center py-3 px-2 rounded-lg mb-2'*/}
|
||||
{/* style={{ backgroundColor: payType === 1 ? '#f0fdf4' : '#f9fafb' }}*/}
|
||||
{/* onClick={() => setPayType(1)}*/}
|
||||
{/*>*/}
|
||||
{/* <View className='w-8 h-8 rounded-full bg-green-50 flex items-center justify-center mr-3'>*/}
|
||||
{/* <Text className='text-sm'>微</Text>*/}
|
||||
{/* </View>*/}
|
||||
{/* <View className='flex-1'>*/}
|
||||
{/* <Text className='text-sm text-gray-800 block'>微信支付</Text>*/}
|
||||
{/* <Text className='text-xs text-gray-400 block'>推荐使用</Text>*/}
|
||||
{/* </View>*/}
|
||||
{/* <View*/}
|
||||
{/* className='w-5 h-5 rounded-full border-2 flex items-center justify-center'*/}
|
||||
{/* style={{ borderColor: payType === 1 ? '#22c55e' : '#d1d5db' }}*/}
|
||||
{/* >*/}
|
||||
{/* {payType === 1 && (*/}
|
||||
{/* <View className='w-2 h-2 rounded-full' style={{ backgroundColor: '#22c55e' }} />*/}
|
||||
{/* )}*/}
|
||||
{/* </View>*/}
|
||||
{/*</View>*/}
|
||||
|
||||
{/* 余额支付 */}
|
||||
<View
|
||||
|
||||
Reference in New Issue
Block a user