Ken 2 giorni fa
parent
commit
3ed97b1028
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      app/Services/PcIssueService.php

+ 3 - 3
app/Services/PcIssueService.php

@@ -159,7 +159,7 @@ class PcIssueService extends BaseService
             $info->combo = $combo;
             $info->image = $recordImage;
             $info->save();
-
+            $pc28Switch = Config::where('field', 'pc28_switch')->first()->val;
 
             $replyInfo = KeyboardService::findOne(['button' => '本期开奖']);
 
@@ -178,12 +178,12 @@ class PcIssueService extends BaseService
                     $buttons[] = [['text' => lang('✅唯一财务'), 'callback_data' => "", 'url' => "https://t.me/{$serviceAccount}"]];
 
                 }
-                if ($index == 0) SendTelegramGroupMessageJob::dispatch($text, $buttons, $image, true);
+                if ($pc28Switch == 1) SendTelegramGroupMessageJob::dispatch($text, $buttons, $image, true);
             }
 
             $recordImage = self::lotteryImage($info->issue_no);
             if ($recordImage) {
-                if ($index == 0) SendTelegramGroupMessageJob::dispatch('', [], url($recordImage), false);
+                if ($pc28Switch == 1) SendTelegramGroupMessageJob::dispatch('', [], url($recordImage), false);
             }
             BetService::betSettled($info->issue_no, $awards);
             DB::commit();