Ken 1 day ago
parent
commit
09be4f06a5

+ 8 - 3
app/Services/BetService.php

@@ -322,7 +322,6 @@ class BetService extends BaseService
         BalanceLogService::addLog($memberId, -$amount, $balance, ($balance - $amount), '投注', $bet_id, '');
 
 
-
         //记录反水
         $rebate = Rebate::addOrUpdate([
             'member_id' => $memberId,
@@ -378,8 +377,14 @@ class BetService extends BaseService
         $betFake = Config::where('field', 'bet_fake')->first()->val;
         if ($betFake) {
             // 期数验证
-            $issueInfo = IssueService::model()::where('status', IssueService::model()::STATUS_BETTING)->orderBy('id', 'desc')->first();
-//            $issueInfo = PcIssue::where('status', IssueService::model()::STATUS_BETTING)->orderBy('id', 'desc')->first();
+
+            $pc28Switch = Config::where('field', 'pc28_switch')->first()->val;
+            if ($pc28Switch == 1) {
+                $issueInfo = PcIssue::where('status', IssueService::model()::STATUS_BETTING)->orderBy('id', 'desc')->first();
+            } else {
+                $issueInfo = IssueService::model()::where('status', IssueService::model()::STATUS_BETTING)->orderBy('id', 'desc')->first();
+            }
+
             if ($issueInfo) {
                 $betFakeRandAmount = Config::where('field', 'bet_fake_rand_amount')->first()->val;
                 $betFakeRandAmount = explode(',', $betFakeRandAmount);

+ 37 - 0
database/migrations/2025_12_09_153841_insert_config.php

@@ -0,0 +1,37 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Support\Facades\DB;
+return new class extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        DB::table('config')->insert([
+            [
+                'field' => 'pc28_switch',
+                'val' => "0",
+                'remark' => '游戏切换(0:pc28 1:急速28)',
+                'group_id' => 3,
+                'created_at' => now(),
+                'updated_at' => now(),
+            ]
+        ]);
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        //
+    }
+};