Files
hfb_sys/frontend/src/features/invitation/views/UserInvitationView.vue
T
yml2213 f5202c6080 style(invitation): 邀请返利界面全面对齐平台金橙品牌色规范
- 顶部 Banner 重构为黑曜石暗金底配金橙光辉,彻底消除蓝色调
- 收益数据卡片、专属推广栏及操作按钮升级为金橙与琥珀暖色系
- 阶梯分成规则卡片更新为首月红橙、次月暖金、永久长青绿三阶体系
- 明细 Tab 指示条、角色标签与分页组件全面对齐品牌设计
- 验证方式:npm run check 与 npm run test 全部通过,无告警与报错
2026-10-10 14:00:53 +08:00

1207 lines
28 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<script setup lang="ts">
import { computed, onMounted, ref } from 'vue'
import { useRouter } from 'vue-router'
import { ElMessage } from 'element-plus'
import {
Share,
DocumentCopy,
Present,
User,
Coin,
WarningFilled,
TrendCharts,
ArrowRight,
Picture,
} from '@element-plus/icons-vue'
import {
fetchUserInvitationSummary,
fetchMyInvitedUsers,
fetchMyRebates,
type UserInvitationSummary,
type InvitedUserRecord,
type RebateLedger,
} from '@/features/invitation/api/invitation'
import { useSessionStore } from '@/stores/session'
import { formatCent } from '@/shared/utils/money'
import { readError } from '@/shared/utils/error'
const router = useRouter()
const session = useSessionStore()
const loadingSummary = ref(true)
const summary = ref<UserInvitationSummary | null>(null)
// 当前激活的 Tab
const activeTab = ref<'friends' | 'rebates'>('friends')
// 好友列表
const loadingFriends = ref(false)
const friends = ref<InvitedUserRecord[]>([])
const friendsTotal = ref(0)
const friendsPage = ref(1)
// 返利明细
const loadingRebates = ref(false)
const rebates = ref<RebateLedger[]>([])
const rebatesTotal = ref(0)
const rebatesPage = ref(1)
// 海报弹窗
const showPosterDialog = ref(false)
const isRealnameVerified = computed(() => session.realnameStatus === 'verified')
const inviteCode = computed(() => summary.value?.invite_code || '')
const inviteLink = computed(() => {
if (!inviteCode.value) return ''
return `${window.location.origin}/i/${inviteCode.value}`
})
const qrCodeUrl = computed(() => {
if (!inviteLink.value) return ''
return `https://api.qrserver.com/v1/create-qr-code/?size=220x220&data=${encodeURIComponent(inviteLink.value)}`
})
onMounted(async () => {
await loadSummary()
await Promise.all([loadFriends(), loadRebates()])
})
async function loadSummary() {
loadingSummary.value = true
try {
const data = await fetchUserInvitationSummary()
summary.value = data
} catch (err) {
ElMessage.error(readError(err, '获取邀请统计失败'))
} finally {
loadingSummary.value = false
}
}
async function loadFriends() {
loadingFriends.value = true
try {
const data = await fetchMyInvitedUsers(friendsPage.value, 15)
friends.value = data.items
friendsTotal.value = data.total
} catch (err) {
ElMessage.error(readError(err, '获取好友列表失败'))
} finally {
loadingFriends.value = false
}
}
async function loadRebates() {
loadingRebates.value = true
try {
const data = await fetchMyRebates(rebatesPage.value, 15)
rebates.value = data.items
rebatesTotal.value = data.total
} catch (err) {
ElMessage.error(readError(err, '获取返利明细失败'))
} finally {
loadingRebates.value = false
}
}
function handleFriendsPageChange(page: number) {
friendsPage.value = page
void loadFriends()
}
function handleRebatesPageChange(page: number) {
rebatesPage.value = page
void loadRebates()
}
async function copyText(text: string, label = '内容') {
if (!text) return
try {
if (navigator.clipboard && navigator.clipboard.writeText) {
await navigator.clipboard.writeText(text)
} else {
const textarea = document.createElement('textarea')
textarea.value = text
document.body.appendChild(textarea)
textarea.select()
document.execCommand('copy')
document.body.removeChild(textarea)
}
ElMessage.success(`${label}已复制到剪贴板`)
} catch {
ElMessage.warning('复制失败,请手动长按复制')
}
}
function goRealname() {
const isMobile = window.innerWidth <= 768 || window.location.pathname.startsWith('/m')
router.push(isMobile ? '/m/realname' : '/realname')
}
function formatRate(rate: number) {
return `${Math.round(rate * 100)}%`
}
function cycleLabel(cycle: string) {
switch (cycle) {
case 'first_month':
return '首月高额 (60%)'
case 'second_month':
return '次月奖励 (30%)'
default:
return '长期分成 (15%)'
}
}
</script>
<template>
<div class="user-invitation-view">
<!-- 顶部 Banner -->
<div class="hero-card">
<div class="hero-left">
<div class="hero-badge">
<el-icon><Present /></el-icon>
<span>推荐有礼 · 永久分成</span>
</div>
<h1 class="hero-title">邀请好友赚丰厚返利</h1>
<p class="hero-subtitle">
买卖双边分成:首月单边高达 60%,次月 30%,永久 15% · 多劳多得零门槛
</p>
</div>
<!-- 实名未通过时的醒目提醒 -->
<div v-if="!isRealnameVerified" class="hero-unverified-alert">
<div class="alert-content">
<el-icon class="alert-icon"><WarningFilled /></el-icon>
<div class="alert-text">
<strong>尚未激活邀请特权</strong>
<p>平台要求邀请人先完成实名认证,以确保资金合规与返利真实发放</p>
</div>
</div>
<button class="realname-btn" @click="goRealname">
立即实名认证 <el-icon><ArrowRight /></el-icon>
</button>
</div>
</div>
<!-- 数据看板 -->
<div class="stats-row">
<div class="stat-card">
<div class="stat-header">
<span class="stat-label">累计返利收益</span>
<el-icon class="stat-icon income"><Coin /></el-icon>
</div>
<div class="stat-value">
<span class="currency">¥</span>
<strong>{{ formatCent(summary?.total_rebate_cent || 0) }}</strong>
</div>
<div class="stat-sub">直接到账钱包可用余额</div>
</div>
<div class="stat-card">
<div class="stat-header">
<span class="stat-label">本月返利收益</span>
<el-icon class="stat-icon month"><TrendCharts /></el-icon>
</div>
<div class="stat-value">
<span class="currency">¥</span>
<strong>{{ formatCent(summary?.month_rebate_cent || 0) }}</strong>
</div>
<div class="stat-sub">按实名正式生效周期结算</div>
</div>
<div class="stat-card">
<div class="stat-header">
<span class="stat-label">成功邀请好友</span>
<el-icon class="stat-icon users"><User /></el-icon>
</div>
<div class="stat-value">
<strong>{{ summary?.active_invited_count || 0 }}</strong>
<span class="unit">人已生效</span>
</div>
<div class="stat-sub">
共注册 {{ summary?.total_invited_count || 0 }} 人(实名认证后正式生效)
</div>
</div>
</div>
<!-- 专属邀请码与分享栏(仅限已实名) -->
<div v-if="isRealnameVerified" class="share-box-card">
<div class="share-header">
<div class="share-title">
<el-icon><Share /></el-icon>
<span>您的专属推广链接与邀请码</span>
</div>
<button class="poster-trigger-btn" @click="showPosterDialog = true">
<el-icon><Picture /></el-icon>
<span>专属邀请海报</span>
</button>
</div>
<div class="share-content-row">
<!-- 邀请码 -->
<div class="share-field">
<label>专属邀请码</label>
<div class="field-box">
<span class="code-text">{{ inviteCode }}</span>
<button class="copy-btn" @click="copyText(inviteCode, '邀请码')">
<el-icon><DocumentCopy /></el-icon>
<span>复制</span>
</button>
</div>
</div>
<!-- 邀请链接 -->
<div class="share-field link-field">
<label>专属落地注册链接</label>
<div class="field-box">
<span class="link-text">{{ inviteLink }}</span>
<button class="copy-btn primary" @click="copyText(inviteLink, '邀请链接')">
<el-icon><DocumentCopy /></el-icon>
<span>复制链接</span>
</button>
</div>
</div>
</div>
</div>
<!-- 阶梯分成规则说明 -->
<div class="rules-card">
<div class="rules-header">
<div class="rules-header-title">
<div class="rules-title-bar"></div>
<h3>邀请返利分成规则说明</h3>
</div>
<span class="rule-tip">以被邀请人完成实名认证时刻作为周期计算起点</span>
</div>
<div class="ladder-grid">
<div class="ladder-item ladder-first">
<div class="ladder-tag">阶梯一 · 首月</div>
<div class="ladder-rate">{{ formatRate(summary?.first_month_rate || 0.6) }}</div>
<div class="ladder-time">实名生效 1 ~ 30 天</div>
<div class="ladder-desc">每笔订单单边收益高比例奖励</div>
</div>
<div class="ladder-item ladder-second">
<div class="ladder-tag">阶梯二 · 次月</div>
<div class="ladder-rate">{{ formatRate(summary?.second_month_rate || 0.3) }}</div>
<div class="ladder-time">实名生效 31 ~ 60 天</div>
<div class="ladder-desc">持续稳定鼓励买卖活跃交易</div>
</div>
<div class="ladder-item ladder-subsequent">
<div class="ladder-tag">阶梯三 · 长期永久</div>
<div class="ladder-rate">{{ formatRate(summary?.subsequent_rate || 0.15) }}</div>
<div class="ladder-time">实名生效 60 天后永久</div>
<div class="ladder-desc">终身绑定,笔笔成交享分成收益</div>
</div>
</div>
<div class="rules-details">
<div class="rule-point">
<strong>双边分成机制:</strong
>不管是买家租客下单、还是卖家号主放号,产生的收益分成均计算返利;若买卖双方均为您的好友,则双边叠加享受!
</div>
<div class="rule-point">
<strong>单边基准计算:</strong
>平台订单毛利按买卖两端各50%作为单边基准,乘以您适用的分成比例直接划转至您的钱包可用余额。
</div>
<div class="rule-point">
<strong>订单终态结算:</strong
>每笔订单结账完成终态时自动秒级到账,退款不影响已完成订单,安全零风险。
</div>
</div>
</div>
<!-- 列表明细区域 -->
<div class="details-tabs-card">
<div class="tabs-header">
<button
class="tab-btn"
:class="{ active: activeTab === 'friends' }"
@click="activeTab = 'friends'"
>
我邀请的好友 ({{ friendsTotal }})
</button>
<button
class="tab-btn"
:class="{ active: activeTab === 'rebates' }"
@click="activeTab = 'rebates'"
>
返利收益明细 ({{ rebatesTotal }})
</button>
</div>
<!-- 好友列表 -->
<div v-if="activeTab === 'friends'" class="tab-content">
<div v-if="loadingFriends" class="loading-state">加载好友列表中...</div>
<div v-else-if="friends.length === 0" class="empty-state">
<el-icon :size="40" color="#cbd5e1"><User /></el-icon>
<p>您尚未邀请好友,快去分享专属链接赚取首月60%返利吧!</p>
</div>
<div v-else class="table-responsive">
<table class="data-table">
<thead>
<tr>
<th>好友手机号</th>
<th>好友昵称</th>
<th>认证状态</th>
<th>注册时间</th>
<th>生效时间 (起点)</th>
</tr>
</thead>
<tbody>
<tr v-for="item in friends" :key="item.id">
<td>{{ item.invitee_phone }}</td>
<td>{{ item.invitee_nickname || '-' }}</td>
<td>
<span
class="status-pill"
:class="item.status === 'active' ? 'active' : 'pending'"
>
{{ item.status === 'active' ? '已实名 (已生效)' : '待实名 (未生效)' }}
</span>
</td>
<td>{{ item.created_at ? item.created_at.slice(0, 16) : '-' }}</td>
<td>{{ item.verified_at ? item.verified_at.slice(0, 16) : '-' }}</td>
</tr>
</tbody>
</table>
<div v-if="friendsTotal > 15" class="pagination-bar">
<el-pagination
background
layout="prev, pager, next"
:total="friendsTotal"
:page-size="15"
:current-page="friendsPage"
@current-change="handleFriendsPageChange"
/>
</div>
</div>
</div>
<!-- 返利流水列表 -->
<div v-if="activeTab === 'rebates'" class="tab-content">
<div v-if="loadingRebates" class="loading-state">加载返利流水中...</div>
<div v-else-if="rebates.length === 0" class="empty-state">
<el-icon :size="40" color="#cbd5e1"><Coin /></el-icon>
<p>暂无返利流水,被邀请好友完成订单结算后将自动发放到此!</p>
</div>
<div v-else class="table-responsive">
<table class="data-table">
<thead>
<tr>
<th>订单号</th>
<th>交易角色</th>
<th>收益基数</th>
<th>适用阶段</th>
<th>返利金额</th>
<th>结算时间</th>
</tr>
</thead>
<tbody>
<tr v-for="r in rebates" :key="r.id">
<td>
<code>{{ r.order_no }}</code>
</td>
<td>
<span class="role-pill" :class="r.trade_role">
{{ r.trade_role === 'buyer' ? '买家端' : '卖家端' }}
</span>
</td>
<td>¥{{ formatCent(r.single_side_basis_cent) }}</td>
<td>
<span class="cycle-pill">{{ cycleLabel(r.cycle_stage) }}</span>
</td>
<td class="rebate-amount">+¥{{ formatCent(r.rebate_amount_cent) }}</td>
<td>{{ r.settled_at ? r.settled_at.slice(0, 16) : '-' }}</td>
</tr>
</tbody>
</table>
<div v-if="rebatesTotal > 15" class="pagination-bar">
<el-pagination
background
layout="prev, pager, next"
:total="rebatesTotal"
:page-size="15"
:current-page="rebatesPage"
@current-change="handleRebatesPageChange"
/>
</div>
</div>
</div>
</div>
<!-- 海报二维码弹窗 -->
<el-dialog v-model="showPosterDialog" title="您的专属邀请海报" width="360px" align-center>
<div class="poster-modal-body">
<div class="poster-card">
<div class="poster-badge">邀请有礼</div>
<h3>加入平台 · 畅享返利</h3>
<p class="poster-desc">扫码进入专属注册页,立享买卖交易高额分成</p>
<div class="poster-qr-wrap">
<img v-if="qrCodeUrl" :src="qrCodeUrl" alt="QR Code" />
</div>
<div class="poster-code-row">
邀请码:<strong>{{ inviteCode }}</strong>
</div>
</div>
<p class="poster-tip">截图保存此海报或二维码分享给好友即可快速推广!</p>
</div>
</el-dialog>
</div>
</template>
<style scoped>
.user-invitation-view {
max-width: 1100px;
margin: 0 auto;
padding: 24px 16px 48px;
box-sizing: border-box;
}
.hero-card {
position: relative;
overflow: hidden;
background:
radial-gradient(circle at 90% 15%, rgba(255, 106, 0, 0.22) 0%, transparent 50%),
radial-gradient(circle at 10% 85%, rgba(255, 133, 46, 0.12) 0%, transparent 45%),
linear-gradient(145deg, #0d121c 0%, #151d2d 45%, #1e293b 100%);
border: 1px solid rgba(255, 106, 0, 0.25);
border-radius: 20px;
color: #ffffff;
padding: 36px 32px;
display: flex;
flex-direction: column;
gap: 22px;
box-shadow:
0 12px 32px rgba(15, 23, 42, 0.22),
0 4px 16px rgba(255, 106, 0, 0.08);
}
.hero-left {
position: relative;
z-index: 2;
}
.hero-badge {
display: inline-flex;
align-items: center;
gap: 6px;
background: rgba(255, 106, 0, 0.16);
border: 1px solid rgba(255, 133, 46, 0.4);
color: #ff9b4e;
padding: 4px 14px;
border-radius: 20px;
font-size: 13px;
font-weight: 600;
margin-bottom: 14px;
backdrop-filter: blur(8px);
}
.hero-title {
font-size: 28px;
font-weight: 800;
margin: 0;
letter-spacing: 0.5px;
background: linear-gradient(135deg, #ffffff 60%, #ffd8a8 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.hero-subtitle {
font-size: 14px;
color: #cbd5e1;
margin: 10px 0 0;
line-height: 1.6;
}
.hero-unverified-alert {
position: relative;
z-index: 2;
background: rgba(255, 106, 0, 0.12);
border: 1px solid rgba(255, 106, 0, 0.35);
border-radius: 14px;
padding: 16px 20px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
flex-wrap: wrap;
backdrop-filter: blur(10px);
}
.alert-content {
display: flex;
align-items: center;
gap: 12px;
}
.alert-icon {
font-size: 24px;
color: #ff852e;
}
.alert-text strong {
display: block;
font-size: 14px;
color: #fed7aa;
}
.alert-text p {
margin: 3px 0 0;
font-size: 12px;
color: #e2e8f0;
}
.realname-btn {
background: linear-gradient(135deg, #ff6a00 0%, #ff852e 100%);
color: #ffffff;
border: none;
border-radius: 8px;
padding: 9px 18px;
font-size: 13px;
font-weight: 700;
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 4px;
box-shadow: 0 4px 12px rgba(255, 106, 0, 0.3);
transition: all 0.2s;
}
.realname-btn:hover {
box-shadow: 0 6px 16px rgba(255, 106, 0, 0.45);
transform: translateY(-1px);
}
.stats-row {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 16px;
margin-top: 20px;
}
.stat-card {
background: #ffffff;
border-radius: 16px;
padding: 22px;
box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
border: 1px solid #f1f5f9;
transition: all 0.25s ease;
}
.stat-card:hover {
border-color: #fed7aa;
box-shadow: 0 8px 24px rgba(255, 106, 0, 0.08);
transform: translateY(-2px);
}
.stat-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.stat-label {
font-size: 13px;
color: #64748b;
font-weight: 600;
}
.stat-icon {
font-size: 20px;
padding: 8px;
border-radius: 10px;
}
.stat-icon.income {
background: #fff7ed;
color: #ea580c;
border: 1px solid #ffedd5;
}
.stat-icon.month {
background: #fefce8;
color: #d97706;
border: 1px solid #fef08a;
}
.stat-icon.users {
background: #f0fdf4;
color: #16a34a;
border: 1px solid #dcfce7;
}
.stat-value {
margin-top: 14px;
display: flex;
align-items: baseline;
gap: 4px;
color: #0f172a;
}
.stat-value strong {
font-size: 30px;
font-weight: 800;
letter-spacing: -0.5px;
}
.currency {
font-size: 18px;
font-weight: 700;
color: #ea580c;
}
.stat-value .unit {
font-size: 13px;
color: #64748b;
margin-left: 4px;
}
.stat-sub {
margin-top: 6px;
font-size: 12px;
color: #94a3b8;
}
.share-box-card {
background: #ffffff;
border-radius: 16px;
padding: 24px;
margin-top: 20px;
box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
border: 1px solid #f1f5f9;
}
.share-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 18px;
}
.share-title {
display: flex;
align-items: center;
gap: 8px;
font-size: 16px;
font-weight: 700;
color: #0f172a;
}
.share-title .el-icon {
color: #ff6a00;
font-size: 18px;
}
.poster-trigger-btn {
background: #fff7ed;
color: #ff6a00;
border: 1px solid #fed7aa;
border-radius: 8px;
padding: 7px 16px;
font-size: 13px;
font-weight: 600;
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 6px;
transition: all 0.2s;
}
.poster-trigger-btn:hover {
background: #ffedd5;
border-color: #fdba74;
color: #ea580c;
box-shadow: 0 2px 8px rgba(255, 106, 0, 0.15);
}
.share-content-row {
display: grid;
grid-template-columns: 200px 1fr;
gap: 16px;
}
.share-field label {
display: block;
font-size: 12px;
color: #64748b;
margin-bottom: 6px;
font-weight: 600;
}
.field-box {
background: #fffaf5;
border: 1px solid #fed7aa;
border-radius: 10px;
padding: 8px 12px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
}
.code-text {
font-family: 'DIN Alternate', 'SF Mono', Consolas, monospace;
font-size: 20px;
font-weight: 800;
color: #ff6a00;
letter-spacing: 1.5px;
}
.link-text {
font-family: -apple-system, BlinkMacSystemFont, monospace;
font-size: 13px;
color: #334155;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.copy-btn {
background: #ffffff;
border: 1px solid #cbd5e1;
color: #475569;
border-radius: 6px;
padding: 6px 12px;
font-size: 12px;
font-weight: 500;
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 4px;
white-space: nowrap;
transition: all 0.2s;
}
.copy-btn:hover {
border-color: #ff6a00;
color: #ff6a00;
}
.copy-btn.primary {
background: linear-gradient(135deg, #ff6a00 0%, #ff852e 100%);
border: none;
color: #ffffff;
font-weight: 600;
box-shadow: 0 3px 10px rgba(255, 106, 0, 0.28);
}
.copy-btn.primary:hover {
box-shadow: 0 5px 16px rgba(255, 106, 0, 0.4);
transform: translateY(-1px);
}
.rules-card {
background: #ffffff;
border-radius: 16px;
padding: 24px;
margin-top: 20px;
box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
border: 1px solid #f1f5f9;
}
.rules-header {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 18px;
}
.rules-header-title {
display: flex;
align-items: center;
gap: 8px;
}
.rules-title-bar {
width: 4px;
height: 16px;
border-radius: 2px;
background: linear-gradient(180deg, #ff6a00, #ff852e);
}
.rules-header h3 {
margin: 0;
font-size: 16px;
font-weight: 700;
color: #0f172a;
}
.rule-tip {
font-size: 12px;
color: #64748b;
}
.ladder-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 16px;
margin-bottom: 20px;
}
.ladder-item {
border-radius: 12px;
padding: 18px 16px;
text-align: center;
transition: all 0.25s ease;
position: relative;
overflow: hidden;
}
.ladder-item:hover {
transform: translateY(-2px);
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}
.ladder-first {
background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
border: 1.5px solid #fed7aa;
}
.ladder-second {
background: linear-gradient(180deg, #fefce8 0%, #ffffff 100%);
border: 1px solid #fde68a;
}
.ladder-subsequent {
background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
border: 1px solid #bbf7d0;
}
.ladder-tag {
font-size: 12px;
font-weight: 700;
color: #475569;
}
.ladder-first .ladder-tag {
color: #ea580c;
}
.ladder-second .ladder-tag {
color: #d97706;
}
.ladder-subsequent .ladder-tag {
color: #16a34a;
}
.ladder-rate {
font-size: 34px;
font-weight: 900;
line-height: 1.2;
margin: 8px 0;
font-family:
'DIN Alternate',
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
sans-serif;
}
.ladder-first .ladder-rate {
color: #ea580c;
}
.ladder-second .ladder-rate {
color: #d97706;
}
.ladder-subsequent .ladder-rate {
color: #16a34a;
}
.ladder-time {
font-size: 12px;
font-weight: 600;
color: #334155;
}
.ladder-desc {
font-size: 11px;
color: #64748b;
margin-top: 4px;
}
.rules-details {
background: #f8fafc;
border-radius: 10px;
padding: 16px 18px;
display: flex;
flex-direction: column;
gap: 10px;
border-left: 3px solid #fdba74;
}
.rule-point {
font-size: 13px;
color: #475569;
line-height: 1.6;
}
.rule-point strong {
color: #0f172a;
}
.details-tabs-card {
background: #ffffff;
border-radius: 16px;
padding: 24px;
margin-top: 20px;
box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
border: 1px solid #f1f5f9;
}
.tabs-header {
display: flex;
gap: 20px;
border-bottom: 2px solid #f1f5f9;
padding-bottom: 12px;
margin-bottom: 18px;
}
.tab-btn {
background: none;
border: none;
font-size: 15px;
font-weight: 600;
color: #64748b;
cursor: pointer;
padding: 6px 4px;
position: relative;
transition: all 0.2s;
}
.tab-btn:hover {
color: #ff6a00;
}
.tab-btn.active {
color: #ff6a00;
font-weight: 700;
}
.tab-btn.active::after {
content: '';
position: absolute;
bottom: -14px;
left: 0;
right: 0;
height: 3px;
background: linear-gradient(90deg, #ff6a00, #ff852e);
border-radius: 3px;
}
.table-responsive {
overflow-x: auto;
}
.data-table {
width: 100%;
border-collapse: collapse;
font-size: 13px;
text-align: left;
}
.data-table th {
background: #f8fafc;
color: #64748b;
font-weight: 600;
padding: 12px 14px;
border-bottom: 1px solid #e2e8f0;
}
.data-table td {
padding: 14px;
border-bottom: 1px solid #f1f5f9;
color: #1e293b;
transition: background 0.15s;
}
.data-table tbody tr:hover td {
background: #fffaf5;
}
.status-pill {
display: inline-block;
padding: 3px 10px;
border-radius: 6px;
font-size: 12px;
font-weight: 600;
}
.status-pill.active {
background: #f0fdf4;
color: #16a34a;
border: 1px solid #bbf7d0;
}
.status-pill.pending {
background: #fffbeb;
color: #d97706;
border: 1px solid #fde68a;
}
.role-pill {
display: inline-block;
padding: 3px 10px;
border-radius: 6px;
font-size: 12px;
font-weight: 600;
}
.role-pill.buyer {
background: #fff7ed;
color: #ea580c;
border: 1px solid #fed7aa;
}
.role-pill.seller {
background: #fdf2f8;
color: #db2777;
border: 1px solid #fbcfe8;
}
.cycle-pill {
font-size: 12px;
color: #64748b;
}
.rebate-amount {
font-weight: 800;
color: #ea580c;
font-size: 14px;
}
.loading-state,
.empty-state {
text-align: center;
padding: 48px 16px;
color: #64748b;
font-size: 14px;
}
.empty-state p {
margin-top: 12px;
}
.pagination-bar {
margin-top: 20px;
display: flex;
justify-content: flex-end;
}
:deep(.el-pagination.is-background .el-pager li.is-active) {
background-color: #ff6a00 !important;
color: #ffffff !important;
}
:deep(.el-pagination.is-background .el-pager li:not(.is-active):hover) {
color: #ff6a00 !important;
}
.poster-modal-body {
text-align: center;
}
.poster-card {
position: relative;
background:
radial-gradient(circle at 85% 15%, rgba(255, 106, 0, 0.28) 0%, transparent 60%),
radial-gradient(circle at 15% 85%, rgba(255, 133, 46, 0.18) 0%, transparent 55%),
linear-gradient(150deg, #111827 0%, #1a2234 50%, #252f44 100%);
color: #ffffff;
border: 1px solid rgba(255, 106, 0, 0.3);
border-radius: 16px;
padding: 24px 20px;
box-shadow: 0 16px 36px rgba(15, 23, 42, 0.25);
}
.poster-badge {
display: inline-block;
background: linear-gradient(135deg, #ff6a00 0%, #ff852e 100%);
color: #ffffff;
padding: 3px 12px;
border-radius: 12px;
font-size: 11px;
font-weight: 700;
margin-bottom: 10px;
box-shadow: 0 2px 8px rgba(255, 106, 0, 0.35);
}
.poster-card h3 {
margin: 0;
font-size: 20px;
font-weight: 800;
letter-spacing: 0.5px;
}
.poster-desc {
font-size: 12px;
color: #cbd5e1;
margin: 8px 0 18px;
}
.poster-qr-wrap {
width: 180px;
height: 180px;
background: #ffffff;
padding: 10px;
border-radius: 12px;
margin: 0 auto;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.poster-qr-wrap img {
width: 100%;
height: 100%;
display: block;
}
.poster-code-row {
margin-top: 16px;
font-size: 13px;
color: #e2e8f0;
}
.poster-code-row strong {
color: #ff9b4e;
font-size: 18px;
font-weight: 900;
letter-spacing: 1.5px;
}
.poster-tip {
font-size: 12px;
color: #94a3b8;
margin-top: 14px;
}
@media (max-width: 768px) {
.hero-card {
padding: 24px 18px;
}
.hero-title {
font-size: 22px;
}
.share-content-row {
grid-template-columns: 1fr;
}
.ladder-grid {
grid-template-columns: 1fr;
}
}
</style>