|
@@ -220,21 +220,27 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
getWeatherForecast() {
|
|
|
- return this.$http.get(`/api/weatherForecast`).then((res) => {
|
|
|
- const area = []
|
|
|
- const dataArray = {
|
|
|
- temperature: [],
|
|
|
- Weather: [],
|
|
|
- }
|
|
|
- res.forEach((element) => {
|
|
|
- area.push(element.时间)
|
|
|
- dataArray.temperature.push(element.温度)
|
|
|
- dataArray.Weather.push(element.天气)
|
|
|
+ return this.$http
|
|
|
+ .get(`/api/weatherForecast`, {
|
|
|
+ params: {
|
|
|
+ adcode: `520600`,
|
|
|
+ },
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ const area = []
|
|
|
+ const dataArray = {
|
|
|
+ temperature: [],
|
|
|
+ Weather: [],
|
|
|
+ }
|
|
|
+ res.forEach((element) => {
|
|
|
+ area.push(element.时间)
|
|
|
+ dataArray.temperature.push(element.温度)
|
|
|
+ dataArray.Weather.push(element.天气)
|
|
|
+ })
|
|
|
+ this.Weatherarea = area
|
|
|
+ this.WeatherdataArray = dataArray
|
|
|
+ this.isWeather = true
|
|
|
})
|
|
|
- this.Weatherarea = area
|
|
|
- this.WeatherdataArray = dataArray
|
|
|
- this.isWeather = true
|
|
|
- })
|
|
|
},
|
|
|
getTransplantAreaInEachRegion() {
|
|
|
return this.$http.get(`/api/transplantAreaInEachRegion`).then((res) => {
|