Ken 5 dienas atpakaļ
vecāks
revīzija
9f36abf7b0
2 mainītis faili ar 18 papildinājumiem un 2 dzēšanām
  1. 2 2
      app/Services/BetService.php
  2. 16 0
      app/Services/ConfigService.php

+ 2 - 2
app/Services/BetService.php

@@ -386,9 +386,9 @@ class BetService extends BaseService
             $groupText .= lang('投注截止') . ":" . date("H:i:s", (strtotime($issueInfo['end_time'])) - 30) . "\n";;
             $groupText .= lang("成功") . "\n";
             $groupText .= lang('玩家') . ": 【{$lastStr}】 \n";
-            $groupText .= "{$keywords} {$amount} ({$gameplayRuleInfo['odds']}" . lang("倍率") . ") ";
+            $groupText .= "{$keywords} {$amount} ({$gameplayRuleInfo['odds']}" . lang("倍率") . ") \n";
         } else {
-            $groupText .= "{$keywords} {$amount} ({$gameplayRuleInfo['odds']}" . lang("倍率") . ") ";
+            $groupText .= "{$keywords} {$amount} ({$gameplayRuleInfo['odds']}" . lang("倍率") . ") \n";
         }
 
         App::setLocale($lang);

+ 16 - 0
app/Services/ConfigService.php

@@ -161,4 +161,20 @@ class ConfigService extends BaseService
         $info->save();
         return $result;
     }
+
+    /**
+     * 每天把19:56–20:30这段时间的开奖切换成 极速PC28
+     */
+    public function autoSwitchGameType(): void
+    {
+        $day = date('Y-m-d');
+        $start = strtotime("$day 19:56:00");
+        $end = strtotime("$day 20:30:00");
+        $now = time();
+        if ($start <= $now && $now <= $end) {
+            Cache::put('pc28_switch', 1);
+        } else {
+            Cache::put('pc28_switch', 0);
+        }
+    }
 }