优化页面

This commit is contained in:
pengxiaolong
2025-06-06 22:36:41 +08:00
parent f4901f1312
commit d30589fd05
99 changed files with 1091 additions and 1310 deletions

View File

@@ -8,10 +8,12 @@ if (!Math) {
"./pages/Mine/minecomponents/contact.js";
"./pages/Mine/minecomponents/pkInformation.js";
"./pages/Mine/minecomponents/recompose/recompose.js";
"./pages/Mine/minecomponents/serviceProtocol.js";
"./pages/Mine/minecomponents/DetailsPKRecords/DetailsPKRecords.js";
"./pages/PKMessageprocessing/PKMessageprocessing.js";
"./pages/index/index.js";
"./pages/login/login.js";
"./pages/Forum/Forum.js";
"./pages/UserInformation/UserInformation.js";
"./pages/Setting/Setting.js";
"./pages/NewAddedPk/NewAddedPk.js";
@@ -34,6 +36,7 @@ const _sfc_main = {
};
},
onLoad(option) {
AutomaticCleaning();
common_vendor.index.getStorage({
key: "userinfo",
success: (res) => {
@@ -44,6 +47,17 @@ 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.index.setStorageSync("last_clean_time", now);
}
},
provide() {
return {
$global: {