diff --git a/js/common.js b/js/common.js index f4c16cc..d4a0848 100644 --- a/js/common.js +++ b/js/common.js @@ -122,18 +122,18 @@ function decodeKey(encrypted, key) { function getBaseData() { return new Promise((resolve, reject) => { - const storedTime = localStorage.getItem("dataTimestamp") - const storedData = localStorage.getItem("basicData") + // const storedTime = localStorage.getItem("dataTimestamp") + // const storedData = localStorage.getItem("basicData") - const currentTime = new Date().getTime() - const timeDiff = currentTime - parseInt(storedTime) - if (storedTime && storedData && timeDiff <= 5 * 60 * 1000) { - // 在5分钟内,使用本地存储的数据 - const basicData = JSON.parse(storedData) - // 处理数据 - resolve(basicData) - return - } + // const currentTime = new Date().getTime() + // const timeDiff = currentTime - parseInt(storedTime) + // if (storedTime && storedData && timeDiff <= 5 * 60 * 1000) { + // // 在5分钟内,使用本地存储的数据 + // const basicData = JSON.parse(storedData) + // // 处理数据 + // resolve(basicData) + // return + // } $ajaxget("/api/home/basicData").then(res => { if (res.code != 200) return