首页增加短剧推荐

This commit is contained in:
mtvpls
2025-12-18 21:36:31 +08:00
parent 6f780d66fe
commit 0ae5923b4b
12 changed files with 497 additions and 1 deletions
+20
View File
@@ -262,6 +262,26 @@ export class DbManager {
throw new Error('存储类型不支持清空数据操作');
}
}
// ---------- 通用键值存储 ----------
async getGlobalValue(key: string): Promise<string | null> {
if (typeof (this.storage as any).getGlobalValue === 'function') {
return (this.storage as any).getGlobalValue(key);
}
return null;
}
async setGlobalValue(key: string, value: string): Promise<void> {
if (typeof (this.storage as any).setGlobalValue === 'function') {
await (this.storage as any).setGlobalValue(key, value);
}
}
async deleteGlobalValue(key: string): Promise<void> {
if (typeof (this.storage as any).deleteGlobalValue === 'function') {
await (this.storage as any).deleteGlobalValue(key);
}
}
}
// 导出默认实例