商品浏览页构建前最后一次更新
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user