fix(listings): 优化账号详情页 UI 与皮肤展台并修复全局居中样式

This commit is contained in:
yml
2026-11-30 16:34:20 +08:00
parent ad94ab23d0
commit 295c88dd2f
9 changed files with 1334 additions and 1022 deletions
File diff suppressed because it is too large Load Diff
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { readError } from '@/shared/utils/error'
import { ElMessage, ElMessageBox } from 'element-plus'
import { computed, nextTick, onMounted, ref, watch } from 'vue'
import { computed, nextTick, onMounted, ref } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { ShoppingCart, Star, StarFilled, ArrowLeft, DocumentCopy } from '@element-plus/icons-vue'
import { goBackOrHome } from '@/shared/utils/routerBack'
@@ -26,7 +26,9 @@ import {
formatRatio,
getCoinWan,
getDailyLoss,
getDetailSkinGroups,
getFaceOwnerText,
getHighlightSkins,
getListingConsumablePrice,
getListingChips,
getListingDisplayPrice,
@@ -65,6 +67,7 @@ const renterAgreementRef = ref<HTMLElement | null>(null)
const { recordListingView, isFavorite, toggleFavorite } = useListingCollections()
const activeImageIndex = ref(0)
const skinShowcaseRef = ref<HTMLElement | null>(null)
const canCreateOrderAfterAgreement = computed(
() =>
@@ -205,39 +208,25 @@ function readGroupedScreenshots(item: Listing) {
})
}
// 皮肤清单(带高光品级)
// 皮肤清单(带高光品级与 Bento 排版)
const detailSkinGroups = computed(() => {
if (!listing.value) return []
const groups = listing.value.asset_summary?.skin_groups
if (typeof groups !== 'object' || groups === null) return []
const titles: Record<string, { title: string; type: string }> = {
melee: { title: '近战皮肤', type: 'melee' },
operatorRed: { title: '干员红皮', type: 'operatorRed' },
operatorGold: { title: '干员金皮', type: 'operatorGold' },
operator: { title: '干员皮肤', type: 'operator' },
weapon: { title: '武器皮肤', type: 'weapon' },
other: { title: '其他皮肤', type: 'other' },
imported: { title: '其他皮肤', type: 'other' },
}
return Object.entries(groups as Record<string, unknown>)
.map(([key, value]) => {
const meta = titles[key] || { title: key, type: 'other' }
return {
key,
type: meta.type,
title: meta.title,
options: Array.isArray(value)
? value.filter((skin): skin is string => typeof skin === 'string')
: [],
}
})
.filter(group => group.options.length)
return getDetailSkinGroups(listing.value)
})
const highlightSkins = computed(() => {
if (!listing.value) return []
return getHighlightSkins(listing.value, 6)
})
const totalSkinCount = computed(() => {
return detailSkinGroups.value.reduce((acc, g) => acc + g.options.length, 0)
})
function scrollToSkinShowcase() {
skinShowcaseRef.value?.scrollIntoView({ behavior: 'smooth', block: 'start' })
}
// 规格胶囊(过滤已展示的哈夫币、保险、AWM)
const secondaryChips = computed(() => {
if (!listing.value) return []
@@ -381,33 +370,6 @@ function updateAgreementReadState(type: 'virtual' | 'renter') {
}
}
// 锁定/解锁背景滚动
watch(agreementVisible, visible => {
const pcMain = document.querySelector('.pc-main') as HTMLElement
if (!pcMain) return
if (visible) {
const scrollTop = pcMain.scrollTop || 0
pcMain.style.overflow = 'hidden'
pcMain.style.position = 'fixed'
pcMain.style.top = `-${scrollTop}px`
pcMain.style.left = '0'
pcMain.style.right = '0'
pcMain.style.width = '100%'
pcMain.dataset.scrollTop = String(scrollTop)
} else {
const scrollTop = parseInt(pcMain.dataset.scrollTop || '0', 10)
pcMain.style.overflow = ''
pcMain.style.position = ''
pcMain.style.top = ''
pcMain.style.left = ''
pcMain.style.right = ''
pcMain.style.width = ''
pcMain.scrollTop = scrollTop
delete pcMain.dataset.scrollTop
}
})
function handleToggleFavorite() {
if (!listing.value) return
const added = toggleFavorite(listing.value)
@@ -553,6 +515,31 @@ function goBack() {
}}</strong>
</div>
</div>
<!-- 首屏高光皮肤速览条(若有) -->
<div v-if="highlightSkins.length" class="header-skin-strip">
<div class="header-skin-label">
<van-icon name="diamond-o" :size="15" />
<span>精选皮肤</span>
<strong class="header-skin-total">{{ totalSkinCount }}款</strong>
</div>
<div class="header-skin-list">
<span
v-for="(skin, index) in highlightSkins"
:key="`${skin.type}-${skin.name}-${index}`"
class="header-skin-chip"
:class="`skin-type-${skin.type}`"
>
<i class="quality-gem" />
<span class="header-skin-badge">{{ skin.badge }}</span>
<span class="header-skin-name">{{ skin.name }}</span>
</span>
</div>
<button type="button" class="header-skin-jump" @click="scrollToSkinShowcase">
<span>查看展台</span>
<van-icon name="arrow-down" :size="12" />
</button>
</div>
</section>
<!-- 多图互动验号展台 (Gallery Showcase) -->
@@ -641,6 +628,67 @@ function goBack() {
</div>
</section>
<!-- 精选皮肤展台(若有) -->
<section
v-if="detailSkinGroups.length"
id="skin-showcase"
ref="skinShowcaseRef"
class="detail-card skin-card"
>
<div class="section-title-bar skin-showcase-header">
<div class="title-left">
<span class="skin-header-badge" aria-hidden="true">
<van-icon name="diamond-o" :size="18" />
</span>
<div class="skin-title-copy">
<h2>精选皮肤展台</h2>
<span class="title-tip">包含近战、红皮、金皮及武器涂装等核心外观资产</span>
</div>
</div>
<div class="skin-summary-bar">
<span
v-for="group in detailSkinGroups"
:key="group.key"
class="skin-summary-chip"
:class="`skin-type-${group.type}`"
>
<i class="quality-gem" />
<span>{{ group.badge }} {{ group.options.length }}</span>
</span>
<span class="skin-total-badge">共 {{ totalSkinCount }} 款精选</span>
</div>
</div>
<div class="skin-groups-container">
<div
v-for="group in detailSkinGroups"
:key="group.key"
class="skin-group-block"
:class="[`skin-cabinet-${group.type}`, { 'is-wide': group.isWide }]"
>
<div class="skin-group-header">
<div class="skin-group-title-wrap">
<span class="skin-group-accent" />
<span class="skin-group-title">{{ group.title }}</span>
<span class="skin-tier-tag">{{ group.tierLabel }}</span>
</div>
<span class="skin-group-count">{{ group.options.length }} 款</span>
</div>
<div class="skin-pill-wrap">
<span
v-for="opt in group.options"
:key="opt"
class="skin-pill"
:class="`skin-type-${group.type}`"
>
<i class="quality-gem" />
<span class="skin-pill-name">{{ opt }}</span>
</span>
</div>
</div>
</div>
</section>
<!-- 号主说明与交接备注 -->
<section class="detail-card note-card">
<div class="section-title-bar">
@@ -656,37 +704,6 @@ function goBack() {
</div>
</section>
<!-- 精选皮肤展台(若有) -->
<section v-if="detailSkinGroups.length" class="detail-card skin-card">
<div class="section-title-bar">
<div class="title-left">
<h2>精选皮肤展台</h2>
<span class="title-tip">包含近战、金皮、红皮及武器皮肤</span>
</div>
<span class="gallery-count">共 {{ totalSkinCount }} 款精选</span>
</div>
<div class="skin-groups-container">
<div v-for="group in detailSkinGroups" :key="group.key" class="skin-group-block">
<div class="skin-group-header">
<span class="skin-group-title">{{ group.title }}</span>
<span class="skin-group-count">{{ group.options.length }} 款</span>
</div>
<div class="skin-pill-wrap">
<span
v-for="opt in group.options"
:key="opt"
class="skin-pill"
:class="`skin-type-${group.type}`"
>
<i class="quality-dot" />
<span>{{ opt }}</span>
</span>
</div>
</div>
</div>
</section>
<!-- 仓库贵重物资 & 额外消耗品(若有) -->
<section v-if="resourceItems.length" class="detail-card resources-card">
<div class="section-title-bar">
@@ -880,6 +897,7 @@ function goBack() {
v-model="agreementVisible"
title="下单协议确认"
width="860px"
style="max-width: calc(100vw - 32px)"
class="order-agreement-dialog"
:close-on-click-modal="false"
>
@@ -3,12 +3,28 @@
========================================================================== */
.mobile-detail {
--detail-surface: var(--brand-surface);
--detail-surface-sub: var(--brand-surface-muted);
--detail-border: #e2e8f0;
--detail-sub-border: #e8edf5;
--detail-radius-card: 16px;
--detail-radius-tile: 12px;
--detail-radius-sub: 10px;
--detail-radius-chip: 8px;
min-height: 100dvh;
background: #f1f5f9;
background: var(--brand-canvas);
padding-bottom: calc(84px + env(safe-area-inset-bottom));
box-sizing: border-box;
}
:global(html[data-site='jieyou'] .mobile-detail) {
--detail-surface: var(--brand-surface);
--detail-surface-sub: var(--brand-surface-muted);
--detail-border: var(--brand-border);
--detail-sub-border: var(--brand-border);
}
/* ========== 顶部导航 ========== */
.page-header {
position: sticky;
@@ -19,8 +35,8 @@
justify-content: space-between;
height: 48px;
padding: 0 12px;
background: #ffffff;
border-bottom: 1px solid #e2e8f0;
background: var(--detail-surface);
border-bottom: 1px solid var(--detail-border);
}
.page-header h1 {
@@ -30,7 +46,7 @@
font-weight: 800;
color: var(--brand-ink);
text-align: center;
letter-spacing: -0.01em;
letter-spacing: 0;
}
.back-btn,
@@ -41,14 +57,14 @@
place-items: center;
border: none;
background: none;
color: #334155;
color: var(--brand-ink);
cursor: pointer;
border-radius: 8px;
}
.back-btn:active,
.favorite-header-btn:active {
background: #f1f5f9;
background: var(--detail-surface-sub);
}
.favorite-header-btn {
@@ -68,11 +84,11 @@
gap: 8px;
margin: 10px 12px 6px;
padding: 8px 12px;
background: #fffcf5;
border: 1px solid #fef3c7;
background: var(--brand-primary-soft);
border: 1px solid var(--brand-border);
border-radius: 10px;
font-size: 11.5px;
color: #92400e;
color: var(--brand-primary-strong);
line-height: 1.45;
box-shadow: 0 1px 3px rgba(245, 158, 11, 0.05);
}
@@ -81,13 +97,17 @@
font-weight: 500;
}
.fraud-tip .van-icon {
color: var(--brand-primary);
}
/* ========== 通用信息卡片 (对齐 PC detail-card) ========== */
.info-card {
margin: 10px 12px;
padding: 16px;
background: #ffffff;
border-radius: 16px;
border: 1px solid #e8edf5;
background: var(--detail-surface);
border-radius: var(--detail-radius-card);
border: 1px solid var(--detail-border);
box-shadow: 0 3px 12px rgba(15, 23, 42, 0.03);
}
@@ -145,7 +165,7 @@
align-items: center;
gap: 4px;
padding: 3px 8px;
border-radius: 6px;
border-radius: var(--detail-radius-chip);
background: #eff6ff;
border: 1px solid #bfdbfe;
color: #2563eb;
@@ -159,7 +179,7 @@
align-items: center;
gap: 3px;
padding: 2px 7px;
border-radius: 5px;
border-radius: var(--detail-radius-chip);
font-size: 11px;
font-weight: 600;
}
@@ -181,7 +201,7 @@
.platform-pill.password,
.platform-pill.default {
background: #f1f5f9;
background: var(--detail-surface-sub);
color: #475569;
}
@@ -210,7 +230,7 @@
align-items: center;
gap: 5px;
padding: 2px 8px;
border-radius: 5px;
border-radius: 999px;
background: #f0fdf4;
border: 1px solid #dcfce7;
color: #15803d;
@@ -240,9 +260,9 @@
align-items: center;
gap: 3px;
padding: 3px 9px;
border: 1px solid #e2e8f0;
border: 1px solid var(--detail-border);
border-radius: 999px;
background: #ffffff;
background: var(--detail-surface);
color: var(--brand-muted);
font-size: 11px;
font-weight: 600;
@@ -258,11 +278,12 @@
.detail-title {
margin: 0 0 6px;
padding: 0;
font-size: 17px;
font-weight: 800;
color: var(--brand-ink);
line-height: 1.4;
letter-spacing: -0.015em;
letter-spacing: 0;
}
.detail-desc {
@@ -298,18 +319,18 @@
flex-direction: column;
gap: 4px;
padding: 10px 12px;
border-radius: 10px;
background: var(--brand-canvas);
border: 1px solid #e2e8f0;
border-radius: var(--detail-radius-tile);
background: var(--detail-surface-sub);
border: 1px solid var(--detail-sub-border);
}
.coin-tile {
background: #fff9f5;
background: var(--brand-primary-soft);
border-color: var(--brand-border);
}
.slot-tile.top-insurance {
background: #fff9f5;
background: var(--brand-primary-soft);
border-color: var(--brand-border);
}
@@ -353,13 +374,19 @@
font-size: 19px;
font-weight: 800;
line-height: 1.15;
letter-spacing: -0.02em;
letter-spacing: 0;
}
.core-assets-bar.has-ratio .tile-value {
font-size: 16px;
}
.tile-value,
.res-qty,
.cell-val {
font-variant-numeric: tabular-nums;
}
.text-orange {
color: var(--brand-primary-strong);
}
@@ -376,14 +403,91 @@
color: var(--brand-primary-strong);
}
/* 首屏高光皮肤速览条 */
.header-skin-strip {
display: flex;
flex-direction: column;
gap: 8px;
margin-top: 10px;
padding: 10px 12px;
border-radius: var(--detail-radius-tile);
background: var(--detail-surface-sub);
border: 1px solid var(--detail-sub-border);
cursor: pointer;
}
.header-skin-top {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.header-skin-label {
display: inline-flex;
align-items: center;
gap: 5px;
font-size: 12px;
font-weight: 800;
color: var(--brand-ink);
}
.header-skin-label .van-icon {
color: var(--brand-primary-strong);
}
.header-skin-total {
padding: 1px 6px;
border-radius: 999px;
background: var(--brand-primary-soft);
border: 1px solid var(--brand-border);
color: var(--brand-primary-strong);
font-size: 10.5px;
font-weight: 800;
}
.header-skin-jump {
display: inline-flex;
align-items: center;
gap: 2px;
font-size: 11px;
font-weight: 700;
color: var(--brand-primary-strong);
}
.header-skin-list {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.header-skin-chip {
display: inline-flex;
align-items: center;
gap: 5px;
padding: 4px 8px;
border-radius: var(--detail-radius-chip);
background: var(--detail-surface);
border: 1px solid var(--detail-sub-border);
font-size: 11.5px;
font-weight: 700;
color: var(--brand-ink);
}
.header-skin-badge {
font-size: 10px;
font-weight: 800;
opacity: 0.85;
}
/* ========== 2. 验号多图互动展台 (Gallery Stage) ========== */
.gallery-stage {
position: relative;
width: 100%;
aspect-ratio: 16 / 10;
border-radius: 10px;
border-radius: var(--detail-radius-tile);
overflow: hidden;
background: var(--brand-ink);
background: var(--detail-surface-sub);
}
.stage-viewer {
@@ -417,7 +521,7 @@
top: 8px;
left: 8px;
padding: 3px 8px;
border-radius: 5px;
border-radius: var(--detail-radius-chip);
background: rgba(15, 23, 42, 0.75);
backdrop-filter: blur(4px);
color: #ffffff;
@@ -437,7 +541,7 @@
border-radius: 999px;
background: rgba(15, 23, 42, 0.65);
backdrop-filter: blur(4px);
color: #f1f5f9;
color: rgba(255, 255, 255, 0.92);
font-size: 10px;
z-index: 2;
}
@@ -464,10 +568,10 @@
flex: 0 0 76px;
height: 52px;
position: relative;
border-radius: 6px;
border-radius: var(--detail-radius-chip);
overflow: hidden;
border: 2px solid transparent;
background: var(--brand-ink);
border: 2px solid var(--detail-sub-border);
background: var(--detail-surface-sub);
cursor: pointer;
padding: 0;
transition: all 0.15s ease;
@@ -524,9 +628,9 @@
align-items: center;
gap: 4px;
padding: 3px 8px;
border-radius: 6px;
background: var(--brand-canvas);
border: 1px solid #e2e8f0;
border-radius: var(--detail-radius-chip);
background: var(--detail-surface-sub);
border: 1px solid var(--detail-sub-border);
font-size: 11px;
}
@@ -550,9 +654,9 @@
flex-direction: column;
gap: 2px;
padding: 8px 10px;
border-radius: 8px;
background: var(--brand-canvas);
border: 1px solid #edf2f7;
border-radius: var(--detail-radius-sub);
background: var(--detail-surface-sub);
border: 1px solid var(--detail-sub-border);
}
.cell-label {
@@ -569,6 +673,69 @@
}
/* ========== 4. 精选皮肤展台 (Skin Card) ========== */
.skin-card {
scroll-margin-top: 58px;
}
.skin-showcase-header {
margin-bottom: 10px;
}
.skin-title-row {
flex-direction: row;
align-items: center;
gap: 9px;
}
.skin-header-badge {
width: 32px;
height: 32px;
border-radius: var(--detail-radius-sub);
display: inline-flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
background: linear-gradient(
135deg,
var(--brand-primary-soft) 0%,
rgb(var(--brand-primary-rgb) / 0.16) 100%
);
border: 1px solid var(--brand-border);
color: var(--brand-primary-strong);
}
.skin-total-badge {
display: inline-flex;
align-items: center;
padding: 4px 10px;
border-radius: 999px;
background: var(--brand-primary-soft);
border: 1px solid var(--brand-border);
color: var(--brand-primary-strong);
font-size: 11.5px;
font-weight: 800;
flex-shrink: 0;
}
.skin-summary-bar {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-bottom: 12px;
}
.skin-summary-chip {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 3px 8px;
border-radius: 999px;
font-size: 11px;
font-weight: 700;
border: 1px solid var(--detail-sub-border);
background: var(--detail-surface);
}
.skin-groups-container {
display: flex;
flex-direction: column;
@@ -578,92 +745,220 @@
.skin-group-block {
display: flex;
flex-direction: column;
gap: 6px;
gap: 9px;
padding: 12px;
border-radius: var(--detail-radius-tile);
border: 1px solid var(--detail-sub-border);
background: var(--detail-surface-sub);
}
.skin-group-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 6px;
}
.skin-group-title {
font-size: 12px;
font-weight: 700;
color: #334155;
}
.skin-group-count {
padding: 1px 6px;
border-radius: 999px;
background: #f1f5f9;
color: var(--brand-muted);
font-size: 10px;
font-weight: 600;
}
.skin-pill-wrap {
.skin-group-title-wrap {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.skin-pill {
display: inline-flex;
align-items: center;
gap: 5px;
padding: 3px 8px;
border-radius: 6px;
background: var(--brand-canvas);
border: 1px solid #e2e8f0;
font-size: 11.5px;
font-weight: 600;
color: #1e293b;
gap: 6px;
min-width: 0;
}
.quality-dot {
width: 6px;
height: 6px;
.skin-group-accent {
width: 3px;
height: 13px;
border-radius: 999px;
background: #94a3b8;
flex-shrink: 0;
}
/* 皮肤各品级颜色 */
.skin-type-melee {
background: var(--brand-primary-soft);
border-color: var(--brand-border);
color: var(--brand-primary-strong);
.skin-group-title {
font-size: 13px;
font-weight: 800;
color: var(--brand-ink);
}
.skin-type-melee .quality-dot {
background: var(--brand-primary-strong);
.skin-tier-tag {
padding: 1px 6px;
border-radius: var(--detail-radius-chip);
font-size: 10px;
font-weight: 700;
background: rgba(255, 255, 255, 0.8);
color: #475569;
border: 1px solid rgba(148, 163, 184, 0.24);
}
.skin-group-count {
padding: 1px 7px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.9);
border: 1px solid rgba(148, 163, 184, 0.24);
color: #334155;
font-size: 10.5px;
font-weight: 700;
flex-shrink: 0;
}
.skin-pill-wrap {
display: flex;
flex-wrap: wrap;
gap: 7px;
}
.skin-pill {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 11px;
border-radius: var(--detail-radius-chip);
background: var(--detail-surface);
border: 1px solid var(--detail-sub-border);
font-size: 12.5px;
font-weight: 700;
color: var(--brand-ink);
box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}
.quality-gem {
width: 6px;
height: 6px;
border-radius: 1.5px;
transform: rotate(45deg);
background: #94a3b8;
flex-shrink: 0;
}
/* 移动端品级展柜配色:统一纯净底色,避免多重色块杂乱 */
.skin-cabinet-melee,
.skin-cabinet-operatorRed,
.skin-cabinet-operatorGold,
.skin-cabinet-weaponGold,
.skin-cabinet-weapon,
.skin-cabinet-operator,
.skin-cabinet-other {
background: var(--detail-surface-sub);
border-color: var(--detail-sub-border);
}
.skin-cabinet-melee .skin-group-accent {
background: #9333ea;
}
.skin-cabinet-melee .skin-tier-tag {
color: #6b21a8;
border-color: #e9d5ff;
background: #faf5ff;
}
.skin-cabinet-operatorRed .skin-group-accent {
background: #e11d48;
}
.skin-cabinet-operatorRed .skin-tier-tag {
color: #9f1239;
border-color: #fecdd3;
background: #fff1f2;
}
.skin-cabinet-operatorGold .skin-group-accent,
.skin-cabinet-weaponGold .skin-group-accent {
background: #d97706;
}
.skin-cabinet-operatorGold .skin-tier-tag,
.skin-cabinet-weaponGold .skin-tier-tag {
color: #92400e;
border-color: #fde68a;
background: #fffbeb;
}
.skin-cabinet-weapon .skin-group-accent {
background: #059669;
}
.skin-cabinet-weapon .skin-tier-tag {
color: #065f46;
border-color: #a7f3d0;
background: #ecfdf5;
}
.skin-cabinet-operator .skin-group-accent {
background: #2563eb;
}
.skin-cabinet-operator .skin-tier-tag {
color: #1e40af;
border-color: #bfdbfe;
background: #eff6ff;
}
.skin-cabinet-other .skin-group-accent {
background: #64748b;
}
.skin-cabinet-other .skin-tier-tag {
color: #334155;
border-color: #cbd5e1;
background: var(--detail-surface);
}
/* 皮肤各品级铭牌颜色 */
.skin-type-melee {
background: var(--detail-surface);
border-color: #d8b4fe;
color: #6b21a8;
}
.skin-type-melee .quality-gem {
background: #9333ea;
box-shadow: 0 0 0 2.5px rgba(147, 51, 234, 0.14);
}
.skin-type-operatorRed {
background: #fef2f2;
border-color: #fecaca;
color: #b91c1c;
background: var(--detail-surface);
border-color: #fda4af;
color: #9f1239;
}
.skin-type-operatorRed .quality-dot {
background: #ef4444;
.skin-type-operatorRed .quality-gem {
background: #e11d48;
box-shadow: 0 0 0 2.5px rgba(225, 29, 72, 0.14);
}
.skin-type-operatorGold {
background: #fffbeb;
border-color: #fde68a;
color: #b45309;
.skin-type-operatorGold,
.skin-type-weaponGold {
background: var(--detail-surface);
border-color: #fcd34d;
color: #92400e;
}
.skin-type-operatorGold .quality-dot {
background: #f59e0b;
.skin-type-operatorGold .quality-gem,
.skin-type-weaponGold .quality-gem {
background: #d97706;
box-shadow: 0 0 0 2.5px rgba(217, 119, 6, 0.14);
}
.skin-type-weapon {
background: #f0fdf4;
border-color: #bbf7d0;
color: #15803d;
background: var(--detail-surface);
border-color: #6ee7b7;
color: #065f46;
}
.skin-type-weapon .quality-dot {
background: #22c55e;
.skin-type-weapon .quality-gem {
background: #059669;
box-shadow: 0 0 0 2.5px rgba(5, 150, 105, 0.14);
}
.skin-type-operator {
background: var(--detail-surface);
border-color: #93c5fd;
color: #1e40af;
}
.skin-type-operator .quality-gem {
background: #2563eb;
box-shadow: 0 0 0 2.5px rgba(37, 99, 235, 0.14);
}
.skin-type-other {
background: var(--detail-surface);
border-color: #cbd5e1;
color: #334155;
}
.skin-type-other .quality-gem {
background: #64748b;
box-shadow: 0 0 0 2.5px rgba(100, 116, 139, 0.14);
}
/* ========== 5. 仓库物资与额外消耗品 (Resources Card) ========== */
@@ -678,9 +973,9 @@
flex-direction: column;
gap: 6px;
padding: 10px;
border-radius: 8px;
background: var(--brand-canvas);
border: 1px solid #edf2f7;
border-radius: var(--detail-radius-sub);
background: var(--detail-surface-sub);
border: 1px solid var(--detail-sub-border);
}
.res-top {
@@ -715,7 +1010,7 @@
align-items: center;
gap: 3px;
padding: 2px 6px;
border-radius: 4px;
border-radius: var(--detail-radius-chip);
font-size: 10px;
font-weight: 700;
}
@@ -735,7 +1030,7 @@
}
.res-badge.standard {
background: #f1f5f9;
background: var(--detail-surface-sub);
color: var(--brand-muted);
}
@@ -745,8 +1040,9 @@
gap: 10px;
align-items: flex-start;
padding: 12px 14px;
border-radius: 8px;
background: var(--brand-canvas);
border-radius: var(--detail-radius-sub);
background: var(--detail-surface-sub);
border: 1px solid var(--detail-sub-border);
border-left: 3px solid var(--brand-primary-hover);
}
@@ -775,15 +1071,15 @@
gap: 8px;
align-items: flex-start;
padding: 10px;
border-radius: 8px;
background: var(--brand-canvas);
border: 1px solid #f1f5f9;
border-radius: var(--detail-radius-sub);
background: var(--detail-surface-sub);
border: 1px solid var(--detail-sub-border);
}
.trust-icon-box {
width: 32px;
height: 32px;
border-radius: 6px;
border-radius: var(--detail-radius-chip);
display: flex;
align-items: center;
justify-content: center;
@@ -842,8 +1138,8 @@
justify-content: space-between;
gap: 12px;
padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
background: #ffffff;
border-top: 1px solid #e2e8f0;
background: var(--detail-surface);
border-top: 1px solid var(--detail-border);
box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
}
@@ -875,14 +1171,15 @@
.price-currency {
font-size: 14px;
font-weight: 800;
color: #ff5f00;
color: var(--brand-primary-strong);
}
.price-amount {
font-size: 20px;
font-weight: 900;
color: #ff5f00;
letter-spacing: -0.02em;
color: var(--brand-primary-strong);
letter-spacing: 0;
font-variant-numeric: tabular-nums;
}
.order-price-detail {
@@ -898,7 +1195,7 @@
display: inline-block;
padding: 1px 5px;
border-radius: 4px;
background: #f1f5f9;
background: var(--detail-surface-sub);
color: #475569;
font-size: 10px;
}
@@ -913,9 +1210,13 @@
padding: 0 20px;
font-size: 14px;
font-weight: 800;
background: linear-gradient(135deg, var(--brand-primary-hover) 0%, #ff5f00 100%) !important;
border: none !important;
box-shadow: 0 4px 12px rgba(255, 95, 0, 0.25);
color: var(--brand-on-primary);
box-shadow: 0 4px 12px rgb(var(--brand-primary-rgb) / 0.25);
}
.bottom-order-bar .van-button.mobile-order-btn {
background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-hover) 100%);
border: none;
}
.order-btn:active {
@@ -967,9 +1268,9 @@
.agreement-content {
height: 190px;
overflow: auto;
border: 1px solid #e5e7eb;
border-radius: 8px;
background: var(--brand-canvas);
border: 1px solid var(--detail-sub-border);
border-radius: var(--detail-radius-chip);
background: var(--detail-surface-sub);
padding: 12px;
color: #1f2937;
font-size: 12px;
@@ -24,7 +24,9 @@ import {
formatRatio,
getCoinWan,
getDailyLoss,
getDetailSkinGroups,
getFaceOwnerText,
getHighlightSkins,
getListingConsumablePrice,
getListingChips,
getListingDisplayPrice,
@@ -60,6 +62,7 @@ const virtualAgreementChecked = ref(false)
const renterAgreementChecked = ref(false)
const virtualAgreementRef = ref<HTMLElement | null>(null)
const renterAgreementRef = ref<HTMLElement | null>(null)
const skinShowcaseRef = ref<HTMLElement | null>(null)
const { recordListingView, isFavorite, toggleFavorite } = useListingCollections()
const canCreateOrderAfterAgreement = computed(
@@ -208,36 +211,22 @@ function readGroupedScreenshots(item: PublicListingDetail) {
// 皮肤清单(带高光品级)
const detailSkinGroups = computed(() => {
if (!listing.value) return []
const groups = listing.value.asset_summary?.skin_groups
if (typeof groups !== 'object' || groups === null) return []
const titles: Record<string, { title: string; type: string }> = {
melee: { title: '近战皮肤', type: 'melee' },
operatorRed: { title: '干员红皮', type: 'operatorRed' },
operatorGold: { title: '干员金皮', type: 'operatorGold' },
operator: { title: '干员皮肤', type: 'operator' },
weapon: { title: '武器皮肤', type: 'weapon' },
other: { title: '其他皮肤', type: 'other' },
imported: { title: '其他皮肤', type: 'other' },
}
return Object.entries(groups as Record<string, unknown>)
.map(([key, value]) => {
const meta = titles[key] || { title: key, type: 'other' }
return {
key,
type: meta.type,
title: meta.title,
options: Array.isArray(value)
? value.filter((skin): skin is string => typeof skin === 'string')
: [],
}
})
.filter(group => group.options.length)
return getDetailSkinGroups(listing.value)
})
const highlightSkins = computed(() => {
if (!listing.value) return []
return getHighlightSkins(listing.value, 4)
})
const totalSkinCount = computed(() => {
return detailSkinGroups.value.reduce((acc, g) => acc + g.options.length, 0)
})
function scrollToSkinShowcase() {
skinShowcaseRef.value?.scrollIntoView({ behavior: 'smooth', block: 'start' })
}
// 次要规格胶囊(过滤已展示的哈夫币、保险、AWM)
const secondaryChips = computed(() => {
if (!listing.value) return []
@@ -402,7 +391,7 @@ function goBack() {
</script>
<template>
<main class="mobile-detail">
<main class="mobile-detail mobile-shell">
<!-- 顶部导航 -->
<header class="page-header">
<button class="back-btn" @click="goBack">
@@ -426,7 +415,7 @@ function goBack() {
<template v-else-if="listing">
<!-- 平台官方安全保障条 -->
<div class="fraud-tip">
<van-icon name="shield-o" :size="15" color="#f59e0b" />
<van-icon name="shield-o" :size="15" />
<span>平台官方担保:下单后请按平台交接流程确认收号与归还,切勿脱离平台私下交易。</span>
</div>
@@ -523,6 +512,33 @@ function goBack() {
<strong class="tile-value text-warm">{{ dailyLoss ? `${dailyLoss}/天` : '--' }}</strong>
</div>
</div>
<!-- 首屏高光皮肤速览条 -->
<div v-if="highlightSkins.length" class="header-skin-strip" @click="scrollToSkinShowcase">
<div class="header-skin-top">
<span class="header-skin-label">
<van-icon name="diamond-o" :size="14" />
<span>精选皮肤</span>
<strong class="header-skin-total">{{ totalSkinCount }}款</strong>
</span>
<span class="header-skin-jump">
<span>查看展台</span>
<van-icon name="arrow-down" :size="11" />
</span>
</div>
<div class="header-skin-list">
<span
v-for="(skin, index) in highlightSkins"
:key="`${skin.type}-${skin.name}-${index}`"
class="header-skin-chip"
:class="`skin-type-${skin.type}`"
>
<i class="quality-gem" />
<span class="header-skin-badge">{{ skin.badge }}</span>
<span>{{ skin.name }}</span>
</span>
</div>
</div>
</div>
<!-- 2. 验号图片多图展台 (Interactive Gallery Showcase) -->
@@ -606,7 +622,69 @@ function goBack() {
</div>
</div>
<!-- 4. 号主留言与说明 -->
<!-- 4. 精选皮肤展台 (品级陈列柜) -->
<div
v-if="detailSkinGroups.length"
id="mobile-skin-showcase"
ref="skinShowcaseRef"
class="info-card skin-card"
>
<div class="card-header-row skin-showcase-header">
<div class="header-left skin-title-row">
<span class="skin-header-badge" aria-hidden="true">
<van-icon name="diamond-o" :size="16" />
</span>
<div>
<h3 class="card-subtitle">精选皮肤展台</h3>
<span class="card-subtitle-tip">近战、红皮、金皮及武器涂装</span>
</div>
</div>
<span class="skin-total-badge">共 {{ totalSkinCount }} 款</span>
</div>
<div class="skin-summary-bar">
<span
v-for="group in detailSkinGroups"
:key="group.key"
class="skin-summary-chip"
:class="`skin-type-${group.type}`"
>
<i class="quality-gem" />
<span>{{ group.badge }} {{ group.options.length }}</span>
</span>
</div>
<div class="skin-groups-container">
<div
v-for="group in detailSkinGroups"
:key="group.key"
class="skin-group-block"
:class="`skin-cabinet-${group.type}`"
>
<div class="skin-group-header">
<div class="skin-group-title-wrap">
<span class="skin-group-accent" />
<span class="skin-group-title">{{ group.title }}</span>
<span class="skin-tier-tag">{{ group.tierLabel }}</span>
</div>
<span class="skin-group-count">{{ group.options.length }} 款</span>
</div>
<div class="skin-pill-wrap">
<span
v-for="opt in group.options"
:key="opt"
class="skin-pill"
:class="`skin-type-${group.type}`"
>
<i class="quality-gem" />
<span>{{ opt }}</span>
</span>
</div>
</div>
</div>
</div>
<!-- 5. 号主留言与说明 -->
<div class="info-card note-card">
<div class="card-header-row">
<div class="header-left">
@@ -621,37 +699,6 @@ function goBack() {
</div>
</div>
<!-- 5. 精选皮肤展台 (带品级圆点与分类) -->
<div v-if="detailSkinGroups.length" class="info-card skin-card">
<div class="card-header-row">
<div class="header-left">
<h3 class="card-subtitle">精选皮肤展台</h3>
<span class="card-subtitle-tip">包含近战、金皮、红皮及武器皮肤</span>
</div>
<span class="gallery-count">共 {{ totalSkinCount }} 款精选</span>
</div>
<div class="skin-groups-container">
<div v-for="group in detailSkinGroups" :key="group.key" class="skin-group-block">
<div class="skin-group-header">
<span class="skin-group-title">{{ group.title }}</span>
<span class="skin-group-count">{{ group.options.length }} 款</span>
</div>
<div class="skin-pill-wrap">
<span
v-for="opt in group.options"
:key="opt"
class="skin-pill"
:class="`skin-type-${group.type}`"
>
<i class="quality-dot" />
<span>{{ opt }}</span>
</span>
</div>
</div>
</div>
</div>
<!-- 6. 仓库物资与额外消耗品 -->
<div v-if="resourceItems.length" class="info-card resources-card">
<div class="card-header-row">
@@ -735,7 +782,7 @@ function goBack() {
<div class="bottom-spacer"></div>
<!-- 底部下单栏(更专业的设计:支持押金提示与明细展开) -->
<div class="order-bar">
<div class="order-bar bottom-order-bar">
<div class="order-bar-left">
<div class="order-price">
<span class="price-caption">租金合计</span>
@@ -760,7 +807,7 @@ function goBack() {
<van-button
type="primary"
round
class="order-btn"
class="order-btn mobile-order-btn"
:loading="ordering || agreementsLoading"
loading-text="下单中..."
@click="handleCreateOrder"
+2
View File
@@ -763,7 +763,9 @@
/* ========== 主体 ---------- */
.pc-main {
flex: 1;
width: min(1768px, 100%);
min-width: 0;
margin: 0 auto;
padding: 20px 24px;
overflow-x: clip;
}
@@ -1,7 +1,9 @@
import { describe, expect, it } from 'vitest'
import {
getDetailSkinGroups,
getFaceOwnerText,
getHighlightSkins,
getListingChips,
getListingResources,
getListingSellerCoinPrice,
@@ -216,3 +218,63 @@ describe('库存资源解析', () => {
expect(resources.map(item => item.key)).toEqual(['gift'])
})
})
describe('详情页皮肤分组排序与排版', () => {
it('按近战、红皮、金皮、武器顺序排列并去重空白项,且为奇数尾项标记通栏', () => {
const groups = getDetailSkinGroups(
buildListing({
skin_groups: {
weapon: ['M4-青龙', ' '],
operatorGold: ['红狼-电锯惊魂', '威龙-吴彦祖', '红狼-电锯惊魂', '疾风-西部往事'],
melee: ['北极星'],
operatorRed: ['维什戴尔'],
other: [],
},
})
)
expect(groups.map(group => group.key)).toEqual([
'melee',
'operatorRed',
'operatorGold',
'weapon',
])
expect(groups[2]?.options).toEqual(['红狼-电锯惊魂', '威龙-吴彦祖', '疾风-西部往事'])
expect(groups.map(group => group.isWide)).toEqual([false, false, false, false])
})
it('超过4款的皮肤分组自动通栏并将前序孤立半栏卡片补齐为通栏', () => {
const groups = getDetailSkinGroups(
buildListing({
skin_groups: {
melee: ['北极星'],
operatorGold: ['金皮1', '金皮2', '金皮3', '金皮4'],
weapon: ['武器1'],
},
})
)
expect(groups.map(group => group.key)).toEqual(['melee', 'operatorGold', 'weapon'])
expect(groups.map(group => group.isWide)).toEqual([true, true, true])
})
it('首屏精选皮肤按优先级截取上限数量', () => {
const highlights = getHighlightSkins(
buildListing({
skin_groups: {
operatorGold: ['金皮A', '金皮B', '金皮C'],
melee: ['北极星'],
operatorRed: ['维什戴尔'],
},
}),
4
)
expect(highlights).toEqual([
{ name: '北极星', type: 'melee', badge: '近战' },
{ name: '维什戴尔', type: 'operatorRed', badge: '红皮' },
{ name: '金皮A', type: 'operatorGold', badge: '金皮' },
{ name: '金皮B', type: 'operatorGold', badge: '金皮' },
])
})
})
+140
View File
@@ -22,6 +22,28 @@ export interface ListingDisplaySkinGroup {
options: string[]
}
export type DetailSkinType =
| 'operatorRed'
| 'melee'
| 'operatorGold'
| 'weaponGold'
| 'weapon'
| 'operator'
| 'other'
export interface DetailSkinGroup extends ListingDisplaySkinGroup {
type: DetailSkinType
badge: string
tierLabel: string
isWide?: boolean
}
export interface ListingHighlightSkinItem {
name: string
type: DetailSkinType
badge: string
}
export function getCoinWan(item: PublicListingItem) {
return Math.round(Number(item.haf_coin_amount || 0) / 10000)
}
@@ -271,10 +293,128 @@ export function getListingSkinGroups(item: PublicListingItem): ListingDisplaySki
.filter(group => group.options.length)
}
const DETAIL_SKIN_META: Record<
string,
{ title: string; type: DetailSkinType; badge: string; tierLabel: string; order: number }
> = {
melee: { title: '近战皮肤', type: 'melee', badge: '近战', tierLabel: '典藏近战', order: 1 },
operatorRed: {
title: '干员红皮',
type: 'operatorRed',
badge: '红皮',
tierLabel: '臻红限定',
order: 2,
},
operatorGold: {
title: '干员金皮',
type: 'operatorGold',
badge: '金皮',
tierLabel: '耀金品质',
order: 3,
},
weaponGold: {
title: '武器金皮',
type: 'weaponGold',
badge: '武金',
tierLabel: '鎏金涂装',
order: 4,
},
weapon: { title: '武器皮肤', type: 'weapon', badge: '武器', tierLabel: '精工涂装', order: 5 },
operator: {
title: '干员皮肤',
type: 'operator',
badge: '干员',
tierLabel: '战术外观',
order: 6,
},
other: { title: '其他皮肤', type: 'other', badge: '精选', tierLabel: '精选外观', order: 7 },
imported: { title: '其他皮肤', type: 'other', badge: '精选', tierLabel: '精选外观', order: 8 },
}
export function getDetailSkinGroups(item: PublicListingItem): DetailSkinGroup[] {
const skinGroups = item.asset_summary?.skin_groups
if (typeof skinGroups !== 'object' || skinGroups === null) return []
const groups: DetailSkinGroup[] = Object.entries(skinGroups as Record<string, unknown>)
.map(([key, value], index) => {
const meta = DETAIL_SKIN_META[key] || {
title: key,
type: 'other' as DetailSkinType,
badge: '精选',
tierLabel: '精选外观',
order: 99 + index,
}
const seen = new Set<string>()
const options = Array.isArray(value)
? value
.filter((skin): skin is string => typeof skin === 'string')
.map(skin => skin.trim())
.filter(skin => {
if (!skin || seen.has(skin)) return false
seen.add(skin)
return true
})
: []
return {
key,
type: meta.type,
title: meta.title,
badge: meta.badge,
tierLabel: meta.tierLabel,
order: meta.order,
options,
isWide: options.length >= 4,
}
})
.filter(group => group.options.length > 0)
.sort((a, b) => a.order - b.order)
.map(({ order: _order, ...group }) => group)
// 2 列 Bento 排版消缺:连续非通栏卡片若为奇数个,将最后一个设为通栏,避免右侧留白
let halfRun = 0
for (let i = 0; i < groups.length; i += 1) {
const group = groups[i]
if (!group) continue
if (group.isWide) {
if (halfRun % 2 === 1 && i > 0) {
const prev = groups[i - 1]
if (prev) prev.isWide = true
}
halfRun = 0
} else {
halfRun += 1
}
}
if (halfRun % 2 === 1 && groups.length > 0) {
const last = groups[groups.length - 1]
if (last) last.isWide = true
}
return groups
}
export function getSkinNames(item: PublicListingItem) {
return getListingSkinGroups(item).flatMap(group => group.options)
}
export function getHighlightSkins(item: PublicListingItem, limit = 6): ListingHighlightSkinItem[] {
const groups = getDetailSkinGroups(item)
const result: ListingHighlightSkinItem[] = []
for (const group of groups) {
for (const name of group.options) {
result.push({
name,
type: group.type,
badge: group.badge,
})
if (result.length >= limit) {
return result
}
}
}
return result
}
export function assetRegions(item: PublicListingItem) {
const regions = item.asset_summary?.common_regions
return Array.isArray(regions)
+4
View File
@@ -18,3 +18,7 @@ html[data-site='dachui'] {
--brand-font-body: Inter, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
--brand-font-display: Inter, 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
}
html[data-site='dachui'] .pc-app-shell:has(.pc-detail-page) {
background: #eef2f7;
}
+1 -622
View File
@@ -59,6 +59,7 @@
.page {
width: 100%;
max-width: 1720px;
margin: 0 auto;
}
.page-header {
@@ -466,628 +467,6 @@ h1 {
justify-content: flex-end;
}
/* PC public marketplace */
.pc-app-shell {
min-height: 100vh;
background: #f5f7fa;
}
.pc-topbar {
position: sticky;
top: 0;
z-index: 20;
display: grid;
grid-template-columns: auto auto minmax(260px, 420px) auto;
align-items: center;
gap: 18px;
min-height: 66px;
border-bottom: 1px solid #e8edf3;
background: rgba(255, 255, 255, 0.94);
padding: 0 clamp(20px, 4vw, 56px);
backdrop-filter: blur(12px);
}
.pc-brand,
.pc-nav,
.pc-user-actions,
.pc-search,
.pc-login-link,
.pc-post-link,
.pc-icon-link {
display: flex;
align-items: center;
}
.pc-brand {
gap: 10px;
font-weight: 800;
}
.pc-brand-mark {
display: inline-flex;
align-items: center;
justify-content: center;
width: 38px;
height: 38px;
border-radius: 12px;
background: #fff3e8;
color: var(--brand-primary);
font-size: 13px;
font-weight: 900;
}
.pc-brand-text {
color: #111827;
font-size: 17px;
}
.pc-nav {
gap: 6px;
}
.pc-nav-link {
display: inline-flex;
align-items: center;
gap: 7px;
min-height: 40px;
border-radius: 999px;
padding: 0 14px;
color: #4b5563;
font-size: 14px;
font-weight: 600;
}
.pc-nav-link.router-link-active,
.pc-nav-link:hover {
background: #fff3e8;
color: var(--brand-primary);
}
.pc-search {
gap: 10px;
height: 40px;
border: 1px solid #edf1f6;
border-radius: 999px;
background: #f7f9fc;
padding: 0 16px;
color: #7b8798;
}
.pc-search input {
width: 100%;
border: 0;
outline: 0;
background: transparent;
color: #111827;
font-size: 14px;
}
.pc-user-actions {
justify-content: flex-end;
gap: 10px;
}
.pc-icon-link,
.pc-login-link,
.pc-post-link {
justify-content: center;
min-height: 40px;
border-radius: 999px;
font-weight: 700;
}
.pc-icon-link {
width: 40px;
border: 1px solid #e8edf3;
background: #ffffff;
color: #4b5563;
}
.pc-login-link {
gap: 6px;
border: 1px solid #e8edf3;
background: #ffffff;
padding: 0 14px;
color: #111827;
}
.pc-post-link {
gap: 6px;
background: var(--brand-primary);
padding: 0 16px;
color: #ffffff;
box-shadow: 0 10px 22px rgb(var(--brand-primary-rgb) / 0.18);
}
.pc-post-link.large {
min-height: 44px;
padding: 0 22px;
}
.pc-main {
width: min(1720px, calc(100% - 40px));
margin: 0 auto;
padding: 18px 0 56px;
}
.anti-fraud-strip {
display: flex;
align-items: center;
gap: 10px;
min-height: 44px;
border: 1px solid #fde68a;
border-radius: 14px;
background: linear-gradient(90deg, #fffbeb, #fef3c7);
padding: 10px 16px;
color: #92400e;
font-size: 14px;
font-weight: 600;
}
.anti-fraud-strip.compact {
margin-bottom: 22px;
}
.pc-hero {
display: grid;
grid-template-columns: minmax(0, 1fr) 340px;
gap: 24px;
margin-top: 18px;
}
.pc-hero-content,
.pc-action-card,
.advanced-filter-card,
.resource-card,
.feature-card,
.pc-stat-card {
border: 1px solid rgba(229, 231, 235, 0.9);
background: rgba(255, 255, 255, 0.92);
box-shadow: 0 18px 44px rgba(17, 24, 39, 0.08);
}
.pc-hero-content {
min-height: 360px;
border-radius: 28px;
background:
linear-gradient(135deg, rgba(17, 24, 39, 0.82), rgba(120, 53, 15, 0.72)),
radial-gradient(circle at 82% 20%, rgba(251, 191, 36, 0.9), transparent 24%), #111827;
padding: 48px;
color: #ffffff;
overflow: hidden;
}
.pc-hero-content .eyebrow {
color: #fbbf24;
}
.pc-hero h1 {
max-width: 620px;
font-size: clamp(40px, 5vw, 64px);
letter-spacing: -2px;
}
.pc-hero-desc {
max-width: 560px;
margin: 18px 0 0;
color: rgba(255, 255, 255, 0.78);
font-size: 18px;
line-height: 1.8;
}
.pc-hero-actions,
.hero-tags,
.sort-toolbar,
.resource-tags,
.resource-title-line {
display: flex;
align-items: center;
}
.pc-hero-actions {
gap: 14px;
margin-top: 32px;
}
.primary-cta,
.secondary-cta {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 46px;
border-radius: 999px;
padding: 0 22px;
font-weight: 800;
}
.primary-cta {
gap: 8px;
background: #fbbf24;
color: #111827;
}
.secondary-cta {
border: 1px solid rgba(255, 255, 255, 0.28);
color: #ffffff;
}
.hero-tags {
flex-wrap: wrap;
gap: 10px;
margin-top: 34px;
}
.hero-tags span {
border: 1px solid rgba(255, 255, 255, 0.22);
border-radius: 999px;
background: rgba(255, 255, 255, 0.1);
padding: 8px 12px;
color: #fde68a;
font-size: 13px;
}
.pc-action-card {
border-radius: 24px;
padding: 22px;
}
.pc-action-card h2 {
margin: 0 0 18px;
font-size: 20px;
}
.action-row {
display: grid;
grid-template-columns: 42px 1fr;
gap: 12px;
align-items: center;
border: 1px solid #edf0f4;
border-radius: 16px;
background: #ffffff;
padding: 14px;
}
.action-row + .action-row {
margin-top: 12px;
}
.action-row .el-icon {
width: 42px;
height: 42px;
border-radius: 14px;
background: var(--brand-primary-soft);
color: var(--brand-primary-strong);
font-size: 20px;
}
.action-row strong,
.action-row span {
display: block;
}
.action-row strong {
color: #111827;
}
.action-row span {
margin-top: 4px;
color: #6b7280;
font-size: 13px;
line-height: 1.5;
}
.action-row.highlight {
border-color: #fbbf24;
background: #fffbeb;
}
.pc-stat-grid,
.pc-feature-row {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 16px;
margin-top: 20px;
}
.pc-stat-card,
.feature-card {
border-radius: 20px;
padding: 20px;
}
.pc-stat-card span,
.feature-card span {
color: #6b7280;
font-size: 13px;
}
.pc-stat-card strong,
.feature-card strong {
display: block;
margin-top: 8px;
color: #111827;
font-size: 24px;
}
.pc-stat-card p {
margin: 8px 0 0;
color: #6b7280;
}
.feature-card .el-icon {
color: #f59e0b;
font-size: 24px;
}
.feature-card strong {
font-size: 18px;
}
.listings-header {
align-items: center;
margin-bottom: 18px;
}
.advanced-filter-card {
border-radius: 22px;
padding: 20px;
}
.filter-title,
.sort-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
}
.filter-title strong {
color: #111827;
font-size: 18px;
}
.filter-title span {
color: #6b7280;
}
.pc-filter-grid {
display: grid;
grid-template-columns: 1.25fr repeat(4, minmax(0, 1fr));
gap: 14px;
margin-top: 16px;
}
.pc-filter-grid .el-form-item {
margin-bottom: 0;
}
.sort-toolbar {
margin-top: 16px;
}
.pc-resource-list {
display: grid;
gap: 14px;
margin-top: 18px;
}
.resource-card {
display: grid;
grid-template-columns: 150px minmax(0, 1fr) 150px;
gap: 18px;
align-items: center;
border-radius: 22px;
padding: 14px;
transition:
transform 0.18s ease,
box-shadow 0.18s ease;
}
.resource-card:hover {
transform: translateY(-2px);
box-shadow: 0 22px 50px rgba(17, 24, 39, 0.12);
}
.resource-cover {
display: grid;
place-items: center;
height: 108px;
border-radius: 18px;
background: linear-gradient(135deg, #111827, #f59e0b);
color: #ffffff;
font-weight: 900;
overflow: hidden;
}
.resource-cover img {
width: 100%;
height: 100%;
object-fit: cover;
}
.resource-title-line {
justify-content: space-between;
gap: 12px;
}
.resource-title-line strong {
color: #111827;
font-size: 19px;
}
.resource-title-line em {
border-radius: 999px;
background: #dcfce7;
padding: 4px 10px;
color: #166534;
font-size: 12px;
font-style: normal;
font-weight: 700;
}
.resource-main p {
display: -webkit-box;
margin: 10px 0 0;
overflow: hidden;
color: #6b7280;
line-height: 1.6;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.resource-tags {
flex-wrap: wrap;
gap: 8px;
margin-top: 12px;
}
.resource-tags span {
border-radius: 999px;
background: #f3f4f6;
padding: 5px 10px;
color: #4b5563;
font-size: 12px;
}
.resource-price-box {
border-left: 1px solid #edf0f4;
padding-left: 18px;
text-align: right;
}
.resource-price-box span,
.resource-price-box em,
.resource-price-box small {
display: block;
color: #6b7280;
font-style: normal;
}
.resource-price-box strong {
display: block;
margin: 4px 0;
color: #ef4444;
font-size: 28px;
}
.pc-detail-layout {
display: grid;
grid-template-columns: minmax(0, 1fr) 360px;
gap: 22px;
}
.pc-detail-main,
.pc-order-card {
border: 1px solid rgba(229, 231, 235, 0.9);
border-radius: 24px;
background: #ffffff;
box-shadow: 0 18px 44px rgba(17, 24, 39, 0.08);
}
.pc-detail-main {
overflow: hidden;
}
.detail-cover {
display: grid;
place-items: center;
height: 300px;
background: linear-gradient(135deg, #111827, #92400e 54%, #f59e0b);
color: #ffffff;
font-size: 28px;
font-weight: 900;
letter-spacing: 1px;
}
.detail-cover img {
width: 100%;
height: 100%;
object-fit: cover;
}
.detail-title {
padding: 28px;
}
.pc-detail .detail-grid {
grid-template-columns: repeat(4, minmax(0, 1fr));
margin: 0;
padding: 0 28px 28px;
}
.pc-order-card {
position: sticky;
top: 96px;
align-self: start;
margin-top: 0;
padding: 24px;
}
.pc-order-card h2 {
margin: 0 0 8px;
font-size: 22px;
}
.order-safe-text {
margin: 0 0 18px;
color: #6b7280;
line-height: 1.7;
}
.order-total-box {
border-radius: 18px;
background: #fffbeb;
margin-bottom: 16px;
padding: 16px;
}
.order-total-box span,
.order-total-box em {
display: block;
color: #92400e;
font-style: normal;
}
.order-total-box strong {
display: block;
margin: 4px 0;
color: #ef4444;
font-size: 30px;
}
@media (max-width: 1180px) {
.pc-topbar {
grid-template-columns: auto 1fr auto;
}
.pc-search {
display: none;
}
.pc-hero,
.pc-filter-grid,
.pc-detail-layout,
.pc-detail .detail-grid {
grid-template-columns: 1fr;
}
.pc-order-card {
position: static;
}
.resource-card {
grid-template-columns: 120px minmax(0, 1fr);
}
.resource-price-box {
grid-column: 2;
border-left: 0;
border-top: 1px solid #edf0f4;
padding: 12px 0 0;
text-align: left;
}
}
@media (max-width: 760px) {
.app-shell {
grid-template-columns: 1fr;