Commit 493f8d57 authored by 18224442217's avatar 18224442217

no message

parent 679b0bbb
...@@ -426,17 +426,24 @@ ...@@ -426,17 +426,24 @@
let NewFlightList2 = [] let NewFlightList2 = []
for(let i=0;i<this.DetailsList.length;i++){ for(let i=0;i<this.DetailsList.length;i++){
if(this.DetailsList.length-1!=i){ if(this.DetailsList.length-1!=i&&this.DetailsList[i].FlightSubType!=3){
FlightList.push(this.DetailsList[i]) FlightList.push(this.DetailsList[i])
if(this.DetailsList.length-2==i||i==0){
NewFlightList.push(this.DetailsList[i])
}
}else{ }else{
FlightList2.push(this.DetailsList[i]) FlightList2.push(this.DetailsList[i])
NewFlightList2.push(this.DetailsList[i]) NewFlightList2.push(this.DetailsList[i])
} }
} }
if(FlightList.length==this.DetailsList.length-1){
for(let i=0;i<FlightList2.length;i++){
let DetailsList = JSON.parse(JSON.stringify(this.DetailsList))
DetailsList.forEach((x,index)=>{
if(x.Arrival_time&&FlightList2[i].Arrival_time){
DetailsList.slice(0,index)
}
})
}
NewFlightList = [FlightList[0],FlightList[FlightList.length-1]]
if(FlightList.length>0){
let obj = { let obj = {
FlightList: FlightList, FlightList: FlightList,
NewFlightList: NewFlightList, NewFlightList: NewFlightList,
...@@ -445,7 +452,7 @@ ...@@ -445,7 +452,7 @@
this.NewDetailsList.push(obj) this.NewDetailsList.push(obj)
} }
if(FlightList2.length==1){ if(FlightList2.length>0){
let obj = { let obj = {
FlightList: FlightList2, FlightList: FlightList2,
NewFlightList: NewFlightList2, NewFlightList: NewFlightList2,
......
...@@ -110,6 +110,7 @@ ...@@ -110,6 +110,7 @@
x.week = '' x.week = ''
x.duration = '' x.duration = ''
x.frequency = 0 x.frequency = 0
x.frequencyA = 0
x.different = 0 //是否异地 x.different = 0 //是否异地
x.NewFlightList = [] x.NewFlightList = []
x.loading = false x.loading = false
...@@ -120,22 +121,34 @@ ...@@ -120,22 +121,34 @@
arr(x.flightList) arr(x.flightList)
}) })
res.data.pageData.forEach(x=>{ res.data.pageData.forEach(x=>{
if(x.flightList.length>2){ if(x.flightList.length>2){
x.different = 1 x.different = 1
} }
x.frequency = 0
x.frequencyA = 0
x.flightList.forEach((y,index)=>{ x.flightList.forEach((y,index)=>{
if(y.flightSubType!=3&&x.flightList.length>2){
x.frequency+=1
}if(y.flightSubType==3){
x.frequencyA+=1
}
let date = y.flightDate.split('-') let date = y.flightDate.split('-')
y.time = `${date[1]}-${date[2]}` y.time = `${date[1]}-${date[2]}`
y.week = getDateWeek(y.flightDate) y.week = getDateWeek(y.flightDate)
y.frequency = x.flightList.length-2>1?x.flightList.length-2:0
if(index==0){ if(index==0){
console.log(x.frequency-1,'-----frequency')
y.frequency = x.frequency
y.duration = `${x.departureTime.days>0?x.departureTime.days+'d ':''}${x.departureTime.hours>0?x.departureTime.hours+'h ':''}${x.departureTime.minutes>0?x.departureTime.minutes+'m ':''}` y.duration = `${x.departureTime.days>0?x.departureTime.days+'d ':''}${x.departureTime.hours>0?x.departureTime.hours+'h ':''}${x.departureTime.minutes>0?x.departureTime.minutes+'m ':''}`
x.NewFlightList.push(y) x.NewFlightList.push(y)
} }
if(x.flightList.length-1==index){ if(x.flightList.length-1==index){
console.log(x.frequencyA-1,'-----frequencyA')
y.frequency = x.frequencyA-1
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 ':''}` 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) x.NewFlightList.push(y)
} }
// x.NewFlightList[0].frequency = y.frequency
}) })
}) })
if (this.msg.pageIndex === 1) { if (this.msg.pageIndex === 1) {
......
...@@ -12,14 +12,16 @@ ...@@ -12,14 +12,16 @@
<view>{{NewDetailsList[0].DepartureName}}</view> <view>{{NewDetailsList[0].DepartureName}}</view>
<img class="inlineblock ML50 MR50" mode="widthFix" style="width: 79rpx;height: 38rpx" <img class="inlineblock ML50 MR50" mode="widthFix" style="width: 79rpx;height: 38rpx"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1696990221000_663.png"/> src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1696990221000_663.png"/>
<view>{{NewDetailsList[0].FlightList[NewDetailsList[0].FlightList.length-1].ArrivalCityName}}</view> <view>
{{NewDetailsList[0].FlightList[NewDetailsList[0].FlightList.length-1].ArrivalCityName}}
</view>
</view> </view>
<AirTicketDetails v-if="NewDetailsList.length>0" :DetailsList="NewDetailsList"></AirTicketDetails> <AirTicketDetails v-if="NewDetailsList.length>0" :DetailsList="NewDetailsList"></AirTicketDetails>
<template v-if="orderMsg.Unit_Price>0&&B2BSellNum>0"> <template v-if="orderMsg.Unit_Price>0&&B2BSellNum>0">
<view class="PX50 MT20 MB30 row-aic-n"> <view class="PX50 MT20 MB30 row-aic-n">
<img class="inlineblock MR10" mode="widthFix" style="width: 167rpx;height: 31rpx" <img class="inlineblock MR10" mode="widthFix" style="width: 167rpx;height: 31rpx"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1697021959000_719.png"/> src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1697021959000_719.png"/>
<view class="fz26 color1D1D20 ML31"> <view class="fz26 color1D1D20 ML31" v-if="orderMsg.ManNum>0||orderMsg.BabyNum>0||orderMsg.ChirdNum>0">
<text>已选: <text>已选:
<!-- {{orderMsg.GuestNum}} <text class="fz22"></text> --> <!-- {{orderMsg.GuestNum}} <text class="fz22"></text> -->
</text> </text>
...@@ -458,7 +460,7 @@ ...@@ -458,7 +460,7 @@
y.time = `${date[1]}-${date[2]}` y.time = `${date[1]}-${date[2]}`
y.week = getDateWeek(y.FlightDate) 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.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 // y.frequency = this.DetailsList.length-2>1?this.DetailsList.length-2:0
}) })
let FlightList = [] let FlightList = []
let NewFlightList = [] let NewFlightList = []
...@@ -466,17 +468,15 @@ ...@@ -466,17 +468,15 @@
let NewFlightList2 = [] let NewFlightList2 = []
for(let i=0;i<this.DetailsList.length;i++){ for(let i=0;i<this.DetailsList.length;i++){
if(this.DetailsList.length-1!=i){ if(this.DetailsList[i].FlightSubType!=3){
FlightList.push(this.DetailsList[i]) FlightList.push(this.DetailsList[i])
if(this.DetailsList.length-2==i||i==0){
NewFlightList.push(this.DetailsList[i])
}
}else{ }else{
FlightList2.push(this.DetailsList[i]) FlightList2.push(this.DetailsList[i])
NewFlightList2.push(this.DetailsList[i]) NewFlightList2.push(this.DetailsList[i])
} }
} }
if(FlightList.length==this.DetailsList.length-1){ NewFlightList = [FlightList[0],FlightList[FlightList.length-1]]
if(FlightList.length>0){
let obj = { let obj = {
FlightList: FlightList, FlightList: FlightList,
NewFlightList: NewFlightList, NewFlightList: NewFlightList,
...@@ -485,7 +485,7 @@ ...@@ -485,7 +485,7 @@
this.NewDetailsList.push(obj) this.NewDetailsList.push(obj)
} }
if(FlightList2.length==1){ if(FlightList2.length>0){
let obj = { let obj = {
FlightList: FlightList2, FlightList: FlightList2,
NewFlightList: NewFlightList2, NewFlightList: NewFlightList2,
......
...@@ -278,6 +278,7 @@ ...@@ -278,6 +278,7 @@
let arr = function(list){ let arr = function(list){
list.forEach(x=>{ list.forEach(x=>{
x.Price = 0 x.Price = 0
x.frequency = 0
}) })
} }
arr(this.dataList) arr(this.dataList)
...@@ -289,19 +290,36 @@ ...@@ -289,19 +290,36 @@
y.FlightList.forEach(z=>{ y.FlightList.forEach(z=>{
let obj = { 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 ':''}`, 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 ...z
} }
y.NewFlightList.push(obj) y.NewFlightList.push(obj)
}) })
}else if(y.FlightList.length>2){ }else if(y.FlightList.length>2){
y.frequency = 0
let FlightDates = y.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=>{
if(z.FlightType!=3){
y.frequency+=1
}
})
let obj = { 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 ':''}`, 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.FlightList.length-2>1?y.FlightList.length-2:0, frequency: y.frequency-1,
FlightType: y.FlightList[1].FlightType, FlightType: y.FlightList[1].FlightType,
Days: Array.from(Days).length>1?Array.from(Days).length:1,
...y.FlightList[0] ...y.FlightList[0]
} }
let obj2 = { 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 ':''}`, 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,
...y.FlightList[y.FlightList.length-1] ...y.FlightList[y.FlightList.length-1]
} }
y.NewFlightList.push(obj) y.NewFlightList.push(obj)
...@@ -317,9 +335,6 @@ ...@@ -317,9 +335,6 @@
}); });
this.NewDataList = JSON.parse(JSON.stringify(this.dataList)) this.NewDataList = JSON.parse(JSON.stringify(this.dataList))
this.StartDateObj = this.NewDateList.length>0&&this.NewDateList.length==1?this.NewDateList[0]:{} this.StartDateObj = this.NewDateList.length>0&&this.NewDateList.length==1?this.NewDateList[0]:{}
// this.NewDataList = this.dataList.filter(x=> {
// return x.FlightDate==this.NewDateList[0].times
// })
} }
uni.hideLoading() uni.hideLoading()
}); });
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<view class="row relative" v-for="(item,index) in items.NewFlightList" <view class="row relative" v-for="(item,index) in items.NewFlightList"
:class="[index==0?'MB50':'']"> :class="[index==0?'MB50':'']">
<text v-if="index==1" class="fz18 fontWeight400 colorFF5858 absolute airTicketDetailsCard-timeT"> <text v-if="index==1" class="fz18 fontWeight400 colorFF5858 absolute airTicketDetailsCard-timeT">
{{item.time}} 周{{item.week}} {{item.time}} 周{{item.week}}
</text> </text>
<view class="airTicketDetailsCard-timeL column flexS MR20 textRight"> <view class="airTicketDetailsCard-timeL column flexS MR20 textRight">
<view v-if="index==0" class="fz28 fontBold relative relativeFT10">{{item.Departure_time}} </view> <view v-if="index==0" class="fz28 fontBold relative relativeFT10">{{item.Departure_time}} </view>
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<view class="row-ajc-n"> <view class="row-ajc-n">
<view class="FlightDirection-zhuan z-index2 MB10"> <view class="FlightDirection-zhuan z-index2 MB10">
<text v-if="!childs.frequency" class="fz20 color9999A5">{{childs.duration}}</text> <text v-if="!childs.frequency" class="fz20 color9999A5">{{childs.duration}}</text>
<text v-else class="block bgECF1F4 fz21 nowrap"> <text v-if="childs.frequency" class="block bgECF1F4 fz21 nowrap">
<template v-if="childs.frequency>1">+{{childs.frequency}}</template> <template v-if="childs.frequency>1">+{{childs.frequency}}</template>
</text> </text>
</view> </view>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<view v-if="item.FlightList.length>2" class="aviationCard-wf absolute bg111 colorFFF fz20 z-index2">异地往返</view> <view v-if="item.FlightList.length>2" class="aviationCard-wf absolute bg111 colorFFF fz20 z-index2">异地往返</view>
<view class="column flexG"> <view class="column flexG">
<view <view
:class="[item.FlightList.length-1!=indexs?'MB30':'']" :class="[indexs?'':'MB10']"
v-for="(childs,indexs) in item.NewFlightList"> v-for="(childs,indexs) in item.NewFlightList">
<view class="row-sb-n MT25"> <view class="row-sb-n MT25">
<view class="flexS MR20"> <view class="flexS MR20">
...@@ -50,18 +50,20 @@ ...@@ -50,18 +50,20 @@
<text class="fz36 fontBold">{{childs.Arrival_time}} </text> <text class="fz36 fontBold">{{childs.Arrival_time}} </text>
<text class="fz22 MT5 width100 ellipsis1">{{childs.aName}}</text> <text class="fz22 MT5 width100 ellipsis1">{{childs.aName}}</text>
</view> </view>
<!-- <view class="FlightDirection-time absolute colorFF5858 fz20 nowrap"> <view class="FlightDirection-time absolute colorFF5858 fz20 nowrap">
<text>+</text> <text>+</text>
<text class="ML5">1</text> <text class="ML5">{{childs.Days}}</text>
<text class="ML5"></text> <text class="ML5"></text>
</view> --> </view>
</view> </view>
</view> </view>
<view class="row-w MT15"> <view class="row-w MT15">
<view class="aviationTitle row-aic-n"> <view class="aviationTitle row-aic-n">
<img class="inlineblock" mode="widthFix" style="width: 36rpx;height: 30rpx;" <view>
<img class="inlineblock flexS" mode="widthFix" style="width: 36rpx;height: 30rpx;"
:src="item.AirlineUrl"/> :src="item.AirlineUrl"/>
</view>
<text class="fz22 ML10 color9999A5">{{item.AirLineName}}</text> <text class="fz22 ML10 color9999A5">{{item.AirLineName}}</text>
</view> </view>
</view> </view>
......
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