## 管理端 / API(Bug 修复) - matches.service:getAdminMatchDetail 返回 markets 时补充 allowSingle、allowParlay 字段 - MatchMarketsPanel:mapMarkets 从接口读取单关/串关开关,不再硬编码为 true - match-form.ts:AdminMarket 类型补充 allowSingle、allowParlay ## 玩家端 — 全局主题(styles.css / index.html / site.webmanifest) - 海军暗色 + 白色强调 token,卡片高光渐变(--gradient-card) - 下拉/弹窗实底不透明(--dropdown-bg: #0A2540) - 统一 sub-toolbar、status-ribbon、filter-tab 等全局样式 - theme-color 同步为 #001A33 ## 玩家端 — 布局与壳层 - MainLayout:详情子页去顶栏/公告,sub-toolbar 全宽铺底 - WalletBalanceCard(新):个人页钱包卡片(反水 + 未结算) - walletStats.ts(新):钱包统计逻辑抽取 ## 玩家端 — 赛事 / 投注 - MatchDetailView:顶栏 8px 顶距、卡片全宽(--detail-gutter-x: 0) - 盘口状态标签(暂停/已关闭)、去掉 MarketTypeTile 右侧箭头 - VsBadge(新):纯文字 VS,删除 vs.png - isMarketLocked:仅关单关但允许串关时仍可点击,支持串关流程 - BetSlipDrawer:仅串关盘口禁用单关提交并提示 slip_parlay_only_hint - betSlip:SlipItem 增加 allowSingle 字段 - MatchBetCard / LeagueAccordionItem:45° 待开赛角标,去掉展开左侧白边 - OutrightEventSection:去掉展开时左侧白色选中条 - FootballView:加大左右边距、筛选栏去 sticky、选中态增强 - BannerCarousel:恢复原始全宽轮播 ## 玩家端 — 钱包 / 个人 / 认证 / 其他页面 - WalletView:移除顶部钱包卡片,保留账单列表 - ProfileView:保留 WalletBalanceCard - 充值/账单/注单/登录注册等页面配色与间距统一 - 公告标签、余额面板、语言切换、区号选择等弹层改为实底 ## 国际化 - zh-CN / en-US / ms-MY:新增 slip_parlay_only_hint(仅串关盘口提示) ## 资产 - 更新 banner.svg、empty-matches.svg 配色 - 删除 vs.png Co-authored-by: Cursor <cursoragent@cursor.com>
216 lines
4.9 KiB
Vue
216 lines
4.9 KiB
Vue
<script setup lang="ts">
|
||
import { computed } from 'vue';
|
||
import { useI18n } from 'vue-i18n';
|
||
import MatchBetCard from './MatchBetCard.vue';
|
||
import saishiImg from '../assets/images/saishi.webp';
|
||
import cardBg from '../assets/images/card-bg.webp';
|
||
|
||
const matchCardBg = `url(${cardBg})`;
|
||
|
||
const props = defineProps<{
|
||
leagueId: string;
|
||
leagueName: string;
|
||
leagueLogoUrl?: string | null;
|
||
expanded: boolean;
|
||
matches: {
|
||
id: string;
|
||
homeTeamName: string;
|
||
awayTeamName: string;
|
||
homeTeamCode?: string;
|
||
awayTeamCode?: string;
|
||
homeTeamLogoUrl?: string | null;
|
||
awayTeamLogoUrl?: string | null;
|
||
startTime: string;
|
||
bettingOpen?: boolean;
|
||
matchPhase?: import('../utils/matchPhase').MatchPhase;
|
||
score?: {
|
||
htHome: number | null;
|
||
htAway: number | null;
|
||
ftHome: number | null;
|
||
ftAway: number | null;
|
||
homeCorners?: number | null;
|
||
awayCorners?: number | null;
|
||
homeYellowCards?: number | null;
|
||
awayYellowCards?: number | null;
|
||
homeRedCards?: number | null;
|
||
awayRedCards?: number | null;
|
||
homeCards?: number | null;
|
||
awayCards?: number | null;
|
||
} | null;
|
||
}[];
|
||
}>();
|
||
|
||
const emit = defineEmits<{ toggle: []; bet: [id: string] }>();
|
||
const { t } = useI18n();
|
||
|
||
const totalCount = computed(() => props.matches.length);
|
||
const liveCount = computed(() => props.matches.filter(m => m.matchPhase === 'closed_pending').length);
|
||
const openCount = computed(() => props.matches.filter(m => m.matchPhase === 'open').length);
|
||
</script>
|
||
|
||
<template>
|
||
<section class="league-block" :class="{ expanded }">
|
||
<button type="button" class="league-row" :aria-expanded="expanded" @click="emit('toggle')">
|
||
<span class="toggle-icon" :class="{ open: expanded }" aria-hidden="true">
|
||
<span class="toggle-mark">{{ expanded ? '−' : '+' }}</span>
|
||
</span>
|
||
<span class="league-info">
|
||
<span class="league-title">*{{ leagueName }}</span>
|
||
<span class="league-stats">
|
||
<span class="stat-item">{{ totalCount }} {{ t('bet.match_unit') }}</span>
|
||
<span v-if="liveCount > 0" class="stat-item stat-live">{{ liveCount }} {{ t('bet.status_live') }}</span>
|
||
<span v-if="openCount > 0" class="stat-item stat-open">{{ openCount }} {{ t('bet.status_open') }}</span>
|
||
</span>
|
||
</span>
|
||
<img
|
||
:src="leagueLogoUrl || saishiImg"
|
||
alt=""
|
||
class="league-saishi"
|
||
loading="lazy"
|
||
decoding="async"
|
||
/>
|
||
</button>
|
||
|
||
<div v-show="expanded" class="match-panel">
|
||
<div class="match-grid">
|
||
<MatchBetCard
|
||
v-for="match in matches"
|
||
:key="match.id"
|
||
:match="match"
|
||
@bet="emit('bet', $event)"
|
||
/>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
</template>
|
||
|
||
<style scoped>
|
||
.league-block {
|
||
position: relative;
|
||
isolation: isolate;
|
||
margin-bottom: 12px;
|
||
border: 1px solid rgba(255, 255, 255, 0.11);
|
||
border-radius: var(--radius);
|
||
background: var(--gradient-card);
|
||
box-shadow: var(--shadow-card-sm);
|
||
overflow: hidden;
|
||
}
|
||
|
||
.league-block::before {
|
||
content: '';
|
||
position: absolute;
|
||
top: 0;
|
||
left: 8%;
|
||
right: 8%;
|
||
height: 1px;
|
||
background: var(--gradient-card-shine);
|
||
pointer-events: none;
|
||
z-index: 2;
|
||
}
|
||
|
||
.league-row {
|
||
position: relative;
|
||
z-index: 1;
|
||
width: 100%;
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 10px;
|
||
padding: 12px 16px;
|
||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
|
||
border: none;
|
||
border-radius: 0;
|
||
text-align: left;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.league-row::before {
|
||
content: '';
|
||
position: absolute;
|
||
inset: 0;
|
||
background: v-bind(matchCardBg) center / 100% 100% no-repeat;
|
||
opacity: 0.25;
|
||
z-index: -1;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.league-row:active {
|
||
opacity: 0.92;
|
||
}
|
||
|
||
.toggle-icon {
|
||
flex-shrink: 0;
|
||
width: 26px;
|
||
height: 26px;
|
||
border-radius: 50%;
|
||
background: var(--bg-card);
|
||
border: 1px solid var(--border);
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
}
|
||
|
||
.toggle-mark {
|
||
color: var(--text-muted);
|
||
font-size: 16px;
|
||
font-weight: 600;
|
||
line-height: 1;
|
||
margin-top: -1px;
|
||
}
|
||
|
||
.league-info {
|
||
flex: 1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 2px;
|
||
min-width: 0;
|
||
}
|
||
|
||
.league-title {
|
||
font-size: 13px;
|
||
font-weight: 600;
|
||
color: var(--text);
|
||
line-height: 1.35;
|
||
min-width: 0;
|
||
}
|
||
|
||
.league-stats {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
font-size: 11px;
|
||
color: var(--text-muted);
|
||
line-height: 1.2;
|
||
}
|
||
|
||
.stat-live {
|
||
color: var(--success);
|
||
}
|
||
|
||
.stat-open {
|
||
color: #6ee78a;
|
||
}
|
||
|
||
.league-saishi {
|
||
flex-shrink: 0;
|
||
height: 44px;
|
||
width: auto;
|
||
max-width: 40px;
|
||
object-fit: contain;
|
||
margin-left: 4px;
|
||
padding-left: 10px;
|
||
border-left: 1px solid var(--border);
|
||
}
|
||
|
||
.match-panel {
|
||
background: linear-gradient(180deg, rgba(0, 20, 40, 0.35) 0%, rgba(0, 26, 51, 0.2) 100%);
|
||
padding: 12px 8px 8px;
|
||
}
|
||
|
||
.match-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(1, minmax(0, 1fr));
|
||
gap: 10px;
|
||
padding: 0 4px;
|
||
}
|
||
</style>
|