style(home): 全面重构PC首页UI视觉层级与商品卡片布局

- 重构商品卡片为双栏分翼展台,消灭宽屏中间大面积空白
- 去除大粗冗余标题行,以核心资产微卡(哈夫币/保险/币比)作为视觉中心
- 过滤规格胶囊中的重复项(如AWM),与右侧仓库物资展台明确职责分工
- 优化核心资产文字与数字垂直居中对齐,统一沉稳灰阶底色与品牌点睛色
- 调整轮播图Banner高度与业务入口条呼吸感,提升首屏空间利用率与可读性
This commit is contained in:
yml2213
2026-09-06 18:57:13 +08:00
parent 4b9e64e398
commit 8e3283d951
4 changed files with 922 additions and 575 deletions
+104 -91
View File
@@ -36,7 +36,6 @@ import {
import { useListingQuery } from '@/features/listings/composables/useListingQuery'
import HomeAnnouncement from '../components/HomeAnnouncement.vue'
import HomeBanner from '../components/HomeBanner.vue'
import HomeStats from '../components/HomeStats.vue'
import HomeFilters from '../components/HomeFilters.vue'
import HomeZones from '../components/HomeZones.vue'
import ListingCard from '../components/ListingCard.vue'
@@ -358,18 +357,23 @@ loadHome()
<main class="home-content">
<div class="hero-section">
<HomeBanner :banners="banners" />
<HomeStats :stats="statCards" />
<HomeBanner :banners="banners" :stats="statCards" />
</div>
<div class="biz-entry-grid" aria-label="业务入口">
<RouterLink class="biz-entry" to="/">
<strong>租号大厅</strong>
<small>高哈夫币 · 安全交接 · 随租随玩</small>
<div class="biz-title-row">
<strong>租号大厅</strong>
<small>安全交接 · 随租随玩</small>
</div>
<van-icon name="arrow" :size="12" class="biz-arrow" />
</RouterLink>
<RouterLink class="biz-entry crash" to="/crash">
<strong>撞车 <em>NEW</em></strong>
<small>选购商品 · 支付后进群联系客服</small>
<div class="biz-title-row">
<strong>撞车 <em>NEW</em></strong>
<small>选购商品 · 进群交接</small>
</div>
<van-icon name="arrow" :size="12" class="biz-arrow" />
</RouterLink>
<button
v-if="awRecycle.enabled"
@@ -377,8 +381,11 @@ loadHome()
class="biz-entry aw-recycle"
@click="openAWRecycle"
>
<strong>{{ awRecycle.title }}</strong>
<small>{{ awRecycle.subtitle }}</small>
<div class="biz-title-row">
<strong>{{ awRecycle.title }}</strong>
<small>{{ awRecycle.subtitle }}</small>
</div>
<van-icon name="arrow" :size="12" class="biz-arrow" />
</button>
<button
v-if="cooperationFeedback.enabled"
@@ -386,8 +393,11 @@ loadHome()
class="biz-entry cooperation-feedback"
@click="openCooperationFeedback"
>
<strong>{{ cooperationFeedback.title }}</strong>
<small>{{ cooperationFeedback.subtitle }}</small>
<div class="biz-title-row">
<strong>{{ cooperationFeedback.title }}</strong>
<small>{{ cooperationFeedback.subtitle }}</small>
</div>
<van-icon name="arrow" :size="12" class="biz-arrow" />
</button>
</div>
@@ -444,11 +454,13 @@ loadHome()
@reset="handleResetFilters"
/>
<div class="list-head">
<div class="zone-head">
<p class="eyebrow">Account Zone</p>
<h2>账号专区</h2>
</div>
<!-- 专区与排序合并为同一行极简操作条 -->
<div class="list-control-bar">
<HomeZones
:zones="zoneOptions"
:active-zone="activeZone"
@update:active-zone="activeZone = $event"
/>
<div class="list-actions sort-bar" role="group" aria-label="排序方式">
<button
v-for="item in sortOptions"
@@ -463,12 +475,6 @@ loadHome()
</div>
</div>
<HomeZones
:zones="zoneOptions"
:active-zone="activeZone"
@update:active-zone="activeZone = $event"
/>
<div v-if="!loading && listings.length === 0" class="home-empty-state">
<strong>没有符合条件的账号</strong>
<span>可以放宽筛选条件或切回全部专区。</span>
@@ -489,7 +495,7 @@ loadHome()
<style scoped>
.pc-home-redesign {
display: grid;
gap: 20px;
gap: 12px;
width: 100%;
max-width: 1720px;
min-width: 0;
@@ -499,7 +505,12 @@ loadHome()
.home-content {
display: grid;
gap: 20px;
gap: 12px;
min-width: 0;
}
.hero-section {
width: 100%;
min-width: 0;
}
@@ -511,54 +522,83 @@ loadHome()
.biz-entry {
display: flex;
flex-direction: column;
gap: 6px;
padding: 16px 18px;
border-radius: 14px;
border: 1px solid #eef1f5;
background: #fff;
align-items: center;
justify-content: space-between;
gap: 10px;
min-height: 52px;
padding: 12px 18px;
border-radius: 12px;
border: 1px solid #e2e8f0;
background: #ffffff;
text-decoration: none;
text-align: left;
cursor: pointer;
font: inherit;
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
transition:
border-color 0.18s ease,
box-shadow 0.18s ease;
border-color 0.2s ease,
box-shadow 0.2s ease,
transform 0.2s ease;
}
.biz-entry:hover {
border-color: #ffd4b0;
border-color: #ffbe98;
box-shadow: 0 6px 16px rgba(255, 106, 0, 0.08);
transform: translateY(-2px);
}
.biz-title-row {
display: flex;
align-items: baseline;
gap: 10px;
min-width: 0;
}
.biz-entry strong {
color: #17233d;
font-size: 16px;
color: #0f172a;
font-size: 15px;
font-weight: 700;
letter-spacing: -0.01em;
white-space: nowrap;
}
.biz-entry small {
color: #7b8798;
font-size: 13px;
color: #64748b;
font-size: 12px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.biz-arrow {
color: #94a3b8;
flex-shrink: 0;
transition: transform 0.2s ease, color 0.2s ease;
}
.biz-entry:hover .biz-arrow {
color: #ff6a00;
transform: translateX(2px);
}
.biz-entry.crash strong em {
margin-left: 6px;
padding: 1px 6px;
padding: 2px 6px;
border-radius: 999px;
background: #ff6a00;
color: #fff;
font-size: 11px;
font-size: 10px;
font-style: normal;
font-weight: 700;
}
.biz-entry.aw-recycle {
border-color: #e8edff;
background: linear-gradient(135deg, #ffffff 0%, #f5f8ff 100%);
border-color: #e0e7ff;
background: linear-gradient(135deg, #ffffff 0%, #f6f8fe 100%);
}
.biz-entry.cooperation-feedback {
border-color: #d9f0e5;
background: linear-gradient(135deg, #ffffff 0%, #f1fbf6 100%);
border-color: #ccfbf1;
background: linear-gradient(135deg, #ffffff 0%, #f0fdf9 100%);
}
:deep(.aw-recycle-image) {
@@ -572,74 +612,47 @@ loadHome()
@media (max-width: 960px) {
.biz-entry-grid {
grid-template-columns: 1fr;
grid-template-columns: repeat(2, 1fr);
}
}
.infinite-load-state {
padding: 6px 0 18px;
padding: 12px 0 24px;
color: #94a3b8;
font-size: 13px;
font-weight: 700;
font-weight: 600;
text-align: center;
}
.hero-section {
display: grid;
grid-template-columns: minmax(0, 1fr) 320px;
gap: 20px;
min-width: 0;
}
.list-head {
/* 专区与排序单行交互条 */
.list-control-bar {
display: flex;
justify-content: space-between;
align-items: flex-end;
gap: 16px;
align-items: center;
gap: 12px;
flex-wrap: wrap;
}
.zone-head {
display: flex;
flex-direction: column;
gap: 4px;
}
.eyebrow {
margin: 0;
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.1em;
color: #ff6a00;
}
.zone-head h2 {
margin: 0;
font-size: 28px;
font-weight: 900;
color: #17233d;
padding: 2px 0;
}
.sort-bar {
display: inline-flex;
flex-wrap: wrap;
gap: 8px;
gap: 4px;
align-items: center;
padding: 4px;
border-radius: 12px;
background: #f3f5f9;
padding: 3px;
border-radius: 10px;
background: #f1f5f9;
}
.sort-chip {
min-height: 32px;
padding: 0 14px;
min-height: 28px;
padding: 0 12px;
border: none;
border-radius: 9px;
border-radius: 8px;
background: transparent;
color: #64748b;
font-size: 13px;
font-weight: 700;
font-size: 12px;
font-weight: 600;
cursor: pointer;
transition:
background 0.15s ease,
@@ -648,14 +661,14 @@ loadHome()
}
.sort-chip:hover {
color: #334155;
background: rgba(255, 255, 255, 0.7);
color: #0f172a;
background: rgba(255, 255, 255, 0.8);
}
.sort-chip.active {
background: #ffffff;
color: #ff6a00;
box-shadow: 0 1px 4px rgba(23, 35, 61, 0.08);
box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.enhanced-desktop-list {