Ken 4 天之前
父节点
当前提交
be4ede224d
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      app/Services/BetService.php

+ 3 - 2
app/Services/BetService.php

@@ -464,7 +464,7 @@ class BetService extends BaseService
                     $groupText .= lang("成功") . "\n";
                     $groupText .= lang('玩家') . ": 【{$lastStr}】 \n";
                     App::setLocale($lang);
-
+                    $haveBet = false;
                     for ($i = 0; $i < $betTimes; $i++) {
                         if (strtotime($issueInfo['end_time']) - time() < IssueService::COUNTDOWN_TO_CLOSING_THE_MARKET) {
                             $fake_bet_count = Cache::get("fake_bet_count_{$issueInfo->issue_no}", 0);
@@ -506,6 +506,7 @@ class BetService extends BaseService
                             $first_name = self::generateRandomString(6);
                             App::setLocale($group_language);
                             $groupText .= "{$input} (" . $item['odds'] . lang("倍率") . ") ";
+                            $haveBet = true;
                             App::setLocale($lang);
 
                             if (strtotime($issueInfo['end_time']) - strtotime($now_date) < 22) {
@@ -514,7 +515,7 @@ class BetService extends BaseService
                             }
                         }
                     }
-                    if ($groupText != "") {
+                    if ($haveBet) {
                         $groupText .= "\n-------- \n";
                         $inlineButton = self::getOperateButton();
                         // 群通知  暂停2秒再发送,避免同时发送多个消息而超过 Telegram 的频率限制