优化页面

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

11
App.vue
View File

@@ -20,6 +20,7 @@ export default {
};
},
onLoad(option) {
AutomaticCleaning()
uni.getStorage({
key: "userinfo",
success: (res) => {
@@ -30,6 +31,16 @@ export default {
},
})
},
methods: {
//自动清理缓存
AutomaticCleaning(){
const lastCleanTime = uni.getStorageSync('last_clean_time') || 0;
const now = Date.now();
if (now - lastCleanTime < 7 * 24 * 3600 * 1000) return; // 7 days
uni.clearStorage();
uni.setStorageSync('last_clean_time', now);
}
},
provide() {
return {
$global: {