驾驶舱
This commit is contained in:
@@ -25,6 +25,7 @@ export default {
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
weatherInterval:null,
|
||||
isFullscreen: false,
|
||||
times: null,
|
||||
weather:'',
|
||||
@@ -43,6 +44,9 @@ export default {
|
||||
;this.getTimes()
|
||||
this.getWeather()
|
||||
},
|
||||
destroyed() {
|
||||
clearInterval(this.weatherInterval)
|
||||
},
|
||||
methods: {
|
||||
getTimes() {
|
||||
setInterval(this.getTimesInterval, 1000);
|
||||
@@ -84,7 +88,7 @@ export default {
|
||||
day
|
||||
},
|
||||
async getWeather() {
|
||||
setInterval(() => {
|
||||
this.weatherInterval = setInterval(() => {
|
||||
fetch(`https://restapi.amap.com/v3/weather/weatherInfo?key=a20a2093715deb9bd68e423c34a2ac3c&city=110108`, {
|
||||
method: 'get',
|
||||
extensions: 'base',
|
||||
|
||||
Reference in New Issue
Block a user