This commit is contained in:
dyhj625 2025-04-08 10:04:35 +09:00
parent 7a37f837d6
commit 8fec088bfa

View File

@ -75,7 +75,7 @@ export const useWeatherStore = defineStore('weather', () => {
const getWeatherInfoWithCache = async () => {
const now = new Date();
const pad = n => String(n).padStart(2, '0');
const key = `weather_${pad(now.getMonth() + 1)}${pad(now.getDate())}${pad(now.getHours())}${Math.floor(now.getMinutes() / 10) * 10}`;
const key = `weather_${pad(now.getMonth() + 1)}${pad(now.getDate())}${pad(now.getHours())}${pad(Math.floor(now.getMinutes() / 10) * 10)}`;
const cached = localStorage.getItem(key);
if (cached) {