合并 智慧就业第一版

This commit is contained in:
2025-10-30 11:29:57 +08:00
parent 577b20661a
commit 6579abe021
166 changed files with 2818496 additions and 367 deletions

View File

@@ -111,6 +111,23 @@ class UniStorageHelper {
return storeData.filter(item => item[fieldName] === value);
}
async getRecordCount(storeName) {
const storeData = this._storageGet(this._getStoreKey(storeName)) || [];
return storeData.length;
}
async deleteOldestRecord(storeName) {
const storeKey = this._getStoreKey(storeName);
const storeData = this._storageGet(storeKey) || [];
if (storeData.length > 0) {
// 删除第一条记录(最早的记录)
const newData = storeData.slice(1);
this._storageSet(storeKey, newData);
this._log(`删除最早的记录,剩余${newData.length}条记录`);
}
return Promise.resolve();
}
/*==================
更新/删除方法
==================*/