index.jsx 656 B

12345678910111213141516171819202122
  1. import { View, Text, Image } from '@tarojs/components'
  2. import './index.less'
  3. const ProductCard = ({ product }) => {
  4. return (
  5. <View className='product-card'>
  6. <Image className='product-img' src={product.imageUrl} mode='widthFix' />
  7. <View className='product-content'>
  8. <Text className='title'>{product.name}</Text>
  9. <View className='price-row'>
  10. <Text className='price'>
  11. <Text className='currency'>¥</Text>
  12. {product.price}
  13. </Text>
  14. <Text className='original-price'>¥{product.originalPrice}</Text>
  15. </View>
  16. </View>
  17. </View>
  18. )
  19. }
  20. export default ProductCard