|
@ -267,7 +267,7 @@ function getWeatherData() { |
|
|
//获取天气 |
|
|
//获取天气 |
|
|
getWeather().then((res: any) => { |
|
|
getWeather().then((res: any) => { |
|
|
if (res.code === 200) { |
|
|
if (res.code === 200) { |
|
|
if (isCurrentRoute) { |
|
|
if (isCurrentRoute.value) { |
|
|
timer.value = setTimeout(async () => { |
|
|
timer.value = setTimeout(async () => { |
|
|
await (timer.value && clearTimeout(timer.value)); |
|
|
await (timer.value && clearTimeout(timer.value)); |
|
|
await getWeatherData(); |
|
|
await getWeatherData(); |
|
|