设备号

This commit is contained in:
chen wei bo
2025-08-15 16:19:31 +08:00
parent 599c98f135
commit 9debc1238d
10 changed files with 129 additions and 0 deletions
@@ -0,0 +1,10 @@
import { sys } from "cc";
export default class KVStore {
constructor(private prefix = "app:") {}
private key(k: string) { return `${this.prefix}${k}`; }
get(k: string): string | null { return sys.localStorage.getItem(this.key(k)); }
set(k: string, v: string): void { sys.localStorage.setItem(this.key(k), v); }
remove(k: string): void { sys.localStorage.removeItem(this.key(k)); }
}
@@ -0,0 +1,9 @@
{
"ver": "4.0.24",
"importer": "typescript",
"imported": true,
"uuid": "be7e3168-3885-4ad8-8775-8e2f1fe957ce",
"files": [],
"subMetas": {},
"userData": {}
}