feat(admin,api,player): 赛事分组管理、盘口独立页与多语言展示优化

- 管理端按联赛展示单场,新增赛事/单场流程与列表展开状态保持

- 盘口赔率迁至独立页面,保存按钮仅在有修改时高亮

- API 新增联赛列表与子场查询,按 locale 返回队名并修复编译

- 波胆其它选项与促销标签等 i18n 补齐,文案更易懂
This commit is contained in:
2026-06-04 16:25:03 +08:00
parent c68abadceb
commit cc737e2924
39 changed files with 3330 additions and 378 deletions

View File

@@ -5,6 +5,7 @@ import saishiImg from '../assets/images/saishi.png';
defineProps<{
leagueId: string;
leagueName: string;
leagueLogoUrl?: string | null;
expanded: boolean;
matches: {
id: string;
@@ -12,6 +13,8 @@ defineProps<{
awayTeamName: string;
homeTeamCode?: string;
awayTeamCode?: string;
homeTeamLogoUrl?: string | null;
awayTeamLogoUrl?: string | null;
startTime: string;
}[];
}>();
@@ -26,7 +29,11 @@ const emit = defineEmits<{ toggle: []; bet: [id: string] }>();
<span class="toggle-mark">{{ expanded ? '' : '+' }}</span>
</span>
<span class="league-title">*{{ leagueName }}</span>
<img :src="saishiImg" alt="" class="league-saishi" />
<img
:src="leagueLogoUrl || saishiImg"
alt=""
class="league-saishi"
/>
</button>
<div v-show="expanded" class="match-panel">

View File

@@ -10,6 +10,8 @@ const props = defineProps<{
awayTeamName: string;
homeTeamCode?: string;
awayTeamCode?: string;
homeTeamLogoUrl?: string | null;
awayTeamLogoUrl?: string | null;
startTime: string;
};
}>();
@@ -29,8 +31,12 @@ const kickoff = computed(() => {
});
});
const homeFlag = computed(() => teamFlagUrl(props.match.homeTeamCode, props.match.homeTeamName));
const awayFlag = computed(() => teamFlagUrl(props.match.awayTeamCode, props.match.awayTeamName));
const homeFlag = computed(() =>
teamFlagUrl(props.match.homeTeamCode, props.match.homeTeamName, props.match.homeTeamLogoUrl),
);
const awayFlag = computed(() =>
teamFlagUrl(props.match.awayTeamCode, props.match.awayTeamName, props.match.awayTeamLogoUrl),
);
</script>
<template>

View File

@@ -21,7 +21,9 @@ const emit = defineEmits<{
const { t } = useI18n();
const columns = computed(() => groupCorrectScoreSelections(props.selections, props.marketType));
const columns = computed(() =>
groupCorrectScoreSelections(props.selections, props.marketType, t),
);
function setStake(sel: CsSelection, raw: string) {
const n = Math.max(0, Number(raw) || 0);

View File

@@ -1,7 +1,11 @@
<script setup lang="ts">
defineProps<{
import { useI18n } from 'vue-i18n';
import { resolveSelectionLabel } from '../../utils/selectionLabel';
const props = defineProps<{
selections: {
id: string;
selectionCode?: string;
selectionName: string;
odds: string;
}[];
@@ -10,6 +14,14 @@ defineProps<{
}>();
const emit = defineEmits<{ pick: [id: string] }>();
const { t } = useI18n();
function label(sel: (typeof props.selections)[number]) {
if (sel.selectionCode) {
return resolveSelectionLabel(t, sel.selectionCode, sel.selectionName);
}
return sel.selectionName;
}
</script>
<template>
@@ -23,7 +35,7 @@ const emit = defineEmits<{ pick: [id: string] }>();
:class="{ selected: isSelected(sel.id) }"
@click="emit('pick', sel.id)"
>
<span class="label">{{ sel.selectionName }}</span>
<span class="label">{{ label(sel) }}</span>
<span class="odds">{{ sel.odds }}</span>
</button>
</div>

View File

@@ -3,6 +3,7 @@ import { useI18n } from 'vue-i18n';
defineProps<{
label: string;
promoLabel?: string;
expanded: boolean;
hasMarket: boolean;
}>();
@@ -20,6 +21,7 @@ const { t } = useI18n();
@click="emit('toggle')"
>
<span class="row-label">{{ label }}</span>
<span v-if="promoLabel" class="row-promo">{{ promoLabel }}</span>
<span v-if="!hasMarket" class="row-muted">{{ t('bet.market_closed') }}</span>
<span v-else class="row-chevron" aria-hidden="true">{{ expanded ? '▾' : '▸' }}</span>
</button>
@@ -53,6 +55,17 @@ const { t } = useI18n();
color: var(--text);
}
.row-promo {
flex-shrink: 0;
font-size: 9px;
font-weight: 700;
color: #ffb800;
padding: 2px 6px;
border-radius: 3px;
background: rgba(255, 184, 0, 0.12);
border: 1px solid rgba(255, 184, 0, 0.35);
}
.row.expanded .row-label {
color: var(--primary-light);
}