diff --git a/app/Http/Controllers/BaccaratController.php b/app/Http/Controllers/BaccaratController.php
index 5b40e8e..abba367 100644
--- a/app/Http/Controllers/BaccaratController.php
+++ b/app/Http/Controllers/BaccaratController.php
@@ -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,
diff --git a/app/Http/Controllers/HorseRaceController.php b/app/Http/Controllers/HorseRaceController.php
index ddb0626..98ee937 100644
--- a/app/Http/Controllers/HorseRaceController.php
+++ b/app/Http/Controllers/HorseRaceController.php
@@ -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,
diff --git a/resources/views/chat/partials/games/baccarat-panel.blade.php b/resources/views/chat/partials/games/baccarat-panel.blade.php
index ec66313..f8f95c3 100644
--- a/resources/views/chat/partials/games/baccarat-panel.blade.php
+++ b/resources/views/chat/partials/games/baccarat-panel.blade.php
@@ -191,14 +191,14 @@
{{-- 快捷金额 --}}
-
+
@@ -463,6 +463,8 @@
// 下注表单
selectedType: '',
betAmount: 100,
+ minBet: 100,
+ maxBet: 50000,
submitting: false,
// 结算结果
@@ -481,6 +483,24 @@
autoCloseTimer: null,
autoCloseCountdown: 0,
+ /**
+ * 获取快捷下注金额数组
+ */
+ get quickBetAmounts() {
+ const min = this.minBet || 100;
+ const max = this.maxBet || 50000;
+
+ // 默认比例:1x, 5x, 10x, 50x, 100x (基于最小下注)
+ // 同时确保不超过最大下注
+ return [
+ min,
+ Math.min(min * 5, max),
+ Math.min(min * 10, max),
+ Math.min(min * 50, max),
+ Math.min(min * 100, max)
+ ].filter((v, i, a) => a.indexOf(v) === i); // 去重
+ },
+
/**
* 重置为未开局空状态
*/
@@ -552,6 +572,8 @@
this.betCountBig = data.round.bet_count_big;
this.betCountSmall = data.round.bet_count_small;
this.betCountTriple = data.round.bet_count_triple;
+ this.minBet = data.round.min_bet || 100;
+ this.maxBet = data.round.max_bet || 50000;
if (data.round.my_bet) {
this.myBet = true;
this.myBetType = data.round.my_bet.bet_type;
diff --git a/resources/views/chat/partials/games/horse-race-panel.blade.php b/resources/views/chat/partials/games/horse-race-panel.blade.php
index 9e1a291..82c4748 100644
--- a/resources/views/chat/partials/games/horse-race-panel.blade.php
+++ b/resources/views/chat/partials/games/horse-race-panel.blade.php
@@ -148,14 +148,14 @@
{{-- 快捷金额 --}}
-
+
+ x-text="preset >= 10000 ? (preset/1000)+'k' : (preset >= 1000 ? (preset/1000)+'k' : preset)">
a.indexOf(v) === i);
+ },
+
/**
* 开赛:填充场次数据并开始倒计时
*/
@@ -461,6 +478,8 @@
if (data.race) {
this.horses = data.race.horses || this.horses;
this.totalPool = data.race.total_pool || 0;
+ this.minBet = data.race.min_bet || 100;
+ this.maxBet = data.race.max_bet || 100000;
if (data.race.my_bet) {
this.myBet = true;
this.myBetHorseId = data.race.my_bet.horse_id;
@@ -633,6 +652,8 @@
this.raceId = race.id;
this.horses = race.horses || [];
this.totalPool = race.total_pool || 0;
+ this.minBet = race.min_bet || 100;
+ this.maxBet = race.max_bet || 100000;
// 更新本人下注状态
if (race.my_bet) {