1234567891011121314151617181920212223242526 |
- import { getURLSearchParams } from '@/tools';
- const userAgent = navigator.userAgent;
- export function platformIsAIO() {
- return /Six\/applet \(AIO;.+\)/i.test(userAgent) || /aio\/\w+/i.test(userAgent);
- }
- export function platformIsAIO_1() {
- return /aio\/1\.0/i.test(userAgent);
- }
- export function getSerialNumberSync() {
- const match = userAgent.match(/sn\/(\w+)/i);
- return match?.[ 1 ] ?? (
- function() {
- const query = getURLSearchParams();
- return query.get('serial') ?? query.get('serialNumber') ?? query.get('sn') ?? void 0;
- }
- )();
- }
- export * from './dialog.ui';
- export * from './notify.ui';
- export * from './toast.ui';
|