feat: refresh home and shop pages
This commit is contained in:
@@ -77,7 +77,7 @@
|
||||
.shop-card-price {
|
||||
font-size: 30rpx;
|
||||
font-weight: 700;
|
||||
color: #ff9a9e;
|
||||
color: var(--accent-primary);
|
||||
margin-top: 10rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
+27
-23
@@ -26,35 +26,39 @@ export default function ShopPage() {
|
||||
</View>
|
||||
|
||||
<View className="shop-grid">
|
||||
{PRODUCTS.map(product => (
|
||||
<View
|
||||
key={product.id}
|
||||
className="shop-card"
|
||||
onTap={() => openDetail(product.id)}
|
||||
>
|
||||
<View className="shop-card-img-wrap">
|
||||
<Image
|
||||
className="shop-card-img"
|
||||
src={product.images?.[0] || product.iconImg || ''}
|
||||
mode="aspectFill"
|
||||
lazyLoad
|
||||
/>
|
||||
</View>
|
||||
{PRODUCTS.map(product => {
|
||||
const tone = product.tone || [28, 22, 18]
|
||||
const imageSrc = product.images[0] || product.iconImg || ''
|
||||
return (
|
||||
<View
|
||||
className="shop-card-info"
|
||||
style={{
|
||||
backgroundColor: `rgba(${product.tone?.[0] || 28}, ${product.tone?.[1] || 22}, ${product.tone?.[2] || 18}, 0.92)`
|
||||
}}
|
||||
key={product.id}
|
||||
className="shop-card"
|
||||
onTap={() => openDetail(product.id)}
|
||||
>
|
||||
<Text className="shop-card-name">{product.name}</Text>
|
||||
<Text className="shop-card-price">¥{product.price}</Text>
|
||||
<View className="shop-card-img-wrap">
|
||||
<Image
|
||||
className="shop-card-img"
|
||||
src={imageSrc}
|
||||
mode="aspectFill"
|
||||
lazyLoad
|
||||
/>
|
||||
</View>
|
||||
<View
|
||||
className="shop-card-info"
|
||||
style={{
|
||||
backgroundColor: `rgba(${tone[0]}, ${tone[1]}, ${tone[2]}, 0.92)`
|
||||
}}
|
||||
>
|
||||
<Text className="shop-card-name">{product.name}</Text>
|
||||
<Text className="shop-card-price">¥{product.price}</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
))}
|
||||
)
|
||||
})}
|
||||
</View>
|
||||
|
||||
{/* TabBar spacer so list isn't obscured */}
|
||||
<View style={{ height: '160px' }} />
|
||||
<View style={{ height: '200px' }} />
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user