feat(player): 充值订单详情与审核记录,优化桌面端交互与记录列表样式

新增充值详情页及单条订单 API,修复桌面充值提交路径;充值/注单记录编号改为中性色,并包含桌面首页与投注相关 UI 改进。
This commit is contained in:
2026-07-02 10:47:46 +08:00
parent 49eb3cb7e0
commit 66ac69c7a7
31 changed files with 2251 additions and 905 deletions

View File

@@ -22,7 +22,7 @@ const { banners, hotMatches, upcomingMatches, loading, load, announcementItems }
const slip = useBetSlipStore();
const auth = useAuthStore();
const { openAt, visible: popoverVisible, pendingItem } = useDesktopBetPopover();
const { openAt, visible: popoverVisible, pendingItem, cancelClose, scheduleClose } = useDesktopBetPopover();
const activeMarketTypes = ref<Record<string, string>>({});
@@ -140,6 +140,37 @@ function handleOddsClick(match: PlayerHomeMatch, market: any, selId: string, eve
function getSelLabel(sel: any, marketType: string, lineValue?: string | number | null) {
return resolveSelectionLabel(t, sel.selectionCode || '', sel.selectionName || '', { lineValue });
}
function getHoveredSideForMatch(match: PlayerHomeMatch | null) {
if (!match || !popoverVisible.value || !pendingItem.value) return '';
if (String(pendingItem.value.matchId) !== String(match.id)) return '';
const selId = pendingItem.value.selectionId;
// Scan all markets across all tabs to find the selection
for (const market of match.markets ?? []) {
const sel = market.selections?.find((s: any) => s.id === selId);
if (!sel) continue;
const code = (sel.selectionCode || '').toUpperCase();
if (code === 'HOME') return 'home';
if (code === 'AWAY') return 'away';
if (code === 'DRAW') return 'draw';
if (code === 'OVER') return 'home';
if (code === 'UNDER') return 'away';
if (code === 'ODD' || code === 'EVEN') return 'draw';
// Fallback: use selection index
const selIndex = market.selections?.findIndex((s: any) => s.id === selId) ?? -1;
if (selIndex === -1) continue;
if (market.marketType === 'FT_1X2') {
if (selIndex === 0) return 'home';
if (selIndex === 1) return 'draw';
if (selIndex === 2) return 'away';
} else {
if (selIndex === 0) return 'home';
if (selIndex === 1) return 'away';
}
}
return '';
}
</script>
<template>
@@ -184,7 +215,7 @@ function getSelLabel(sel: any, marketType: string, lineValue?: string | number |
<span class="featured-time">{{ formatKickoff(featuredMatch.startTime) }}</span>
</div>
<div class="featured-teams" @click="goMatch(featuredMatch.id)">
<div class="featured-teams" :class="getHoveredSideForMatch(featuredMatch)" @click="goMatch(featuredMatch.id)">
<div class="featured-team">
<TeamEmblem
size="lg"
@@ -271,7 +302,7 @@ function getSelLabel(sel: any, marketType: string, lineValue?: string | number |
</div>
<!-- Hover versus layout (visible on hover) -->
<div class="hover-versus-layout">
<div class="hover-versus-layout" :class="getHoveredSideForMatch(match)">
<div class="hover-team home-slide">
<TeamEmblem
size="md"
@@ -379,7 +410,7 @@ function getSelLabel(sel: any, marketType: string, lineValue?: string | number |
</div>
<!-- Hover versus layout (visible on hover) -->
<div class="hover-versus-layout">
<div class="hover-versus-layout" :class="getHoveredSideForMatch(match)">
<div class="hover-team home-slide">
<TeamEmblem
size="md"
@@ -466,12 +497,12 @@ function getSelLabel(sel: any, marketType: string, lineValue?: string | number |
</div>
<!-- 悬浮预览卡 -->
<div class="sri-preview-card" @click.stop>
<div class="sri-preview-card" @click.stop @mouseenter="cancelClose" @mouseleave="scheduleClose()">
<div class="sri-preview-top">
<span class="sri-preview-league">{{ m.leagueName }}</span>
<span class="sri-preview-time">{{ formatKickoff(m.startTime) }}</span>
</div>
<div class="sri-preview-vs">
<div class="sri-preview-vs" :class="getHoveredSideForMatch(m)">
<div class="sri-preview-team home-team">
<TeamEmblem size="md" :team-code="m.homeTeamCode" :team-name="m.homeTeamName" :logo-url="m.homeTeamLogoUrl" />
<span>{{ m.homeTeamName }}</span>
@@ -1275,10 +1306,11 @@ function getSelLabel(sel: any, marketType: string, lineValue?: string | number |
/* --- 8. 推荐列表 item 左侧金点指示 hover --- */
.side-recommend-item {
position: relative;
transition: background 0.15s, transform 0.15s;
transition: background 0.18s, transform 0.18s;
}
.side-recommend-item:hover {
background: rgba(212, 175, 55, 0.06);
transform: translateX(3px);
}
@@ -1453,4 +1485,96 @@ function getSelLabel(sel: any, marketType: string, lineValue?: string | number |
font-size: 10px;
color: var(--text-muted);
}
/* --- Sri preview: team highlight on odds selection --- */
.sri-preview-team {
transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease, filter 0.3s ease;
}
.sri-preview-vs.home .sri-preview-team.home-team {
transform: translateX(0) scale(1.1) !important;
filter: brightness(1.3) saturate(1.2);
opacity: 1 !important;
}
.sri-preview-vs.home .sri-preview-team.away-team {
opacity: 0.35 !important;
transform: translateX(0) scale(0.92) !important;
filter: grayscale(0.6) brightness(0.7);
}
.sri-preview-vs.away .sri-preview-team.away-team {
transform: translateX(0) scale(1.1) !important;
filter: brightness(1.3) saturate(1.2);
opacity: 1 !important;
}
.sri-preview-vs.away .sri-preview-team.home-team {
opacity: 0.35 !important;
transform: translateX(0) scale(0.92) !important;
filter: grayscale(0.6) brightness(0.7);
}
.sri-preview-vs.draw .sri-preview-team {
transform: translateX(0) scale(1.05) !important;
filter: brightness(1.15) saturate(1.1);
opacity: 1 !important;
}
/* --- VS Selection Highlight: scale selected team, no VS animation --- */
.featured-team,
.hover-team {
transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease, filter 0.3s ease;
}
/* featured match (home) */
.featured-teams.home .featured-team:first-child {
transform: scale(1.08);
filter: brightness(1.3) saturate(1.2);
}
.featured-teams.home .featured-team:last-child {
opacity: 0.35;
transform: scale(0.94);
filter: grayscale(0.6) brightness(0.7);
}
/* featured match (away) */
.featured-teams.away .featured-team:last-child {
transform: scale(1.08);
filter: brightness(1.3) saturate(1.2);
}
.featured-teams.away .featured-team:first-child {
opacity: 0.35;
transform: scale(0.94);
filter: grayscale(0.6) brightness(0.7);
}
/* featured match (draw) */
.featured-teams.draw .featured-team {
transform: scale(1.05);
filter: brightness(1.15) saturate(1.1);
}
/* hover-versus-layout (sidebar/upcoming) */
.hover-versus-layout.home .hover-team.home-slide {
transform: scale(1.08);
filter: brightness(1.3) saturate(1.2);
z-index: 2;
}
.hover-versus-layout.home .hover-team.away-slide {
opacity: 0.35 !important;
transform: scale(0.94);
filter: grayscale(0.6) brightness(0.7);
}
.hover-versus-layout.away .hover-team.away-slide {
transform: scale(1.08);
filter: brightness(1.3) saturate(1.2);
z-index: 2;
}
.hover-versus-layout.away .hover-team.home-slide {
opacity: 0.35 !important;
transform: scale(0.94);
filter: grayscale(0.6) brightness(0.7);
}
.hover-versus-layout.draw .hover-team.home-slide,
.hover-versus-layout.draw .hover-team.away-slide {
transform: scale(1.05);
filter: brightness(1.15) saturate(1.1);
}
</style>