|
@@ -291,7 +291,7 @@ export default defineComponent({
|
|
|
this.time1 = setInterval(() => {
|
|
|
this.getWeatherInfo()
|
|
|
}, 300000)
|
|
|
- this.time12 = setInterval(() => {
|
|
|
+ this.time2 = setInterval(() => {
|
|
|
this.getSpaceInfo()
|
|
|
}, 300000)
|
|
|
},
|
|
@@ -306,17 +306,24 @@ export default defineComponent({
|
|
|
proxyData.dateObj.hours = nowTime.split(':')[0]
|
|
|
proxyData.dateObj.minute = nowTime.split(':')[1]
|
|
|
},
|
|
|
- dateTime: null,
|
|
|
+ dateTimer: null,
|
|
|
+ getNowDateTimer() {
|
|
|
+ proxyData.dateTimer = setInterval(() => {
|
|
|
+ proxyData.getNowDate()
|
|
|
+ }, 1000)
|
|
|
+ },
|
|
|
})
|
|
|
onBeforeUnmount(() => {
|
|
|
- clearInterval(this.time1)
|
|
|
- clearInterval(this.time1)
|
|
|
+ clearInterval(proxyData.time1)
|
|
|
+ clearInterval(proxyData.time2)
|
|
|
+ clearInterval(proxyData.dateTimer)
|
|
|
})
|
|
|
onMounted(() => {
|
|
|
proxyData.getWeatherInfo()
|
|
|
proxyData.getSpaceInfo()
|
|
|
proxyData.timeInit()
|
|
|
proxyData.getNowDate()
|
|
|
+ proxyData.getNowDateTimer()
|
|
|
})
|
|
|
return {
|
|
|
...toRefs(proxyData),
|