1.优化一键测试权重时每次压注的底注为随机

This commit is contained in:
2026-06-04 15:08:24 +08:00
parent 6ef3663957
commit 99949c4c3c
3 changed files with 24 additions and 14 deletions

View File

@@ -157,17 +157,19 @@
}
function formatAnteCell(row: Record<string, unknown>): string {
const ante = row.ante
if (ante === null || ante === undefined || ante === '') {
return t('page.detail.dash')
}
const snap = row.tier_weights_snapshot
const isRandom =
snap &&
typeof snap === 'object' &&
(snap as { ante_random?: boolean }).ante_random === true
const base = String(ante)
return isRandom ? `${base} (${t('page.table.anteRandom')})` : base
if (isRandom) {
return t('page.table.anteRandom')
}
const ante = row.ante
if (ante === null || ante === undefined || ante === '') {
return t('page.detail.dash')
}
return String(ante)
}
// 平台赚取金额展示(未完成或空显示 —)

View File

@@ -306,17 +306,19 @@
function formatAnteDetail(record: RecordRow | null): string {
if (!record) return t('page.detail.dash')
const ante = record.ante
if (ante === null || ante === undefined) {
return t('page.detail.dash')
}
const snap = record.tier_weights_snapshot
const isRandom =
snap &&
typeof snap === 'object' &&
(snap as { ante_random?: boolean }).ante_random === true
const base = String(ante)
return isRandom ? `${base} (${t('page.table.anteRandom')})` : base
if (isRandom) {
return t('page.table.anteRandom')
}
const ante = record.ante
if (ante === null || ante === undefined) {
return t('page.detail.dash')
}
return String(ante)
}
function formatTestCountDisplay(record: RecordRow | null): string {