로그용 디바이스 아이디

This commit is contained in:
focp212@naver.com
2025-10-30 13:49:27 +09:00
parent f55c425037
commit b454bfbd69
4 changed files with 16 additions and 6 deletions

View File

@@ -1,4 +1,6 @@
import { UAParser } from 'ua-parser-js';
import { getLocalStorage } from '../lib';
import { StorageKeys } from './local-storage';
const { origin } = window.location;
export const CURRENT_URL = `${origin}`;
@@ -28,8 +30,8 @@ export const getHeaderUserAgent = (options?: {
let os = result.os.name;
let deviceType = result.device.type;
let deviceID = 'uuid';
let appVersion = '1.0.0';
let deviceID = getLocalStorage(StorageKeys.DeviceId);
let appVersion = getLocalStorage(StorageKeys.AppVersion);
let browserInformation = result.browser.name;
return `${os} ${deviceType} ${deviceID} ${appVersion} ${browserInformation} ${options?.menuId || ''} ${options?.apiType || ''}`;