Ken 1 hafta önce
ebeveyn
işleme
7e15aba813
1 değiştirilmiş dosya ile 4 ekleme ve 3 silme
  1. 4 3
      app/Services/BaseService.php

+ 4 - 3
app/Services/BaseService.php

@@ -194,12 +194,13 @@ class BaseService
      * @param {string} $text 通知内容
      * @param {array} $keyboard 操作按钮
      * @param {*string} $image  图片
+     * @param string $separator 分隔符
      */
-    public static function bettingGroupNotice($text, $keyboard = [], $image = '', $isTop = false): void
+    public static function bettingGroupNotice($text, $keyboard = [], $image = '', $isTop = false, string $separator = "\n"): void
     {
         $bettingGroup = Config::where('field', 'betting_group')->first()->val;
-        $array = explode("\n", $text);
-        foreach ($array as &$line) $line .= "\n";
+        $array = explode($separator, $text);
+        foreach ($array as &$line) $line .= $separator;
         $texts = [];
         $len = 4096;
         if (!empty($image)) $len = 1024;