diff --git a/saiadmin-artd/src/views/plugin/dice/reward_config_record/index/index.vue b/saiadmin-artd/src/views/plugin/dice/reward_config_record/index/index.vue index d01bbb9..8becc4a 100644 --- a/saiadmin-artd/src/views/plugin/dice/reward_config_record/index/index.vue +++ b/saiadmin-artd/src/views/plugin/dice/reward_config_record/index/index.vue @@ -157,17 +157,19 @@ } function formatAnteCell(row: Record): 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) } // 平台赚取金额展示(未完成或空显示 —) diff --git a/saiadmin-artd/src/views/plugin/dice/reward_config_record/index/modules/detail-drawer.vue b/saiadmin-artd/src/views/plugin/dice/reward_config_record/index/modules/detail-drawer.vue index 69e882f..9ac3ba9 100644 --- a/saiadmin-artd/src/views/plugin/dice/reward_config_record/index/modules/detail-drawer.vue +++ b/saiadmin-artd/src/views/plugin/dice/reward_config_record/index/modules/detail-drawer.vue @@ -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 { diff --git a/server/app/dice/logic/reward_config_record/WeightTestRunner.php b/server/app/dice/logic/reward_config_record/WeightTestRunner.php index 5719455..9bbc2dd 100644 --- a/server/app/dice/logic/reward_config_record/WeightTestRunner.php +++ b/server/app/dice/logic/reward_config_record/WeightTestRunner.php @@ -215,8 +215,12 @@ class WeightTestRunner $isPaid = $item[0] === 'paid'; $dir = $item[1]; $playAnte = (int) $item[2]; - if ($isPaid && $anteRandom) { - $playAnte = $this->pickRandomAnteMult($deptId); + if ($isPaid) { + if ($anteRandom) { + $playAnte = $this->pickRandomAnteMult($deptId); + } elseif ($playAnte <= 0) { + $playAnte = $ante > 0 ? $ante : 1; + } } elseif ($playAnte <= 0) { $playAnte = $ante > 0 ? $ante : 1; } @@ -244,6 +248,8 @@ class WeightTestRunner } $row = $playLogic->simulateOnePlay($cfg, $dir, $lotteryType, $playAnte, $customWeights, $deptId); + // 明细底注必须为 dice_ante_config.mult(随机模式每局独立抽取后的值) + $row['ante'] = $playAnte; $winCoin = (float) ($row['win_coin'] ?? 0); $paidAmount = (float) ($row['paid_amount'] ?? 0); $perPlayProfit = $isPaid ? ($winCoin - $paidAmount) : $winCoin;