no message

This commit is contained in:
hajimi
2026-06-11 12:15:29 +08:00
parent 10ebe39c30
commit 96efa1d905
5859 changed files with 815501 additions and 5 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace app\common\model;
class ShortLinkLog extends BaseModel
{
protected $name = 'short_link_log';
/**
* @notes 从UA解析平台
*/
public static function parsePlatform(string $ua): string
{
$ua = strtolower($ua);
if (str_contains($ua, 'micromessenger'))
return 'wechat';
if (str_contains($ua, 'alipay'))
return 'alipay';
if (str_contains($ua, 'iphone') || str_contains($ua, 'ipad'))
return 'ios';
if (str_contains($ua, 'android'))
return 'android';
if (str_contains($ua, 'windows'))
return 'windows';
if (str_contains($ua, 'macintosh'))
return 'mac';
return 'other';
}
}