优化下注金额

This commit is contained in:
2026-04-12 17:56:16 +08:00
parent adc89240fd
commit d52db10863
4 changed files with 58 additions and 4 deletions

View File

@@ -49,6 +49,10 @@ class BaccaratController extends Controller
->where('user_id', $user->id)
->first();
$config = GameConfig::forGame('baccarat')?->params ?? [];
$minBet = (int) ($config['min_bet'] ?? 100);
$maxBet = (int) ($config['max_bet'] ?? 50000);
return response()->json([
'round' => [
'id' => $round->id,
@@ -61,6 +65,8 @@ class BaccaratController extends Controller
'bet_count_big' => $round->bet_count_big,
'bet_count_small' => $round->bet_count_small,
'bet_count_triple' => $round->bet_count_triple,
'min_bet' => $minBet,
'max_bet' => $maxBet,
'my_bet' => $myBet ? [
'bet_type' => $myBet->bet_type,
'amount' => $myBet->amount,

View File

@@ -89,6 +89,9 @@ class HorseRaceController extends Controller
? $basePool + array_sum(array_values($horsePools))
: $basePool;
$minBet = (int) ($config['min_bet'] ?? 100);
$maxBet = (int) ($config['max_bet'] ?? 100000);
return response()->json([
'race' => [
'id' => $race->id,
@@ -99,6 +102,8 @@ class HorseRaceController extends Controller
: 0,
'horses' => $horsesWithBets,
'total_pool' => $displayTotalPool,
'min_bet' => $minBet,
'max_bet' => $maxBet,
'my_bet' => $myBet ? [
'horse_id' => $myBet->horse_id,
'amount' => $myBet->amount,