Ken 2 дней назад
Родитель
Сommit
93cbb9f14a
2 измененных файлов с 15 добавлено и 5 удалено
  1. 1 1
      app/Services/BaseService.php
  2. 14 4
      app/Services/BetService.php

+ 1 - 1
app/Services/BaseService.php

@@ -275,7 +275,7 @@ class BaseService
                         $res[] = $botMsg;
                         $response = self::telegram()->sendPhoto($botMsg);
                     } else {
-                        if (str_contains($botMsg['text'], '</pre>')){
+                        if (str_contains($botMsg['text'], '</table>')){
                             $botMsg['parse_mode'] = 'HTML';
                         }
                             $res[] = $botMsg;

+ 14 - 4
app/Services/BetService.php

@@ -1058,18 +1058,28 @@ class BetService extends BaseService
         $group_language = Config::where('field', 'group_language')->first()->val;
         App::setLocale($group_language);
         $text3 = "📝 {$issue_no}" . lang('期投注统计') . " \n";
-        $text3 .= lang("玩法") . "    " . lang("总投") . " \n";
+        $text3 .= "<table><tr>";
+        $text3 .= "<th>" . lang("玩法") . "</th>";
+        $text3 .= "<th>" . lang("总投") . "</th>";
+        $text3 .= "<tr>";
         App::setLocale($lang);
         if ($keywordsList) {
             uksort($keywordsList, 'custom_sort');
 //            ksort($keywordsList);
-            $text3.="<pre>";
+
             foreach ($keywordsList as $k => $v) {
-                $text3 .= "{$k}    {$v} \n";
+                $text3 .= "<tr>";
+                $text3 .= "<td>{$k}</td>";
+                $text3 .= "<td>{$v}</td>";
+//                $text3 .= "{$k}    {$v} \n";
+//                $text3 .= "{$k}    {$v} \n";
+                $text3 .= "</tr>";
             }
-            $text3.="</pre>";
+
         }
 
+            $text3 .= "</table>";
+
         $inlineButton = self::getOperateButton();
 
         SendTelegramGroupMessageJob::dispatch($text3, $inlineButton, '');