fix(admin/player/api): 同步单关串关持久化、仅串关可选与盘口状态展示
1. 后台/API:赛事详情返回 allowSingle/allowParlay,管理端 mapMarkets 正确回读 2. 玩家端:仅关单关时仍可点选加入串关;投注抽屉禁用单关提交并提示 3. 玩家端:盘口暂停/已关闭状态标签;MarketTypeTile 展示 statusLabel Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -57,9 +57,17 @@ const canSubmitActive = computed(() => {
|
||||
if (activeTab.value === 'parlay') {
|
||||
return slip.parlayItems.length >= PARLAY_MIN_LEGS && slip.parlayItems.length <= PARLAY_MAX_LEGS;
|
||||
}
|
||||
return Boolean(slip.singleItem);
|
||||
return Boolean(slip.singleItem) && slip.singleItem.allowSingle !== false;
|
||||
});
|
||||
|
||||
const singleParlayOnlyHint = computed(
|
||||
() =>
|
||||
activeTab.value === 'single' &&
|
||||
Boolean(slip.singleItem) &&
|
||||
slip.singleItem!.allowSingle === false &&
|
||||
slip.singleItem!.allowParlay !== false,
|
||||
);
|
||||
|
||||
const balanceText = computed(() => {
|
||||
if (balanceLoading.value) return t('bet.loading');
|
||||
if (balance.value == null) return '--';
|
||||
@@ -356,6 +364,7 @@ watch(
|
||||
</div>
|
||||
<div class="item-odds">{{ slip.singleItem.odds.toFixed(2) }}</div>
|
||||
</div>
|
||||
<p v-if="singleParlayOnlyHint" class="warning">{{ t('bet.slip_parlay_only_hint') }}</p>
|
||||
|
||||
<template v-if="activeTab === 'parlay'">
|
||||
<p v-if="parlayWarning" class="warning">{{ parlayWarning }}</p>
|
||||
|
||||
@@ -4,6 +4,7 @@ import { useI18n } from 'vue-i18n';
|
||||
defineProps<{
|
||||
label: string;
|
||||
promoLabel?: string;
|
||||
statusLabel?: string;
|
||||
expanded: boolean;
|
||||
hasMarket: boolean;
|
||||
}>();
|
||||
@@ -21,9 +22,9 @@ 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" :class="{ open: expanded }" aria-hidden="true">▸</span>
|
||||
<span v-if="promoLabel" class="row-promo">{{ promoLabel }}</span>
|
||||
<span v-if="statusLabel" class="row-status">{{ statusLabel }}</span>
|
||||
<span v-else-if="!hasMarket" class="row-muted">{{ t('bet.market_closed') }}</span>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
@@ -86,6 +87,17 @@ const { t } = useI18n();
|
||||
border: 1px solid rgba(248, 151, 31, 0.3);
|
||||
}
|
||||
|
||||
.row-status {
|
||||
flex-shrink: 0;
|
||||
font-size: 9px;
|
||||
font-weight: 700;
|
||||
color: #f0b429;
|
||||
padding: 2px 6px;
|
||||
border-radius: 3px;
|
||||
background: rgba(240, 180, 41, 0.12);
|
||||
border: 1px solid rgba(240, 180, 41, 0.35);
|
||||
}
|
||||
|
||||
.row.expanded .row-label {
|
||||
color: #003D6B;
|
||||
}
|
||||
@@ -95,16 +107,4 @@ const { t } = useI18n();
|
||||
color: #6B7280;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.row-chevron {
|
||||
font-size: 11px;
|
||||
color: #6B7280;
|
||||
transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.row-chevron.open {
|
||||
transform: rotate(90deg);
|
||||
color: #003D6B;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user