From 65bb1b0c537232df2374a4ec51db0f43ec391675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Sat, 11 Oct 2025 16:37:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=A2=E5=8C=85=E7=AC=AC13=E6=AC=A1=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/library/RedpacketLua.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/common/library/RedpacketLua.php b/application/common/library/RedpacketLua.php index 99b6024..c3c02ac 100644 --- a/application/common/library/RedpacketLua.php +++ b/application/common/library/RedpacketLua.php @@ -77,7 +77,7 @@ if leftCount == 1 then else -- 随机算法:二倍均值法,保证公平性 local maxAmount = leftAmount / leftCount * 2 - amount = math.random(1, math.floor(maxAmount * 100)) / 100 + amount = math.random(1, math.floor(maxAmount)) -- 确保金额不会超过剩余金额 if amount > leftAmount then amount = leftAmount