价格为 0 就不扣费

This commit is contained in:
iVampireSP.com 2022-10-23 12:52:17 +08:00
parent 81455d1807
commit 66d929ff9f
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -99,7 +99,11 @@ public function cost($price = null, $auto = true)
$real_price = $price; $real_price = $price;
} }
$real_price = round($real_price, 8); if ($price == 0) {
return true;
}
$real_price = round($real_price ?? 0, 8);
$amount = $price / config('drops.rate') + 1; $amount = $price / config('drops.rate') + 1;