Ken 1 周之前
父節點
當前提交
67c89e4c7d
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      app/Services/BaseService.php

+ 2 - 2
app/Services/BaseService.php

@@ -196,7 +196,7 @@ class BaseService
      * @param string $separator 分隔符
      * @param boolean $isTop 是否置顶
      */
-    public static function bettingGroupNotice( $text,  $keyboard = [], $image = '',  $isTop = false,  $separator = "\n"): void
+    public static function bettingGroupNotice($text, $keyboard = [], $image = '', $isTop = false, $separator = "\n"): void
     {
         $bettingGroup = Config::where('field', 'betting_group')->first()->val;
 //        $separator = "\n";
@@ -206,12 +206,12 @@ class BaseService
         $len = 4096;
         if (!empty($image)) $len = 1024;
         foreach ($array as $item) {
+            if (count($texts) > 1) $len = 4096;
             if (count($texts) == 0) {
                 $texts[] = $item;
             } else if (strlen($texts[count($texts) - 1] . $item) <= $len) {
                 $texts[count($texts) - 1] .= $item;
             } else {
-                $len = 4096;
                 $texts[] = $item;
             }
         }