Commit 25cd54a4 authored by 18224442217's avatar 18224442217

支付已调通

parent 23b75f00
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<view class="AirplanePassengerAddEditingC"> <view class="AirplanePassengerAddEditingC">
<view class="column"> <view class="column">
<view class="AirplanePassengerAddEditingC-text row-sb-n fz30"> <view class="AirplanePassengerAddEditingC-text row-sb-n fz30">
<text class="flexS AirplanePassengerAddEditingC-textL">姓名</text> <text class="flexS AirplanePassengerAddEditingC-textL">姓名(英文)</text>
<input class="flexG fontBold" type="text" placeholder="文姓名,请于乘机证件相同" <input class="flexG fontBold" type="text" placeholder="文姓名,请于乘机证件相同"
v-model="text"/> v-model="addMsg.SurName"/>
</view> </view>
<view class="height-line1"></view> <view class="height-line1"></view>
</view> </view>
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
<view class="AirplanePassengerAddEditingC-text row-sb-n fz30"> <view class="AirplanePassengerAddEditingC-text row-sb-n fz30">
<text class="flexS AirplanePassengerAddEditingC-textL">证件</text> <text class="flexS AirplanePassengerAddEditingC-textL">证件</text>
<view class="flexG row-aic-n"> <view class="flexG row-aic-n">
<view v-for="(item,index) in certificateList" class="AirplanePassengerAddEditingC-choose MR30"> <view v-for="(item,index) in certificateList" class="AirplanePassengerAddEditingC-choose MR30"
<!-- circle --> @click="getType(item,1)">
<uni-icons color="#DEBF7B" type="checkbox-filled" size="18"></uni-icons> <uni-icons color="#DEBF7B" :type="addMsg.GuestType==item.Id?'checkbox-filled':'circle'" size="18"></uni-icons>
<text class="ML20 fz30 fontBold">{{item.Name}}</text> <text class="ML20 fz30 fontBold">{{item.Name}}</text>
</view> </view>
</view> </view>
...@@ -25,16 +25,35 @@ ...@@ -25,16 +25,35 @@
<view class="column"> <view class="column">
<view class="AirplanePassengerAddEditingC-text row-sb-n fz30"> <view class="AirplanePassengerAddEditingC-text row-sb-n fz30">
<text class="flexS AirplanePassengerAddEditingC-textL">证件号</text> <text class="flexS AirplanePassengerAddEditingC-textL">证件号</text>
<input class="flexG fontBold" type="text" placeholder="请输入身份证号码" <input v-if="addMsg.GuestType==1" class="flexG fontBold" type="text" placeholder="请输入身份证号码"
v-model="text"/> v-model="addMsg.IdCard" @blur="setBirthday"/>
<input v-if="addMsg.GuestType==2" class="flexG fontBold" type="text" placeholder="请输入护照号码"
v-model="addMsg.PassportNo" @blur="setBirthday"/>
</view>
<view class="height-line1"></view>
</view>
<view class="column">
<view class="AirplanePassengerAddEditingC-text row-sb-n fz30">
<text class="flexS AirplanePassengerAddEditingC-textL">成人/婴儿</text>
<view class="flexG row-aic-n">
<view v-for="(item,index) in GuestTypeList" class="AirplanePassengerAddEditingC-choose MR30"
@click="getType(item,2)">
<uni-icons color="#DEBF7B" :type="addMsg.GuestNum==item.Id?'checkbox-filled':'circle'" size="18"></uni-icons>
<text class="ML20 fz30 fontBold">{{item.Name}}</text>
</view>
</view>
</view> </view>
<view class="height-line1"></view> <view class="height-line1"></view>
</view> </view>
</view> </view>
<view class="AirplanePassengerList-footer fixedFooter bgFFF fixed z-index2"> <view class="AirplanePassengerList-footer fixedFooter bgFFF fixed z-index2">
<view class="AirplanePassengerList-buttom bgDEBF7B fz32 fontBold textCenter" <view v-if="addMsg.SurName&&(addMsg.PassportNo||addMsg.IdCard)"
class="AirplanePassengerList-buttom bgDEBF7B fz32 fontBold textCenter"
@click="showAddEditingPreviwe=true"> @click="showAddEditingPreviwe=true">
确认添加 确认{{editorIndex||editorIndex==0?'编辑':'添加'}}
</view>
<view v-else class="AirplanePassengerList-buttom bgF5 fz32 fontBold textCenter">
确认{{editorIndex||editorIndex==0?'编辑':'添加'}}
</view> </view>
</view> </view>
<u-popup <u-popup
...@@ -52,26 +71,28 @@ ...@@ -52,26 +71,28 @@
<view class="showAddEditing-Details bgF5 MT15"> <view class="showAddEditing-Details bgF5 MT15">
<view class="row-aic-n"> <view class="row-aic-n">
<text class="fz26 flexS">姓名</text> <text class="fz26 flexS">姓名</text>
<text class="fz30 fontBold colorFF5858 flexG">王俊苏</text> <text class="fz30 fontBold colorFF5858 flexG">{{addMsg.SurName}}</text>
</view> </view>
<view class="row-aic-n"> <view class="row-aic-n">
<text class="fz26 flexS">证件号</text> <text class="fz26 flexS">证件号</text>
<text class="fz30 fontBold colorFF5858 flexG">212114555698544</text> <text class="fz30 fontBold colorFF5858 flexG">{{addMsg.GuestType==1?addMsg.IdCard:addMsg.PassportNo}}</text>
</view> </view>
<view class="row-aic-n"> <view class="row-aic-n" v-if="addMsg.result">
<text class="fz26 flexS">出生日期</text> <text class="fz26 flexS">出生日期</text>
<text class="fz30 fontBold flexG">2017-01-25</text> <text class="fz30 fontBold flexG">{{addMsg.result.birthday}}</text>
</view> </view>
</view> </view>
<view class="showAddEditing-buttom fz32 fontBold textCenter row-sb-n"> <view class="showAddEditing-buttom fz32 fontBold textCenter row-sb-n">
<view class="border1 colorDEBF7B borderDEBF7B" @click="showAddEditingPreviwe=false">返回修改</view> <view class="border1 colorDEBF7B borderDEBF7B" @click="showAddEditingPreviwe=false">返回修改</view>
<view class="border1 borderDEBF7B" @click="submit">确认添加</view> <view v-if="!loading" class="border1 borderDEBF7B" @click="submit">确认{{editorIndex||editorIndex==0?'编辑':'添加'}}</view>
<view v-else class="border1 bgF5">确认{{editorIndex||editorIndex==0?'编辑':'添加'}}</view>
</view> </view>
</view> </view>
</u-popup> </u-popup>
</view> </view>
</template> </template>
<script> <script>
import { parseIDCard } from "./dates.js";
export default { export default {
components: { components: {
...@@ -83,23 +104,75 @@ ...@@ -83,23 +104,75 @@
{Name:'身份证',Id:1}, {Name:'身份证',Id:1},
{Name:'护照',Id:2}, {Name:'护照',Id:2},
], ],
GuestTypeList:[
{Name:'成人',Id:1},
{Name:'婴儿',Id:2},
],
text:'', text:'',
showAddEditingPreviwe: false showAddEditingPreviwe: false,
addMsg: {
SurName:'',PassportNo:'',IdCard:'',MobilePhone:'',
result:null,show: false,GuestType:1,GuestNum: 1,Id:0
},
GuestList: [],
editorIndex: null
} }
}, },
onLoad(options){ onLoad(options){
this.editorIndex = options.editorIndex||options.editorIndex==0?options.editorIndex:null
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: options.item?'编辑乘机人':'新增乘机人' title: options.editorIndex||options.editorIndex==0?'编辑乘机人':'新增乘机人'
}) })
}, },
onBackPress(options){
console.log(options,'-----navigateBack')
},
created() {}, created() {},
mounted() {
let GuestList = uni.getStorageSync("GuestList")
this.GuestList = GuestList?GuestList:[]
if(this.editorIndex||this.editorIndex==0){
this.addMsg = this.GuestList[this.editorIndex]
}
},
watch: {
addMsg:{
handler(newVal, oldval) {
}
}
},
methods: { methods: {
submit(){ submit(){
// uni.showLoading({ this.addMsg.Id = Math.floor(Math.random()*(100-1)+1)
// title: "", if(!this.editorIndex){
// }); this.GuestList.push(this.addMsg)
// uni.hideLoading(); }
if(this.GuestList.length>0){
uni.setStorageSync("GuestList",this.GuestList)
}
setTimeout(()=>{
uni.navigateBack({
delta: -1
})
},200)
}, },
setBirthday(){
if(this.addMsg.GuestType==1){
this.addMsg.result = parseIDCard(this.addMsg.IdCard)
}
},
getType(item,type){
if(type==1){
if(this.addMsg.GuestType!=item.Id){
this.addMsg.IdCard = ''
this.addMsg.PassportNo = ''
}
this.addMsg.GuestType = item.Id
}else{
this.addMsg.GuestNum = item.Id
}
}
} }
} }
</script> </script>
......
This diff is collapsed.
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<img class="inlineblock MR10" mode="widthFix" style="width: 18rpx;height: 22rpx" <img class="inlineblock MR10" mode="widthFix" style="width: 18rpx;height: 22rpx"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1696743247000_254.png"/> src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1696743247000_254.png"/>
<text class="StartStopAddressText fz30 fontBold" <text class="StartStopAddressText fz30 fontBold"
:class="[!OriginAddress.DepartCityName?'color9999A5':'']"> :class="[!OriginAddress.ArriveCityName?'color9999A5':'']">
{{OriginAddress.ArriveCityName?OriginAddress.ArriveCityName:'选择目的地'}} {{OriginAddress.ArriveCityName?OriginAddress.ArriveCityName:'选择目的地'}}
</text> </text>
</view> </view>
...@@ -40,7 +40,8 @@ ...@@ -40,7 +40,8 @@
</view> </view>
<view class="DepartureTime column"> <view class="DepartureTime column">
<text class="fz24 color9999A6">出发时间</text> <text class="fz24 color9999A6">出发时间</text>
<text class="fz30 fontBold MT31 MB20"> <text class="fz30 fontBold MT31 MB20"
:class="[StartDateObj.math?'':'color9999A5']">
<template v-if="StartDateObj.math"> <template v-if="StartDateObj.math">
{{StartDateObj.math}}{{StartDateObj.date}}日(周{{StartDateObj.week}}) {{StartDateObj.math}}{{StartDateObj.date}}日(周{{StartDateObj.week}})
</template> </template>
...@@ -52,8 +53,9 @@ ...@@ -52,8 +53,9 @@
<view class="DepartureTimeList row-sb-n"> <view class="DepartureTimeList row-sb-n">
<view style="width: 590rpx;overflow: hidden;"> <view style="width: 590rpx;overflow: hidden;">
<scroll-view scroll-x style="width:100%;white-space: nowrap;"> <scroll-view scroll-x style="width:100%;white-space: nowrap;">
<view class="row-aic-n"> <view
<template v-for="(item,index) in NewDateList"> :class="[NewDateList&&NewDateList.length>0?'row-aic-n':'row-w']">
<template v-if="NewDateList&&NewDateList.length>0" v-for="(item,index) in NewDateList">
<view class="DepartureTimeListC flexS column-ajc fz20" <view class="DepartureTimeListC flexS column-ajc fz20"
:class="[StartDateObj.times==item.times?'bgE1C278':'active']" :class="[StartDateObj.times==item.times?'bgE1C278':'active']"
@click="clickSearch(item,1)"> @click="clickSearch(item,1)">
...@@ -65,6 +67,13 @@ ...@@ -65,6 +67,13 @@
</text> </text>
</view> </view>
</template> </template>
<view v-if="NewDateList.length==0" class="DepartureTimeListC flexS column-ajc fz20" style="width: 100%;">
<text></text>
<text class="MT10 MB10"></text>
<text class="fz26 color9999A5">
无可选日期
</text>
</view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
...@@ -200,9 +209,9 @@ ...@@ -200,9 +209,9 @@
onLoad(options){ onLoad(options){
if(options.data){ if(options.data){
let obj = JSON.parse(options.data) let obj = JSON.parse(options.data)
this.OriginAddress.DepartCityName = obj.DepartCityName, // this.OriginAddress.DepartCityName = obj.DepartCityName,
this.msg.DepartCityId = this.OriginAddress.DepartCityId = obj.DepartCityId, this.msg.DepartCityId = this.OriginAddress.DepartCityId = obj.DepartCityId,
this.OriginAddress.ArriveCityName = obj.ArriveCityName, // this.OriginAddress.ArriveCityName = obj.ArriveCityName,
this.msg.ArriveCityId = this.OriginAddress.DepartCityId = obj.ArriveCityId this.msg.ArriveCityId = this.OriginAddress.DepartCityId = obj.ArriveCityId
} }
this.U = uni.getStorageSync("mall_UserInfo") this.U = uni.getStorageSync("mall_UserInfo")
...@@ -234,7 +243,6 @@ ...@@ -234,7 +243,6 @@
this.msg.DepartCityId = this.OriginAddress.DepartCityId this.msg.DepartCityId = this.OriginAddress.DepartCityId
this.msg.ArriveCityId = this.OriginAddress.ArriveCityId this.msg.ArriveCityId = this.OriginAddress.ArriveCityId
} }
}, },
RenewalAddres(SelectObj,AddressType){ RenewalAddres(SelectObj,AddressType){
if(AddressType==1){ if(AddressType==1){
...@@ -245,6 +253,7 @@ ...@@ -245,6 +253,7 @@
this.msg.ArriveCityId = this.OriginAddress.ArriveCityId = SelectObj.ID this.msg.ArriveCityId = this.OriginAddress.ArriveCityId = SelectObj.ID
} }
this.showAddressPreviwe = false this.showAddressPreviwe = false
this.getDataList()
}, },
//滚动加载 //滚动加载
lower(e) { lower(e) {
...@@ -264,8 +273,15 @@ ...@@ -264,8 +273,15 @@
// this.pageCount = res.data.pageCount // this.pageCount = res.data.pageCount
this.NewDateList = [] this.NewDateList = []
this.dataList = res.data this.dataList = res.data
let arr = function(list){
list.forEach(x=>{
x.Price = 0
})
}
arr(this.dataList)
this.dateList.forEach(x => { this.dateList.forEach(x => {
this.dataList.forEach(y=>{ this.dataList.forEach(y=>{
y.Price = this.isToken?y.B2BPrice:y.B2CPrice
y.NewFlightList = [] y.NewFlightList = []
if(y.FlightList.length>0&&y.FlightList.length<3){ if(y.FlightList.length>0&&y.FlightList.length<3){
y.FlightList.forEach(z=>{ y.FlightList.forEach(z=>{
...@@ -297,10 +313,11 @@ ...@@ -297,10 +313,11 @@
} }
}) })
}); });
this.StartDateObj = this.NewDateList[0] this.NewDataList = JSON.parse(JSON.stringify(this.dataList))
this.NewDataList = this.dataList.filter(x=> { // this.StartDateObj = this.NewDateList[0]
return x.FlightDate==this.NewDateList[0].times // this.NewDataList = this.dataList.filter(x=> {
}) // return x.FlightDate==this.NewDateList[0].times
// })
} }
uni.hideLoading() uni.hideLoading()
}); });
...@@ -326,16 +343,24 @@ ...@@ -326,16 +343,24 @@
}, },
clickSearch(item,type){ clickSearch(item,type){
if(type==1){ if(type==1){
uni.showLoading()
if(this.StartDateObj.times==item.times){ if(this.StartDateObj.times==item.times){
this.StartDateObj = {} this.StartDateObj = {}
this.NewDataList = JSON.parse(JSON.stringify(this.dataList)) this.NewDataList = JSON.parse(JSON.stringify(this.dataList))
setTimeout(()=>{
uni.hideLoading()
},500)
}else{ }else{
this.StartDateObj = item this.StartDateObj = item
this.msg.StartDate = item.times this.msg.StartDate = item.times
this.NewDataList = this.dataList.filter(x=> { this.NewDataList = this.dataList.filter(x=> {
return x.FlightDate==item.times return x.FlightDate==item.times
}) })
setTimeout(()=>{
uni.hideLoading()
},500)
} }
}else{ }else{
this.activeId = item this.activeId = item
} }
...@@ -355,6 +380,18 @@ ...@@ -355,6 +380,18 @@
if(res.resultCode==1){ if(res.resultCode==1){
this.DepartureCityList = res.data.DepartureCityList this.DepartureCityList = res.data.DepartureCityList
this.ArrivalCity = res.data.ArrivalCity this.ArrivalCity = res.data.ArrivalCity
if(this.msg.DepartCityId){
let DepartCityName = this.DepartureCityList.filter(x=>{
return x.ID==this.msg.DepartCityId
})
this.OriginAddress.DepartCityName = DepartCityName[0].Name
}
if(this.msg.ArriveCityId){
let ArriveCityName = this.ArrivalCity.filter(x=>{
return x.ID==this.msg.ArriveCityId
})
this.OriginAddress.ArriveCityName = ArriveCityName[0].Name
}
} }
}); });
}, },
......
...@@ -71,9 +71,16 @@ ...@@ -71,9 +71,16 @@
}, },
methods: { methods: {
getAddress(item){ getAddress(item){
this.SelectObj = { if(item.ID==this.SelectObj.ID){
Name: item.Name, this.SelectObj = {
ID: item.ID, Name: '',
ID: 0,
}
}else{
this.SelectObj = {
Name: item.Name,
ID: item.ID,
}
} }
this.$emit('RenewalAddres',this.SelectObj ,this.AddressType) this.$emit('RenewalAddres',this.SelectObj ,this.AddressType)
// this.$forceUpdate() // this.$forceUpdate()
......
...@@ -6,32 +6,33 @@ ...@@ -6,32 +6,33 @@
<view class="row-aic-n"> <view class="row-aic-n">
<view> <view>
<view class="airTicketDetailsCard-qfc bgE1C278 fz30 color111 fontBold"> <view class="airTicketDetailsCard-qfc bgE1C278 fz30 color111 fontBold">
去程 <template v-if="items.FlightSubType==1">去程</template>
<template v-if="items.FlightSubType==3">返程</template>
</view> </view>
</view> </view>
<view class="fz28 color111 ML20"> <view class="fz28 color111 ML20">
<text>09-30</text> <text class="ML10">周六</text> <text>{{items.time}}</text> <text class="ML10">周{{items.week}}</text>
</view> </view>
<view class="fz28 color111 ML31"> <view class="fz28 color111 ML31">
总时长 5h 总时长 {{items.duration}}
</view> </view>
</view> </view>
<view class="fz28 colorE1C278 row-aic-n" @click="TicketDetails(items)"> <view v-if="items.FlightList.length>1" class="fz28 colorE1C278 row-aic-n" @click="TicketDetails(items)">
<text>详情</text> <text>详情</text>
<uni-icons class="ML10" color="#DEBF7B" :type="items.show?'arrowdown':'arrowright'" size="14"></uni-icons> <uni-icons class="ML10" color="#DEBF7B" :type="items.show?'arrowdown':'arrowright'" size="14"></uni-icons>
<!-- <uni-icons class="ML10" color="#DEBF7B" type="arrowright" size="14"></uni-icons> --> <!-- <uni-icons class="ML10" color="#DEBF7B" type="arrowright" size="14"></uni-icons> -->
</view> </view>
</view> </view>
<view class="MT60 PX50" v-if="!items.show"> <view class="MT60 PX50" v-if="!items.show">
<view class="row relative" v-for="(item,index) in 2" <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">
10-01 周日 {{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">09:00 </view> <view v-if="index==0" class="fz28 fontBold relative relativeFT10">{{item.Departure_time}} </view>
<view v-if="index==1" class="MT25 fz28 fontBold"> <view v-if="items.NewFlightList.length-1==index" class="MT25 fz28 fontBold">
11:30 {{item.Arrival_time}}
</view> </view>
</view> </view>
<view class="flexS MR30"> <view class="flexS MR30">
...@@ -49,33 +50,38 @@ ...@@ -49,33 +50,38 @@
</view> </view>
</view> </view>
<view class="column flexG relative"> <view class="column flexG relative">
<view v-if="index==1" class="airTicketDetailsCard-ZhuanNum bgE1C278 fz18 colorFFF absolute">转+2</view> <view v-if="index!=0" class="airTicketDetailsCard-ZhuanNum bgE1C278 fz18 colorFFF absolute">
<template v-if="items.FlightList.length-1>1">+{{items.FlightList.length-1}}</template>
</view>
<view class="airTicketDetailsCard-title row-aic-n absolute" v-if="index==0"> <view class="airTicketDetailsCard-title row-aic-n absolute" v-if="index==0">
<img class="inlineblock flexS" mode="widthFix" style="width: 20rpx;height: 17rpx;" <img class="inlineblock flexS" mode="widthFix" style="width: 20rpx;height: 17rpx;"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1696749257000_469.png"/> :src="item.AlImage"/>
<view class="flexG"> <view class="flexG">
<text class="block width100One overflow fz20 ML5 color9999A5 fontWeight400">东航 CA1852 </text> <text class="block width100One overflow fz20 ML5 color9999A5 fontWeight400">{{item.AlName}} {{item.Flight_number}} </text>
</view> </view>
</view> </view>
<view class="fz28 fontBold relative relativeFT8" v-if="index==0"> <view class="fz28 fontBold relative relativeFT8" v-if="index==0">
<text class="block width100One hidden">CTU 双流机场 T2</text> <text class="block width100One hidden">{{item.DepartureName}} {{item.dName}}</text>
</view> </view>
<view class="fz28 fontBold MT25" v-if="index==1"> <view class="fz28 fontBold MT25" v-if="index==1">
<text class="block width100One hidden">PEK 首都机场 T3</text> <text class="block width100One hidden">{{item.ArrivalCityName}} {{item.aName}}</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="MT60 PX50" <template v-if="items.show">
:class="[index!=1?'MB50':'']" v-if="items.show"> <view class="MT60 PX50" v-for="(item,index) in items.FlightList"
<view class="row-aic-n MB70 relative" v-for="(item,index) in 3"> :class="[items.FlightList.length-1!=index?'MB50':'']">
<text v-if="index==2" class="fz18 fontWeight400 colorFF5858 absolute airTicketDetailsCard-timeT"> <view class="row-aic-n relative"
10-01 周日 :class="[items.FlightList.length-1!=index?'MB70':'']">
<text v-if="items.FlightList.length-1==index" class="fz18 fontWeight400 colorFF5858 absolute airTicketDetailsCard-timeT">
{{item.time}}{{item.week}}
</text> </text>
<view class="airTicketDetailsCard-timeL column flexS MR20 textRight"> <view class="airTicketDetailsCard-timeL column flexS MR20 textRight">
<view :class="[index?'fz24':'fz28 fontBold']">09:00 </view> <view :class="[index?'fz24':'fz28 fontBold']">{{item.Departure_time}} </view>
<view class="MT35" :class="[index!=2?'fz24':'fz28 fontBold']"> <view class="MT35" :class="[items.FlightList.length-1!=index?'fz24':'fz28 fontBold']">
11:30 {{item.Arrival_time}}
</view> </view>
</view> </view>
<view class="flexS MR30"> <view class="flexS MR30">
...@@ -86,35 +92,39 @@ ...@@ -86,35 +92,39 @@
<view class="bgE1C278 absolute WH6R50 airTicketDetailsCard-LinT3"></view> <view class="bgE1C278 absolute WH6R50 airTicketDetailsCard-LinT3"></view>
</template> </template>
<view class="bgE1C278 absolute WH12R50 airTicketDetailsCard-LinB"></view> <view class="bgE1C278 absolute WH12R50 airTicketDetailsCard-LinB"></view>
<template v-if="index!=2"> <template v-if="items.FlightList.length-1>index">
<view class="bgE1C278 absolute WH6R50 airTicketDetailsCard-LinB2"></view> <view class="bgE1C278 absolute WH6R50 airTicketDetailsCard-LinB2"></view>
<view class="bgE1C278 fz18 colorFFF absolute airTicketDetailsCard-LinText">中转</view> <view class="bgE1C278 fz18 colorFFF absolute airTicketDetailsCard-LinText">
中转
</view>
</template> </template>
</view> </view>
</view> </view>
<view class="column flexG relative"> <view class="column flexG relative">
<view class="airTicketDetailsCard-title row-aic-n absolute"> <view class="airTicketDetailsCard-title row-aic-n absolute">
<img class="inlineblock flexS" mode="widthFix" style="width: 20rpx;height: 17rpx;" <img class="inlineblock flexS" mode="widthFix" style="width: 20rpx;height: 17rpx;"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1696749257000_469.png"/> :src="item.AlImage"/>
<view class="flexG"> <view class="flexG">
<text class="block width100One overflow fz20 ML5 color9999A5 fontWeight400">东航 CA1852 </text> <text class="block width100One overflow fz20 ML5 color9999A5 fontWeight400">{{item.AlName}} {{item.Flight_number}}</text>
</view> </view>
</view> </view>
<view class="fz28 fontBold relative relativeFT8"> <view class="fz28 fontBold relative relativeFT8">
<text class="block width100One hidden">CTU 双流机场 T2</text> <text class="block width100One hidden">{{item.DepartureName}} {{item.dName}} </text>
</view> </view>
<view class="fz28 fontBold MT25"> <view class="fz28 fontBold MT25">
<text class="block width100One hidden">PEK 首都机场 T3</text> <text class="block width100One hidden">{{item.ArrivalCityName}} {{item.aName}} </text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
props:['DetailsList'],
components: { components: {
}, },
...@@ -132,6 +142,15 @@ ...@@ -132,6 +142,15 @@
}, },
onLoad(options){ onLoad(options){
},
watch: {
DetailsList:{
handler(newVal, oldval) {
this.dataList = JSON.parse(JSON.stringify(this.DetailsList))
},
deep: true,
immediate: true
}
}, },
created() {}, created() {},
methods: { methods: {
......
...@@ -75,11 +75,11 @@ ...@@ -75,11 +75,11 @@
<view class="FlightDirection-Price flexS column"> <view class="FlightDirection-Price flexS column">
<view class="colorC09D4F fontBold row-aic-n MT25"> <view class="colorC09D4F fontBold row-aic-n MT25">
<view class="FlightDirection-Price-symbol MR10"> <view class="FlightDirection-Price-symbol MR10">
<text class="fz20 relative" v-if="(isToken?item.B2BPrice:item.B2CPrice)>0">¥</text> <text class="fz20 relative" v-if="item.Price>0">¥</text>
</view> </view>
<text :class="[(isToken?item.B2BPrice:item.B2CPrice)>0?'fz36':'fz22 fontWeight400']"> <text :class="[item.Price>0?'fz36':'fz22 fontWeight400']">
<template v-if="(isToken?item.B2BPrice:item.B2CPrice)>0"> <template v-if="item.Price>0">
{{isToken?item.B2BPrice:item.B2CPrice}} {{item.Price}}
</template> </template>
<template v-else>暂无报价</template> <template v-else>暂无报价</template>
</text> </text>
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
<text class="FlightDirection-zhang border1 borde fz18" <text class="FlightDirection-zhang border1 borde fz18"
:class="[item.B2BSellNum>0?'borderFF5858 colorFF5858':'borderF5 color9999A5']"> :class="[item.B2BSellNum>0?'borderFF5858 colorFF5858':'borderF5 color9999A5']">
<template v-if="item.B2BSellNum>0">{{item.B2BSellNum}}</template> <template v-if="item.B2BSellNum>0">{{item.B2BSellNum}}</template>
<template v-if="(isToken?item.B2BPrice:item.B2CPrice)>0&&item.B2BSellNum==0">售罄</template> <template v-if="item.Price>0&&item.B2BSellNum==0">售罄</template>
</text> </text>
</view> </view>
</view> </view>
...@@ -109,10 +109,9 @@ ...@@ -109,10 +109,9 @@
}, },
created() {}, created() {},
methods: { methods: {
getPriceDetail(item){ getPriceDetail(item){
uni.navigateTo({ uni.navigateTo({
url: '/pages/airTicket/airTicketDetails' url: `/pages/airTicket/airTicketDetails?TCID=${item.TCID}&Price=${item.Price}`
}); });
}, },
} }
......
...@@ -168,4 +168,33 @@ export const formatDate = (date, fmt) => { ...@@ -168,4 +168,33 @@ export const formatDate = (date, fmt) => {
else{week = '日'} else{week = '日'}
return week; return week;
} }
// 根据身份证获取生日 年龄 性别
export const parseIDCard = (idCard)=> {
// 正则表达式匹配身份证号格式
var reg = /^\d{17}[\dXx]$/;
if (reg.test(idCard)) {
// 提取出生日期
var birthday = idCard.substring(6, 14);
var year = birthday.substring(0, 4);
var month = birthday.substring(4, 6);
var day = birthday.substring(6, 8);
// 计算年龄
var currentYear = new Date().getFullYear();
var age = currentYear - parseInt(year);
// 提取性别
var genderCode = parseInt(idCard.charAt(16));
var gender = genderCode % 2 === 0 ? "女" : "男";
return {
birthday: year + "-" + month + "-" + day,
age: age,
gender: gender
};
}
return null; // 身份证号格式不正确
}
\ No newline at end of file
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