From e2273ef41c66ee06d15ede6b27f1e51d77403883 Mon Sep 17 00:00:00 2001 From: zhenhui <1276357500@qq.com> Date: Fri, 27 Mar 2026 14:14:59 +0800 Subject: [PATCH] =?UTF-8?q?=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?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/locales/langs/en/dice/reward.json | 5 + .../langs/en/dice/reward_config_record.json | 14 +- .../src/locales/langs/zh/dice/reward.json | 5 + .../langs/zh/dice/reward_config_record.json | 12 +- .../src/views/plugin/dice/api/reward/index.ts | 5 +- .../index/modules/weight-test-dialog.vue | 288 ++++++++---------- .../dice/reward_config_record/index/index.vue | 74 +++-- .../index/modules/detail-drawer.vue | 44 ++- server/app/api/logic/PlayStartLogic.php | 7 + .../reward/DiceRewardController.php | 12 +- .../DiceRewardConfigRecordLogic.php | 39 +-- .../reward_config_record/WeightTestRunner.php | 162 ++++++---- .../DiceRewardConfigRecord.php | 21 +- 13 files changed, 403 insertions(+), 285 deletions(-) diff --git a/saiadmin-artd/src/locales/langs/en/dice/reward.json b/saiadmin-artd/src/locales/langs/en/dice/reward.json index 441702e..62a5576 100644 --- a/saiadmin-artd/src/locales/langs/en/dice/reward.json +++ b/saiadmin-artd/src/locales/langs/en/dice/reward.json @@ -57,6 +57,10 @@ "title": "One-Click Weight Test", "alertTitle": "Bonus pool logic", "alertBody": "Same as playStart draw: uses name=default safety line and kill switch; when profit is below the line, paid tickets use player tier weights (custom below), free tickets use killScore; when profit reaches the line and kill is on, both use killScore.", + "chainModeHint": "Simulation: set paid spin counts only (CW/CCW). If a paid draw hits “play again” (or T5), the next draw is free with the same ante, lottery type free, paid amount 0. Free-draw tier odds are configured below (including chained free plays).", + "sectionPaid": "Paid draws", + "sectionFreeAfterPlayAgain": "Free draw tier odds (after play-again)", + "tierProbHintFreeChain": "When using custom tier odds: T1–T5 below apply when a free draw runs (tier roll; combined with dice_reward row weights).", "stepPaid": "Paid ticket", "stepFree": "Free ticket", "labelLotteryTypePaid": "Test pool type", @@ -75,6 +79,7 @@ "btnStart": "Start test", "btnCancel": "Cancel", "warnAnte": "Ante must be greater than 0", + "warnPaidSpins": "Paid clockwise + counter-clockwise spin counts must be greater than 0", "warnTotalSpins": "At least one of paid/free direction spin counts must be greater than 0", "warnPaidTierSumPositive": "When no paid pool is selected, T1–T5 odds sum must be greater than 0", "warnPaidTierSumMax": "Paid T1–T5 odds sum cannot exceed 100%", diff --git a/saiadmin-artd/src/locales/langs/en/dice/reward_config_record.json b/saiadmin-artd/src/locales/langs/en/dice/reward_config_record.json index ce6860e..1f13525 100644 --- a/saiadmin-artd/src/locales/langs/en/dice/reward_config_record.json +++ b/saiadmin-artd/src/locales/langs/en/dice/reward_config_record.json @@ -8,9 +8,15 @@ "counterclockwiseAbbr": "CCW", "status": "Status", "paidDraw": "Paid Draw", - "freeDraw": "Free Draw", + "chainMode": "Chain play-again", + "chainModeYes": "Yes", + "chainModeNo": "No", + "paidPlannedSpins": "Planned paid spins", + "playAgainCount": "Play-again count", + "progressDraws": "{over} done", + "progressFailed": "{over} before fail", "platformProfit": "Platform Profit", - "totalDrawCount": "Total Draw Count", + "totalDrawCount": "Total draws", "createdBy": "Created By", "remark": "Remark", "createTime": "Create Time", @@ -37,6 +43,10 @@ "recordId": "Record ID", "testCount": "Test count", "testCountSuffix": " runs", + "testCountProgress": "In progress: {over} done", + "testCountFailed": "{over} before failure", + "chainModeLabel": "Chain play-again", + "paidPlannedSpins": "Planned paid spins", "createTime": "Created at", "admin": "Operator", "paidPoolId": "Paid lottery pool config ID", diff --git a/saiadmin-artd/src/locales/langs/zh/dice/reward.json b/saiadmin-artd/src/locales/langs/zh/dice/reward.json index dc6f85e..7d31478 100644 --- a/saiadmin-artd/src/locales/langs/zh/dice/reward.json +++ b/saiadmin-artd/src/locales/langs/zh/dice/reward.json @@ -57,6 +57,10 @@ "title": "一键测试权重", "alertTitle": "彩金池逻辑说明", "alertBody": "与 playStart 抽奖逻辑一致:使用 name=default 的安全线、杀分开关;盈利未达安全线时,付费抽奖券使用玩家自身权重(下方自定义档位),免费抽奖券使用 killScore 配置;盈利达到安全线且杀分开启时,付费/免费均使用 killScore 配置。", + "chainModeHint": "模拟方式:只配置付费抽奖次数(顺/逆时针)。付费抽到「再来一次」或 T5 时,下一局自动为免费抽奖,底注与触发局相同,抽奖类型记为免费、付费金额记为 0。免费抽奖的档位概率由下方「免费抽奖」配置决定(含通过再来一次触发的后续免费局)。", + "sectionPaid": "付费抽奖", + "sectionFreeAfterPlayAgain": "免费抽奖(再来一次后的档位概率)", + "tierProbHintFreeChain": "当使用自定义档位时:以下为「免费抽奖」时 T1~T5 的档位概率(仅在有免费局时参与摇档,与 dice_reward 格子权重共同决定结果)。", "stepPaid": "付费抽奖券", "stepFree": "免费抽奖券", "labelLotteryTypePaid": "测试数据档位类型", @@ -75,6 +79,7 @@ "btnStart": "开始测试", "btnCancel": "取消", "warnAnte": "底注 ante 必须大于 0", + "warnPaidSpins": "付费抽奖顺时针与逆时针次数之和须大于 0", "warnTotalSpins": "付费或免费至少一种方向次数之和大于 0", "warnPaidTierSumPositive": "付费未选奖池时,T1~T5 档位概率之和需大于 0", "warnPaidTierSumMax": "付费档位概率 T1~T5 之和不能超过 100%", diff --git a/saiadmin-artd/src/locales/langs/zh/dice/reward_config_record.json b/saiadmin-artd/src/locales/langs/zh/dice/reward_config_record.json index f845f46..53147de 100644 --- a/saiadmin-artd/src/locales/langs/zh/dice/reward_config_record.json +++ b/saiadmin-artd/src/locales/langs/zh/dice/reward_config_record.json @@ -8,7 +8,13 @@ "counterclockwiseAbbr": "逆", "status": "状态", "paidDraw": "付费抽取", - "freeDraw": "免费抽取", + "chainMode": "链式再来一次", + "chainModeYes": "是", + "chainModeNo": "否", + "paidPlannedSpins": "计划付费次数", + "playAgainCount": "再来一次次数", + "progressDraws": "已完成 {over} 次", + "progressFailed": "失败前 {over} 次", "platformProfit": "平台赚取金额", "totalDrawCount": "总抽奖次数", "createdBy": "创建管理员", @@ -37,6 +43,10 @@ "recordId": "记录ID", "testCount": "测试次数", "testCountSuffix": "次", + "testCountProgress": "进行中:已完成 {over} 次", + "testCountFailed": "失败前 {over} 次", + "chainModeLabel": "链式再来一次", + "paidPlannedSpins": "计划付费次数", "createTime": "创建时间", "admin": "执行管理员", "paidPoolId": "付费奖池配置ID", diff --git a/saiadmin-artd/src/views/plugin/dice/api/reward/index.ts b/saiadmin-artd/src/views/plugin/dice/api/reward/index.ts index b4bb150..51feb2f 100644 --- a/saiadmin-artd/src/views/plugin/dice/api/reward/index.ts +++ b/saiadmin-artd/src/views/plugin/dice/api/reward/index.ts @@ -57,14 +57,15 @@ export default { }, /** - * 一键测试权重:创建测试记录并启动后台执行,按付费/免费、顺逆方向交替抽奖 - * 可选 lottery_config_id;不选则传 paid_tier_weights / free_tier_weights(T1-T5) + * 一键测试权重:创建测试记录并启动后台执行 + * chain_free_mode=true:仅模拟付费次数;付费抽到再来一次则插入免费抽奖(同底注、付费金额 0) */ startWeightTest(params: { ante?: number lottery_config_id?: number paid_lottery_config_id?: number free_lottery_config_id?: number + chain_free_mode?: boolean s_count?: number n_count?: number paid_s_count?: number diff --git a/saiadmin-artd/src/views/plugin/dice/reward/index/modules/weight-test-dialog.vue b/saiadmin-artd/src/views/plugin/dice/reward/index/modules/weight-test-dialog.vue index a6ffbbc..8c5b2bc 100644 --- a/saiadmin-artd/src/views/plugin/dice/reward/index/modules/weight-test-dialog.vue +++ b/saiadmin-artd/src/views/plugin/dice/reward/index/modules/weight-test-dialog.vue @@ -11,155 +11,125 @@ {{ $t('page.weightTest.alertBody') }} - + + {{ $t('page.weightTest.chainModeHint') }} + + - - - - - -
- {{ $t('page.weightTest.sectionPaid') }}
+ + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + - -
- {{ $t('page.weightTest.sectionFreeAfterPlayAgain') }}
+ + - - - - - - - - - - - - - - - - + + + +