商品浏览页构建前最后一次更新

This commit is contained in:
2026-08-02 00:21:54 +08:00
parent d37a93ab9e
commit e423ab2d73
146 changed files with 3449 additions and 1342 deletions
+10 -9
View File
@@ -6,6 +6,7 @@ import { getProductById } from '../../utils/productConfig'
import { addDesign } from '../../utils/store'
import ThemeToggle from '../../components/ThemeToggle'
import { useThemeContext } from '../../context/ThemeContext'
import { getProductIconImg } from '../../utils/productConfig'
const HERO_COLORS = ['#FFE4EC', '#FFF0F5', '#FCE4EC']
@@ -60,7 +61,7 @@ export default function ProductPage() {
<View className='page-header dashed-card mt-20'>
<View className='star-badge' />
<View className='flex-between'>
<Text className='back-btn' onClick={() => Taro.navigateBack()}></Text>
<Text className='back-btn' onTap={() => Taro.navigateBack()}></Text>
<Text className='page-title'></Text>
<View style={{ width: '60px' }} />
</View>
@@ -92,7 +93,7 @@ export default function ProductPage() {
<SwiperItem key={idx}>
<View className='hero-card dashed-card' style={{ background: color }}>
<View className='star-badge' />
<Text className='hero-icon'>{product.icon}</Text>
<Image className='hero-icon-img' src={getProductIconImg(product)} mode='aspectFit' />
<Text className='hero-name'>{product.name}</Text>
</View>
</SwiperItem>
@@ -131,10 +132,10 @@ export default function ProductPage() {
<Text className='summary-label'></Text>
<Text className='summary-price'>¥{product.price}</Text>
</View>
<View className='btn-outline' onClick={handleAddToList}>
<View className='btn-outline' onTap={handleAddToList}>
<Text></Text>
</View>
<View className='btn-gradient' onClick={goToDIY}>
<View className='btn-gradient' onTap={goToDIY}>
<Text></Text>
</View>
</View>
@@ -149,15 +150,15 @@ export default function ProductPage() {
<View className='star-badge' />
<Text className='modal-title'></Text>
<View className='modal-product'>
<Text className='modal-icon'>{product.icon}</Text>
<Image className='modal-icon-img' src={getProductIconImg(product)} mode='aspectFit' />
<Text className='modal-name'>{product.name}</Text>
</View>
<View className='quantity-row'>
<Text className='qty-label'></Text>
<View className='qty-control'>
<View className='qty-btn' onClick={() => modQty(-1)}></View>
<View className='qty-btn' onTap={() => modQty(-1)}></View>
<Text className='qty-num'>{quantity}</Text>
<View className='qty-btn' onClick={() => modQty(1)}></View>
<View className='qty-btn' onTap={() => modQty(1)}></View>
</View>
</View>
<View className='modal-total'>
@@ -165,10 +166,10 @@ export default function ProductPage() {
<Text className='total-price'>¥{(product.price * quantity).toFixed(2)}</Text>
</View>
<View className='modal-actions'>
<View className='btn-outline' onClick={() => setShowModal(false)}>
<View className='btn-outline' onTap={() => setShowModal(false)}>
<Text></Text>
</View>
<View className='btn-gradient' onClick={confirmAdd}>
<View className='btn-gradient' onTap={confirmAdd}>
<Text></Text>
</View>
</View>