perf: 单条消息最长2000个字符,超过自动分割发送,总最长20000

This commit is contained in:
kuaifan
2022-02-12 17:00:09 +08:00
parent 8f1fbcb19e
commit ce70c1ca3a
45 changed files with 46 additions and 1886 deletions

View File

@@ -2,6 +2,7 @@
namespace App\Module;
use App\Exceptions\ApiException;
use App\Models\Setting;
use App\Models\Tmp;
use Cache;
@@ -87,6 +88,18 @@ class Base
return $_A["__static_client_version"];
}
/**
* 检查客户端版本
* @param string $min 最小版本
* @return void
*/
public static function checkClientVersion($min)
{
if (version_compare(Base::getClientVersion(), $min, '<')) {
throw new ApiException('当前版本 (v' . Base::getClientVersion() . ') 过低');
}
}
/**
* 判断是否域名格式
* @param $domain