feat: 优化消息推送逻辑

This commit is contained in:
kuaifan
2025-12-05 02:10:37 +00:00
parent ee9b6248bb
commit c668340661
8 changed files with 141 additions and 5 deletions

View File

@@ -1827,6 +1827,19 @@ class Base
return $platform;
}
/**
* 是否是PC端包括 Electron 桌面端和 Web 浏览器)
* @param string|null $platform 平台类型,不传则自动获取
* @return bool
*/
public static function isPc($platform = null)
{
if ($platform === null) {
$platform = self::platform();
}
return in_array($platform, ['win', 'mac', 'web']);
}
/**
* 是否是App移动端
* @return bool