no message

This commit is contained in:
A1300399510 2024-11-28 17:06:45 +08:00
parent ebfdfca645
commit d473163a03

View File

@ -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