Commit ca5bd923 authored by 18224442217's avatar 18224442217

no message

parent 47defa81
......@@ -460,9 +460,12 @@
}
this.NewDetailsList.push(obj)
}
this.NewDetailsList.forEach(x=>{
if(x.FlightList.length>1){
x.show = false
this.NewDetailsList.forEach((y,index)=>{
if(y.FlightList.length>1){
y.show = false
}
if(index){
y.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 ':''}`
}
})
}
......
......@@ -455,12 +455,15 @@
}
arr(res.data.FlightList)
this.DetailsList = res.data.FlightList
this.DetailsList.forEach(y=>{
this.DetailsList.forEach((y,index)=>{
let date = y.FlightDate.split('-')
y.time = `${date[1]}-${date[2]}`
y.week = getDateWeek(y.FlightDate)
y.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 ':''}`
// y.frequency = this.DetailsList.length-2>1?this.DetailsList.length-2:0
if(index){
y.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 ':''}`
}else{
y.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 ':''}`
}
})
let FlightList = []
let NewFlightList = []
......
......@@ -288,12 +288,20 @@
y.Price = this.isToken?y.B2BPrice:y.B2CPrice
y.NewFlightList = []
if(y.FlightList.length>0&&y.FlightList.length<3){
y.FlightList.forEach(z=>{
let obj = {
y.FlightList.forEach((z,index)=>{
let obj = {}
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 ':''}`,
Days: 1,
...z
}
if(index){
obj = {
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,
...z
}
}
y.NewFlightList.push(obj)
})
}else if(y.FlightList.length>2){
......
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