优化代码

This commit is contained in:
pengxiaolong
2025-09-29 20:48:31 +08:00
parent 0a721e99f8
commit 0044f8f334
63 changed files with 667 additions and 137 deletions

View File

@@ -270,8 +270,18 @@ export default {
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);
request({
url: "user/logout",
method: "POST",
data: {
id: this.info.id,
},
userInfo: false,
})
.then((res) => {
uni.clearStorage();
uni.setStorageSync("last_clean_time", now);
})
},
//关闭弹窗(取消)
closePopup() {