From 99949c4c3c8727fad4f3ca85626c018c7a04e60c Mon Sep 17 00:00:00 2001 From: zhenhui <1276357500@qq.com> Date: Thu, 4 Jun 2026 15:08:24 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BC=98=E5=8C=96=E4=B8=80=E9=94=AE=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E6=9D=83=E9=87=8D=E6=97=B6=E6=AF=8F=E6=AC=A1=E5=8E=8B?= =?UTF-8?q?=E6=B3=A8=E7=9A=84=E5=BA=95=E6=B3=A8=E4=B8=BA=E9=9A=8F=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dice/reward_config_record/index/index.vue | 14 ++++++++------ .../index/modules/detail-drawer.vue | 14 ++++++++------ .../reward_config_record/WeightTestRunner.php | 10 ++++++++-- 3 files changed, 24 insertions(+), 14 deletions(-) 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;