From aa0dd7582d1ba6e0a3ab215b7a3ef88c96e04a24 Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Sat, 19 Nov 2022 13:11:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=92=A4=E9=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Host.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/app/Models/Host.php b/app/Models/Host.php index 88c395a..120fee7 100644 --- a/app/Models/Host.php +++ b/app/Models/Host.php @@ -276,19 +276,16 @@ public function addLog($type = 'drops', float $amount = 0) // 换成 余额 // 如果小于 0.00,则不四舍五入 - $c = $amount / $rate; + // $c = $amount / $rate; + // + // if ($c > 0.01) { + // $amount = $amount / $rate; + // } - if ($c > 0.01) { - $amount = $amount / $rate; - } + $amount = $amount / $rate; } $amount = round($amount, 2); - Log::debug('addLog', [ - 'amount' => $amount, - 'rate' => $rate, - 'commission' => $commission, - ]); $should_amount = round($amount * $commission, 2);