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

@@ -76,6 +76,7 @@ const _sfc_main = {
this.pkList({ type: 1 });
},
onLoad() {
this.AutomaticCleaning();
common_vendor.index.getStorage({
key: "userinfo",
success: (res) => {
@@ -98,6 +99,16 @@ const _sfc_main = {
});
},
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.A.logout();
common_vendor.index.setStorageSync("last_clean_time", now);
},
//关闭弹窗(取消)
closePopup() {
this.$refs.popup.close();