From 3b1d4a42b8821c571cf3eae7dc4db76b47a4db9e Mon Sep 17 00:00:00 2001 From: obroccolio Date: Fri, 7 Aug 2026 16:25:41 +0800 Subject: [PATCH] feat: refresh home and shop pages --- src/pages/index/index.scss | 12 ++++----- src/pages/index/index.tsx | 15 +++++------- src/pages/shop/index.scss | 2 +- src/pages/shop/index.tsx | 50 ++++++++++++++++++++------------------ 4 files changed, 40 insertions(+), 39 deletions(-) diff --git a/src/pages/index/index.scss b/src/pages/index/index.scss index f861a0c..21b9d97 100644 --- a/src/pages/index/index.scss +++ b/src/pages/index/index.scss @@ -24,8 +24,8 @@ .search-inner { display: flex; align-items: center; - background: #f8f9fa; - border: 1px dashed rgba(0, 0, 0, 0.06); + background: var(--bg-input); + border: 1rpx solid var(--border); border-radius: 40px; padding: 16px 24px; } @@ -58,7 +58,7 @@ .search-result-hint { margin-top: 16px; padding-top: 16px; - border-top: 2px dashed var(--line-star); + border-top: 1rpx solid var(--border); } .hint-text { @@ -141,7 +141,7 @@ position: absolute; top: 16px; right: 16px; - background: rgba(255, 154, 158, 0.9); + background: var(--accent-primary); color: #ffffff; font-size: 20px; padding: 4px 16px; @@ -206,7 +206,7 @@ .category-price { font-size: 30px; font-weight: 700; - color: var(--accent-pink); + color: var(--accent-primary); margin-top: 8px; } @@ -239,5 +239,5 @@ /* 底部安全区 */ .safe-bottom-placeholder { - height: 160px; + height: 200px; } diff --git a/src/pages/index/index.tsx b/src/pages/index/index.tsx index d105c77..2f1fc9c 100644 --- a/src/pages/index/index.tsx +++ b/src/pages/index/index.tsx @@ -59,8 +59,7 @@ export default function Index() { {/* 搜索框 */} - - + 定制成品展示 {SHOWCASE_LIST.map((item, idx) => ( - - + @@ -125,10 +123,9 @@ export default function Index() { {filteredCategories.map((cat) => ( navigateToProduct(cat.id)} > - {filteredCategories.length === 0 && ( - + 未找到匹配的品类 尝试搜索“笔记本”、“杯垫”等 diff --git a/src/pages/shop/index.scss b/src/pages/shop/index.scss index 7b65698..ba7b398 100644 --- a/src/pages/shop/index.scss +++ b/src/pages/shop/index.scss @@ -77,7 +77,7 @@ .shop-card-price { font-size: 30rpx; font-weight: 700; - color: #ff9a9e; + color: var(--accent-primary); margin-top: 10rpx; display: block; } diff --git a/src/pages/shop/index.tsx b/src/pages/shop/index.tsx index 6dd77ac..3d18005 100644 --- a/src/pages/shop/index.tsx +++ b/src/pages/shop/index.tsx @@ -26,35 +26,39 @@ export default function ShopPage() { - {PRODUCTS.map(product => ( - openDetail(product.id)} - > - - - + {PRODUCTS.map(product => { + const tone = product.tone || [28, 22, 18] + const imageSrc = product.images[0] || product.iconImg || '' + return ( openDetail(product.id)} > - {product.name} - ¥{product.price} + + + + + {product.name} + ¥{product.price} + - - ))} + ) + })} {/* TabBar spacer so list isn't obscured */} - + )