Commit 7ad76f1e authored by 黄奎's avatar 黄奎

页面修改

parent 05542621
......@@ -157,6 +157,7 @@
if (JSON.stringify(oldJson) !== "{}" && oldJson) {
} else {
this.getTripData();
this.pageList.forEach(pItem => {
var newObj = this.getDetailsObj();
newObj.LineName = this.FeatureData.LineName;
......@@ -231,6 +232,32 @@
}
console.log("this.pageList", this.pageList);
},
//获取行程信息
getTripData() {
var cityArray = [];
if (this.FeatureData && this.FeatureData.DayList && this.FeatureData.DayList.length > 0) {
this.FeatureData.DayList.forEach(dItem => {
if (dItem.TrafficObj && dItem.TrafficObj.SubTraffic && dItem.TrafficObj.SubTraffic.length > 0) {
dItem.TrafficObj.SubTraffic.forEach(tItem => {
if (tItem.StartCityName && tItem.StartCityName != '' && !cityArray.includes(tItem
.StartCityName)) {
cityArray.push(tItem.StartCityName);
}
if (tItem.ArrivalCityName && tItem.ArrivalCityName != '' && !cityArray.includes(tItem
.ArrivalCityName)) {
cityArray.push(tItem.ArrivalCityName)
}
});
}
});
}
if(cityArray&&cityArray.length>0)
{
var num=cityArray.length/2;
console.log("num",num)
}
console.log("cityArray,", cityArray);
}
},
computed: {
......
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