Commit b337277c authored by 18224442217's avatar 18224442217

no message

parent b6070a93
......@@ -125,9 +125,17 @@
if(x.flightList.length>2){
x.different = 1
}
x.frequency = 0
x.frequencyA = 0
let FlightList = x.flightList.filter(z=>{
return z.flightSubType!=3
})
let FlightList2 = x.flightList.filter(z=>{
return z.flightSubType==3
})
x.frequency = FlightList.length-1
x.frequencyA = FlightList2.length-1
x.flightList.forEach((y,index)=>{
if(y.flightSubType!=3&&x.flightList.length>2){
x.frequency+=1
}
......@@ -143,7 +151,7 @@
x.NewFlightList.push(y)
}
if(x.flightList.length-1==index){
y.frequency = x.frequencyA-1
y.frequency = x.frequencyA
y.duration = `${x.arrivalTime.days>0?x.arrivalTime.days+'d ':''}${x.arrivalTime.hours>0?x.arrivalTime.hours+'h ':''}${x.arrivalTime.minutes>0?x.arrivalTime.minutes+'m ':''}`
x.NewFlightList.push(y)
}
......
......@@ -321,30 +321,40 @@
}else if(y.FlightList.length>2){
y.frequency = 0
y.frequencyA = 0
let FlightDates = y.FlightList.map(z=>{ return z.FlightDate})
let FlightList = y.FlightList.filter(z=>{
return z.FlightSubType!=3
})
let FlightDates = FlightList.map(z=>{ return z.FlightDate})
let NewFlightDates = []
let Days = []
if(FlightDates&&FlightDates.length>1){
NewFlightDates = FlightDates.slice(0,FlightDates.length-1)
Days = new Set(NewFlightDates)
}
y.FlightList.forEach((z,i)=>{
if(z.FlightType!=3&&y.FlightList.length>2&&i){
y.frequency+=1
}if(z.FlightType==3){
y.frequencyA+=1
}
let FlightList2 = y.FlightList.filter(z=>{
return z.FlightSubType==3
})
let FlightDates2 = FlightList2.map(z=>{ return z.FlightDate})
let NewFlightDates2 = []
let Days2 = []
if(FlightDates2&&FlightDates2.length>1){
NewFlightDates2 = FlightDates2.slice(0,FlightDates2.length-1)
Days2 = new Set(NewFlightDates2)
}
y.frequency = FlightList.length-1
y.frequencyA = FlightList2.length-1
let obj = {
duration:`${y.DepartureTime.Days>0?y.DepartureTime.Days+'d ':''}${y.DepartureTime.Hours>0?y.DepartureTime.Hours+'h ':''}${y.DepartureTime.Minutes>0?y.DepartureTime.Minutes+'m ':''}`,
frequency: y.frequency-1,
FlightType: y.FlightList[1].FlightType,
frequency: y.frequency,
Days: Array.from(Days).length>1?Array.from(Days).length:1,
...y.FlightList[0]
}
let obj2 = {
duration:`${y.ArrivalTime.Days>0?y.ArrivalTime.Days+'d ':''}${y.ArrivalTime.Hours>0?y.ArrivalTime.Hours+'h ':''}${y.ArrivalTime.Minutes>0?y.ArrivalTime.Minutes+'m ':''}`,
Days: 1,
Days: Array.from(Days2).length>1?Array.from(Days2).length:1,
frequency: y.frequencyA,
...y.FlightList[y.FlightList.length-1]
}
......
......@@ -25,7 +25,6 @@
<view class="row-ajc-n">
<text class="fz20 color9999A5">{{childs.duration}}</text>
<view class="FlightDirection-zhuan z-index2 ML10" v-if="childs.frequency">
<!-- childs.FlightType==2 -->
<text class="block bgECF1F4 fz21 nowrap">
<template v-if="childs.frequency>1">+{{childs.frequency}}</template>
</text>
......
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