diff --git a/src/utils/device_identifier.ts b/src/utils/device_identifier.ts index b42b11c5..4c29691f 100644 --- a/src/utils/device_identifier.ts +++ b/src/utils/device_identifier.ts @@ -10,9 +10,7 @@ * 注:仅在浏览器环境可用;SSR/Server Components 中调用会抛错。 */ import { AuthStorage } from "../data/storage/auth/auth_storage"; -import { StorageKeys } from "../data/storage/storage_keys"; import { AppEnvUtil } from "./app-env"; -import { SpAsyncUtil } from "./storage"; export class DeviceIdentifier { private cachedId: string | null = null; @@ -33,15 +31,6 @@ export class DeviceIdentifier { return this.cachedId; } - /** - * 重置缓存与持久化(用于测试或多账号切换) - */ - async reset(): Promise { - this.cachedId = null; - this.initPromise = null; - await SpAsyncUtil.remove(StorageKeys.deviceId); - } - private async initialize(): Promise { // 1. 优先从 localStorage 读取 const storedR = await AuthStorage.getInstance().getDeviceId();