Commit d62c3548 authored by xxx's avatar xxx

1

parent b12c8355
...@@ -464,10 +464,10 @@ export default { ...@@ -464,10 +464,10 @@ export default {
weatherData:{ weatherData:{
forecastData:[], forecastData:[],
today:{ today:{
high:'高温 20℃', high:'高温 10℃',
low:'高温 20℃', low:'高温 10℃',
type:'多云', type:'多云',
fengli:'<![CDATA[3级]]>', fengli:'<![CDATA[0级]]>',
}, },
}, },
//车辆工时 //车辆工时
...@@ -686,7 +686,7 @@ export default { ...@@ -686,7 +686,7 @@ export default {
}) })
//获取天气 //获取天气
HttpReq.truckDispatching.getWeatherInforQuery({cityName:'济南'}).then((res) => { HttpReq.truckDispatching.getWeatherInforQuery({cityName:'济南'}).then((res) => {
if(res.code == 200){ if(res.code == 200 && res.msg){
let data1 = JSON.parse(res.msg).data.forecast; let data1 = JSON.parse(res.msg).data.forecast;
this.weatherData.forecastData = data1; this.weatherData.forecastData = data1;
this.weatherData.today = data1[0]; this.weatherData.today = data1[0];
...@@ -908,7 +908,7 @@ export default { ...@@ -908,7 +908,7 @@ export default {
}) })
//获取天气 //获取天气
HttpReq.truckDispatching.getWeatherInforQuery({cityName:'济南'}).then((res) => { HttpReq.truckDispatching.getWeatherInforQuery({cityName:'济南'}).then((res) => {
if(res.code == 200){ if(res.code == 200 && res.msg){
let data1 = JSON.parse(res.msg).data.forecast; let data1 = JSON.parse(res.msg).data.forecast;
this.weatherData.forecastData = data1; this.weatherData.forecastData = data1;
this.weatherData.today = data1[0]; this.weatherData.today = data1[0];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment