This commit is contained in:
pengxiaolong
2025-07-14 13:30:18 +08:00
parent f324bf3bc7
commit 6dec463705
24 changed files with 193 additions and 147 deletions

View File

@@ -38,28 +38,8 @@ const _sfc_main = {
};
},
onLoad(option) {
this.AutomaticCleaning();
common_vendor.index.getStorage({
key: "userinfo",
success: (res) => {
this.info = res.data;
counter.$patch({ myitem: this.info });
},
fail: () => {
}
});
},
methods: {
//自动清理缓存
AutomaticCleaning() {
const lastCleanTime = common_vendor.index.getStorageSync("last_clean_time") || 0;
const now = Date.now();
if (now - lastCleanTime < 7 * 24 * 3600 * 1e3)
return;
common_vendor.index.clearStorage();
common_vendor.index.setStorageSync("last_clean_time", now);
}
},
methods: {},
provide() {
return {
$global: {