feat(quality-owner): 增加优质号主、极品专区与无忧租号保险

- 支持保证金余额支付、在线支付开通及后台手动设置审计
- 新增极品专区发布权限、赔付方案与保险结算费率快照
- 优化首页、商品卡和个人中心的优质号主身份展示
This commit is contained in:
yml2213
2026-11-04 15:04:35 +08:00
parent 812e95e7d1
commit 98174c0e33
90 changed files with 3478 additions and 64 deletions
@@ -10,6 +10,7 @@ export interface Listing {
owner_id: number
owner_phone?: string
owner_nickname?: string
owner_is_quality_owner?: boolean
source_channel?: string
is_external_upload?: boolean
title: string
@@ -33,6 +34,9 @@ export interface Listing {
distribution_site_id?: number
distribution_site_code?: string
distribution_site_name?: string
is_premium: boolean
compensation_plan: 'normal' | 'insurance' | string
insurance_fee_bps: number
listing_group_conversation_id?: number
created_at: string
updated_at: string
@@ -52,6 +56,8 @@ export interface ListingPayload {
screenshot_urls: string[]
price_cent: number
deposit_amount_cent: number
is_premium: boolean
compensation_plan: 'normal' | 'insurance'
agreed_virtual_asset_sale: boolean
agreed_seller_agreement: boolean
}
@@ -1,6 +1,6 @@
<script setup lang="ts">
import type { Component } from 'vue'
import { Coin, Discount, Grid, Key, Moon, Present } from '@element-plus/icons-vue'
import { Coin, Discount, Grid, Key, Moon, Present, Trophy } from '@element-plus/icons-vue'
interface ZoneOption {
key: string
@@ -27,6 +27,7 @@ const zoneIcons: Record<string, Component> = {
night: Moon,
password: Key,
highCoin: Coin,
premium: Trophy,
}
function selectZone(key: string) {
@@ -41,7 +42,7 @@ function selectZone(key: string) {
:key="zone.key"
type="button"
class="zone-pill-item"
:class="{ active: activeZone === zone.key }"
:class="{ active: activeZone === zone.key, 'is-premium': zone.key === 'premium' }"
:title="zone.hint"
@click="selectZone(zone.key)"
>
@@ -89,6 +90,18 @@ function selectZone(key: string) {
box-shadow: 0 2px 8px rgba(255, 106, 0, 0.25);
}
.zone-pill-item.is-premium:not(.active) {
border-color: #ddd6fe;
background: #faf7ff;
color: #6d28d9;
}
.zone-pill-item.is-premium.active {
border-color: #7c3aed;
background: linear-gradient(135deg, #6d28d9 0%, #9333ea 100%);
box-shadow: 0 4px 14px rgba(109, 40, 217, 0.24);
}
.zone-pill-icon {
font-size: 14px;
}
@@ -99,7 +99,14 @@ function formatStatNumber(value: number) {
</script>
<template>
<RouterLink class="hfb-listing-card" :to="`/listings/${listing.id}`">
<RouterLink
class="hfb-listing-card"
:class="{
'is-quality-owner': listing.owner_is_quality_owner,
'is-premium': listing.is_premium,
}"
:to="`/listings/${listing.id}`"
>
<!-- 左侧:4:3 黄金比例单张封面(后端公开缩略图,秒级加载) -->
<div class="card-media">
<img
@@ -114,6 +121,9 @@ function formatStatNumber(value: number) {
<!-- 状态浮标 -->
<div class="media-badges">
<span v-if="listing.owner_is_quality_owner" class="badge owner">优质号主</span>
<span v-if="listing.is_premium" class="badge premium">极品</span>
<span v-if="listing.compensation_plan === 'insurance'" class="badge insurance">保险</span>
<span v-if="hasAcceleratedSaleRatio(listing)" class="badge sale">特惠</span>
<span v-if="hasGiftResources(listing)" class="badge gift">有赠送</span>
</div>
@@ -128,6 +138,10 @@ function formatStatNumber(value: number) {
<div class="content-primary">
<div class="header-row">
<span class="code-badge">{{ listingCode }}</span>
<span v-if="listing.owner_is_quality_owner" class="owner-quality-badge">
<van-icon name="award-o" :size="13" />
<span>优质号主</span>
</span>
<span v-for="tag in accessTags" :key="tag.label" class="platform-badge" :class="tag.tone">
<van-icon :name="tag.icon" :size="13" />
<span>{{ tag.label }}</span>
@@ -261,6 +275,7 @@ function formatStatNumber(value: number) {
<style scoped>
.hfb-listing-card {
position: relative;
display: grid;
grid-template-columns: 210px minmax(0, 1fr) 146px;
gap: 18px;
@@ -279,6 +294,22 @@ function formatStatNumber(value: number) {
transform 0.22s ease;
}
.hfb-listing-card.is-quality-owner {
border-color: #d8c9fb;
box-shadow: 0 8px 24px rgba(109, 40, 217, 0.08);
}
.hfb-listing-card.is-quality-owner::before,
.hfb-listing-card.is-premium::before {
content: '';
position: absolute;
top: 0;
right: 0;
left: 0;
height: 3px;
background: linear-gradient(90deg, #7c3aed 0%, #a855f7 50%, #f59e0b 100%);
}
.hfb-listing-card:hover {
border-color: #ff8533;
box-shadow: 0 12px 30px rgba(255, 106, 0, 0.12);
@@ -346,6 +377,18 @@ function formatStatNumber(value: number) {
background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.badge.owner {
background: linear-gradient(135deg, #6d28d9 0%, #9333ea 100%);
}
.badge.premium {
background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
}
.badge.insurance {
background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}
.media-ratio {
position: absolute;
bottom: 0;
@@ -465,6 +508,19 @@ function formatStatNumber(value: number) {
color: #4f46e5;
}
.owner-quality-badge {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 2px 8px;
border: 1px solid #ddd6fe;
border-radius: 6px;
background: #f5f3ff;
color: #6d28d9;
font-size: 12px;
font-weight: 800;
}
.aux-badge {
display: inline-flex;
align-items: center;
@@ -15,6 +15,7 @@ import {
type HomeBannerSlide,
} from '@/features/listings/api/homeConfig'
import { ElMessage } from 'element-plus'
import { ArrowRight, Trophy } from '@element-plus/icons-vue'
import AnnouncementPopup from '@/features/announcement/components/AnnouncementPopup.vue'
import AuthImage from '@/shared/components/business/AuthImage.vue'
import {
@@ -206,6 +207,11 @@ watch(
)
const statCards = computed(() => [
{
label: '优质号主精选',
value: `${zoneCount('premium')}`,
hint: '认证优质号主 · 极品专区',
},
{ label: '可租账号', value: `${totalListings.value}`, hint: '当前筛选结果' },
{
label: '高哈夫币',
@@ -226,6 +232,12 @@ const zoneOptions = computed(() => [
hint: '当前可租账号',
count: zoneCount('all'),
},
{
key: 'premium',
label: '极品专区',
hint: '优质号主精选',
count: zoneCount('premium'),
},
{
key: 'sale',
label: '特惠专区',
@@ -640,6 +652,25 @@ if (!restored) {
<el-empty v-else description="暂无展示图片" />
</el-dialog>
<section class="premium-spotlight" aria-label="优质号主精选">
<div class="premium-spotlight-mark">
<el-icon :size="24"><Trophy /></el-icon>
</div>
<div class="premium-spotlight-copy">
<span>QUALITY OWNER SELECTION</span>
<strong>优质号主严选 · 极品专区</strong>
<p>仅认证优质号主可发布,尊享更严格的服务标准与无忧租号保险 4% 专享费率。</p>
</div>
<div class="premium-spotlight-count">
<strong>{{ zoneCount('premium') }}</strong>
<span>个精选账号</span>
</div>
<button type="button" @click="activeZone = 'premium'">
进入极品专区
<el-icon><ArrowRight /></el-icon>
</button>
</section>
<HomeFilters
:filters="filters"
:total-listings="totalListings"
@@ -714,6 +745,95 @@ if (!restored) {
min-width: 0;
}
.premium-spotlight {
display: grid;
grid-template-columns: auto minmax(0, 1fr) auto auto;
align-items: center;
gap: 18px;
min-height: 92px;
padding: 16px 20px;
border: 1px solid #ded3fb;
border-radius: 14px;
background:
radial-gradient(circle at 82% 0%, rgba(245, 158, 11, 0.13), transparent 32%),
linear-gradient(115deg, #f7f3ff 0%, #ffffff 62%, #fffaf0 100%);
box-shadow: 0 8px 24px rgba(109, 40, 217, 0.07);
}
.premium-spotlight-mark {
display: grid;
width: 48px;
height: 48px;
place-items: center;
border-radius: 13px;
background: linear-gradient(135deg, #5b21b6 0%, #9333ea 62%, #f59e0b 100%);
color: #fff;
box-shadow: 0 8px 18px rgba(109, 40, 217, 0.24);
}
.premium-spotlight-copy {
display: grid;
gap: 3px;
min-width: 0;
}
.premium-spotlight-copy > span {
color: #7c3aed;
font-size: 10px;
font-weight: 900;
letter-spacing: 0.08em;
}
.premium-spotlight-copy strong {
color: #2e1065;
font-size: 18px;
font-weight: 900;
}
.premium-spotlight-copy p {
margin: 0;
color: #70677f;
font-size: 12px;
line-height: 1.5;
}
.premium-spotlight-count {
display: grid;
justify-items: end;
padding-right: 6px;
}
.premium-spotlight-count strong {
color: #6d28d9;
font-size: 24px;
line-height: 1;
}
.premium-spotlight-count span {
margin-top: 4px;
color: #8b8299;
font-size: 11px;
}
.premium-spotlight > button {
display: inline-flex;
align-items: center;
gap: 5px;
min-height: 36px;
padding: 0 15px;
border: none;
border-radius: 9px;
background: #6d28d9;
color: #fff;
font-size: 13px;
font-weight: 800;
cursor: pointer;
}
.premium-spotlight > button:hover {
background: #5b21b6;
}
.hero-section {
display: grid;
grid-template-columns: minmax(0, 1fr) 320px;
@@ -888,12 +1008,35 @@ if (!restored) {
min-height: 76px;
padding: 14px 40px 14px 16px;
}
.premium-spotlight {
grid-template-columns: auto minmax(0, 1fr) auto;
}
.premium-spotlight > button {
grid-column: 2 / -1;
justify-self: start;
}
}
@media (max-width: 680px) {
.biz-entry-rail {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.premium-spotlight {
grid-template-columns: auto minmax(0, 1fr);
}
.premium-spotlight-count {
display: none;
}
.premium-spotlight > button {
grid-column: 1 / -1;
width: 100%;
justify-content: center;
}
}
.infinite-load-state {
@@ -207,6 +207,16 @@
color: #7c3aed;
}
.platform-pill.premium {
background: #f5f3ff;
color: #6d28d9;
}
.platform-pill.insurance {
background: #eff6ff;
color: #1d4ed8;
}
.status-pill {
display: inline-flex;
align-items: center;
@@ -462,6 +462,19 @@ function goBack() {
<span>{{ listing.rank_level }}</span>
</span>
<span v-if="listing.is_premium" class="platform-pill premium">
<van-icon name="award-o" :size="13" />
<span>极品专区</span>
</span>
<span
v-if="listing.compensation_plan === 'insurance'"
class="platform-pill insurance"
>
<van-icon name="shield-o" :size="13" />
<span>无忧租号保险</span>
</span>
<span class="status-pill" :class="{ 'is-busy': listing.in_transaction }">
<i class="status-dot" />
<span>{{ listing.in_transaction ? '交易中' : '现号可租' }}</span>
@@ -564,6 +564,78 @@
scrollbar-width: none;
}
.mobile-premium-spotlight {
display: grid;
grid-template-columns: auto minmax(0, 1fr) auto auto;
align-items: center;
gap: 9px;
width: 100%;
min-height: 68px;
margin: 2px 0 9px;
padding: 10px 12px;
border: 1px solid #ddd0fb;
border-radius: 12px;
background:
radial-gradient(circle at 88% 0%, rgba(245, 158, 11, 0.16), transparent 34%),
linear-gradient(115deg, #f7f2ff 0%, #fff 68%, #fffaf0 100%);
color: #6d28d9;
text-align: left;
}
.premium-spotlight-icon {
display: grid;
width: 38px;
height: 38px;
place-items: center;
border-radius: 10px;
background: linear-gradient(135deg, #5b21b6 0%, #9333ea 65%, #f59e0b 100%);
color: #fff;
}
.premium-spotlight-copy {
display: grid;
gap: 1px;
min-width: 0;
}
.premium-spotlight-copy small {
color: #8b5cf6;
font-size: 8px;
font-weight: 900;
letter-spacing: 0.08em;
}
.premium-spotlight-copy strong {
overflow: hidden;
color: #2e1065;
font-size: 13px;
font-weight: 900;
text-overflow: ellipsis;
white-space: nowrap;
}
.premium-spotlight-copy em {
overflow: hidden;
color: #7b7188;
font-size: 9px;
font-style: normal;
text-overflow: ellipsis;
white-space: nowrap;
}
.premium-spotlight-count {
display: grid;
min-width: 27px;
height: 27px;
place-items: center;
padding: 0 7px;
border-radius: 999px;
background: #6d28d9;
color: #fff;
font-size: 11px;
font-weight: 900;
}
.zone-strip::-webkit-scrollbar {
display: none;
}
@@ -618,6 +690,23 @@
color: #fff;
}
.zone-pill.is-premium:not(.active) {
border-color: #ddd6fe;
background: #faf7ff;
color: #6d28d9;
}
.zone-pill.is-premium:not(.active) span {
background: #ede9fe;
color: #6d28d9;
}
.zone-pill.is-premium.active {
border-color: #7c3aed;
background: #6d28d9;
color: #fff;
}
.zone-pill:active {
transform: translateY(1px);
}
@@ -910,6 +999,18 @@
background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.media-badges .badge.owner {
background: linear-gradient(135deg, #6d28d9 0%, #9333ea 100%);
}
.media-badges .badge.premium {
background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
}
.media-badges .badge.insurance {
background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}
.media-ratio {
position: absolute;
bottom: 0;
@@ -169,6 +169,7 @@ const sortOptions: MobileSortOption[] = [
const zoneOptions = [
{ key: 'all', label: '全部', hint: '当前可租' },
{ key: 'premium', label: '极品', hint: '优质号主精选' },
{ key: 'sale', label: '特惠', hint: '价格更划算' },
{ key: 'gift', label: '赠送', hint: '含赠送物品' },
{ key: 'night', label: '夜间', hint: '0-2点可响应上号' },
@@ -1006,13 +1007,31 @@ if (!restoreHomeConfigFromCache()) {
</button>
</div>
<button
type="button"
class="mobile-premium-spotlight"
aria-label="进入优质号主极品专区"
@click="selectZone('premium')"
>
<span class="premium-spotlight-icon">
<van-icon name="award-o" :size="22" />
</span>
<span class="premium-spotlight-copy">
<small>QUALITY OWNER</small>
<strong>优质号主严选 · 极品专区</strong>
<em>认证发布 · 4% 保险专享费率</em>
</span>
<span class="premium-spotlight-count">{{ zoneCount('premium') }}</span>
<van-icon name="arrow" :size="13" />
</button>
<div class="zone-strip" aria-label="账号专区">
<button
v-for="zone in visibleZoneOptions"
:key="zone.key"
type="button"
class="zone-pill"
:class="{ active: activeZone === zone.key }"
:class="{ active: activeZone === zone.key, 'is-premium': zone.key === 'premium' }"
@click="selectZone(zone.key)"
>
<strong>{{ zone.label }}</strong>
@@ -1122,9 +1141,20 @@ if (!restoreHomeConfigFromCache()) {
<div v-else class="media-empty">HFB</div>
<div
v-if="hasGiftResources(item) || hasAcceleratedSaleRatio(item)"
v-if="
hasGiftResources(item) ||
hasAcceleratedSaleRatio(item) ||
item.owner_is_quality_owner ||
item.is_premium ||
item.compensation_plan === 'insurance'
"
class="media-badges"
>
<span v-if="item.owner_is_quality_owner" class="badge owner">优质号主</span>
<span v-if="item.is_premium" class="badge premium">极品</span>
<span v-if="item.compensation_plan === 'insurance'" class="badge insurance"
>保险</span
>
<span v-if="hasAcceleratedSaleRatio(item)" class="badge sale">特惠</span>
<span v-if="hasGiftResources(item)" class="badge gift">有赠送</span>
</div>
@@ -195,6 +195,16 @@
color: #7c3aed;
}
.platform-pill.premium {
background: #f5f3ff;
color: #6d28d9;
}
.platform-pill.insurance {
background: #eff6ff;
color: #1d4ed8;
}
.status-pill {
display: inline-flex;
align-items: center;
@@ -444,6 +444,14 @@ function goBack() {
<van-icon name="diamond-o" :size="12" />
<span>{{ listing.rank_level }}</span>
</span>
<span v-if="listing.is_premium" class="platform-pill premium">
<van-icon name="award-o" :size="12" />
<span>极品专区</span>
</span>
<span v-if="listing.compensation_plan === 'insurance'" class="platform-pill insurance">
<van-icon name="shield-o" :size="12" />
<span>无忧保险</span>
</span>
<span class="status-pill" :class="{ 'is-busy': listing.in_transaction }">
<i class="status-dot" />
<span>{{ listing.in_transaction ? '交易中' : '现号可租' }}</span>