feat(admin,api,player): 赛事分组管理、盘口独立页与多语言展示优化
- 管理端按联赛展示单场,新增赛事/单场流程与列表展开状态保持 - 盘口赔率迁至独立页面,保存按钮仅在有修改时高亮 - API 新增联赛列表与子场查询,按 locale 返回队名并修复编译 - 波胆其它选项与促销标签等 i18n 补齐,文案更易懂
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user