Commit c1835bc9 authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/zk123/jz_travel

parents e9506e3e bf3b7e21
.row{
display: flex;
}
.row-w{
display: flex;
flex-wrap: wrap;
}
.row-aic-w{
display: flex;
flex-wrap: wrap;
align-items: center;
}
.row-aic-n{
display: flex;
flex-wrap: nowrap;
align-items: center;
}
.row-ajc-w{
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
}
.row-ajc-n{
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
}
.row-acje{
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: end;
}
.row-sb-n{
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: nowrap;
}
.row-sbas-n{
display: flex;
justify-content: space-between;
flex-wrap: nowrap;
}
.row-sb-w{
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
}
.flex1{
flex: 1;
}
.flexG{
flex-grow: 1;
}
.flexS{
flex-shrink: 0;
}
.column{
display: flex;
flex-direction: column;
}
.column-jc{
display: flex;
flex-direction: column;
justify-content: center;
}
.column-ajc{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.block{
display: block;
}
.inlineblock{
display: inline-block;
}
.hidden{
overflow: hidden;
}
.fixed{
position: fixed;
}
.fixedHeader{
left: 0;
right: 0;
top: 0;
}
.fixedFooter{
border-radius: 50rpx 50rpx 0px 0px;
bottom: 0;
left: 0;
right: 0;
overflow: hidden;
-webkit-border-radius: 50rpx 50rpx 0px 0px;
-moz-border-radius: 50rpx 50rpx 0px 0px;
-ms-border-radius: 50rpx 50rpx 0px 0px;
-o-border-radius: 50rpx 50rpx 0px 0px;
}
.relative{
position: relative;
}
.absolute{
position: absolute;
}
.z-index1{
z-index: 1;
}
.z-index2{
z-index: 2;
}
.z-index3{
z-index: 3;
}
.z-index4{
z-index: 4;
}
.fontWeight400{
font-weight: 400;
}
.fontBold{
font-weight: bold;
}
.nowrap{
white-space: nowrap;
}
.ellipsis1{
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.width100{
width: 100rpx;
}
.width100One{
width: 100%;
}
.width45vh{
width: 44vh;
}
.textCenter{
text-align: center;
}
.textRight{
text-align: right;
}
.fz14{
font-size: 14rpx;
}
.fz16{
font-size: 16rpx;
}
.fz17{
font-size: 17rpx;
}
.fz18{
font-size: 18rpx;
}
.fz19{
font-size: 19rpx;
}
.fz20{
font-size: 20rpx;
}
.fz21{
font-size: 21rpx;
}
.fz22{
font-size: 22rpx;
}
.fz24{
font-size: 24rpx;
}
.fz26{
font-size: 26rpx;
}
.fz28{
font-size: 28rpx;
}
.fz30{
font-size: 30rpx;
}
.fz36{
font-size: 36rpx;
}
.fz34{
font-size: 34rpx;
}
.fz40{
font-size: 40rpx;
}
.fz42{
font-size: 42rpx;
}
.fz52{
font-size: 52rpx;
}
.ML5{
margin-left: 5rpx;
}
.ML10{
margin-left: 10rpx;
}
.ML15{
margin-left: 15rpx;
}
.ML20{
margin-left: 20rpx;
}
.ML25{
margin-left: 25rpx;
}
.ML30{
margin-left: 30rpx;
}
.ML31{
margin-left: 31rpx;
}
.ML40{
margin-left: 40rpx;
}
.ML50{
margin-left: 50rpx;
}
.ML60{
margin-left: 60rpx;
}
.ML70{
margin-left: 70rpx;
}
.MR5{
margin-right: 5rpx;
}
.MR10{
margin-right: 10rpx;
}
.MR15{
margin-right: 15rpx;
}
.MR20{
margin-right: 20rpx;
}
.MR30{
margin-right: 30rpx;
}
.MR40{
margin-right: 40rpx;
}
.MR50{
margin-right: 50rpx;
}
.MR60{
margin-right: 60rpx;
}
.MT10{
margin-top: 10rpx;
}
.MT15{
margin-top: 15rpx;
}
.MT20{
margin-top: 20rpx;
}
.MT25{
margin-top: 25rpx;
}
.MT30{
margin-top: 30rpx;
}
.MT31{
margin-top: 31rpx;
}
.MT35{
margin-top: 35rpx;
}
.MT38{
margin-top: 38rpx;
}
.MT40{
margin-top: 40rpx;
}
.MT45{
margin-top: 45rpx;
}
.MT50{
margin-top: 50rpx;
}
.MT60{
margin-top: 60rpx;
}
.MT64{
margin-top: 64rpx;
}
.MT75{
margin-top: 75rpx;
}
.MB5{
margin-bottom: 5rpx;
}
.MB10{
margin-bottom: 10rpx;
}
.MB20{
margin-bottom: 20rpx;
}
.MB30{
margin-bottom: 30rpx;
}
.MB35{
margin-bottom: 35rpx;
}
.MB40{
margin-bottom: 40rpx;
}
.MB43{
margin-bottom: 43rpx;
}
.MB50{
margin-bottom: 50rpx;
}
.MB52{
margin-bottom: 52rpx;
}
.MB55{
margin-bottom: 55rpx;
}
.MB70{
margin-bottom: 70rpx;
}
.MB255{
margin-bottom: 255rpx;
}
.PT20{
padding-top: 20rpx;
}
.PT38{
padding-top: 38rpx;
}
.PT65{
padding-top: 65rpx;
}
.PT123{
padding-top: 123rpx;
}
.PB200{
padding-bottom: 200rpx;
}
.PB260{
padding-bottom: 260rpx;
}
.PB300{
padding-bottom: 300rpx;
}
.PY53{
padding: 0 53rpx;
}
.PX4{
padding: 0 4rpx;
}
.PX50{
padding: 0 50rpx;
}
.relativeFT5{
top: -5rpx;
}
.relativeFT8{
top: -8rpx;
}
.relativeFT10{
top: -10rpx;
}
.color9999A6{
color: #9999A6;
}
.color9999A5{
color: #9999A5;
}
.colorDEBF7B{
color: #DEBF7B;
}
.colorC09D4F{
color: #C09D4F;
}
.colorFF5858{
color: #FF5858;
}
.color1D1D20 {
color: #1D1D20;
}
.color111 {
color: #111111;
}
.color000 {
color: #000;
}
.colorFFF {
color: #FFF;
}
.colorC6C1BC{
color: #C6C1BC;
}
.colorE1C278{
color: #E1C278;
}
.bgFFF{
background: #fff;
}
.bgF5{
background: #f5f5f5;
}
.bgECF1F4{
background: #ECF1F4;
}
.bgDEBF7B{
background: #DEBF7B;
}
.bg9BC75D{
background: #9BC75D;
}
.bgFF5858{
background: #FF5858;
}
.bgE1C278{
background: #E1C278;
}
.bg111{
background: #111111;
}
.bgF2EEE5{
background: #F2EEE5;
}
.border1{
border: 1px solid;
}
.borderDEBF7B{
border-color: #DEBF7B;
}
.borderF5{
border-color: #F5F5F5;
}
.borderFF5858{
border-color: #FF5858;
}
.height-line1{
width: 100%;
height: 0;
border-bottom: 1px #ECF1F4 solid;
}
.height-line2{
width: 100%;
height: 0;
border-bottom: 2px #ECF1F4 solid;
}
.width-lineH83{
width: 2px;
height: 83rpx;
}
.width-lineH49{
width: 2px;
height: 49rpx;
}
.lineC8C8CF{
border-color: #C8C8CF;
}
.lineFF5858{
border-bottom: 1px #FF5858 solid;
}
.height-dashed1{
width: 100%;
height: 0;
border-bottom: 1px #D7D7DC dashed;
}
.DashedECF1F4{
border-color: #ECF1F4;
}
.height100vh{
height: 100vh;
}
.height100{
height: 100%;
}
.height1057{
height: 1057rpx;
}
.WH12R50{
width: 12rpx;
height: 12rpx;
border-radius: 50%;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-ms-border-radius: 50%;
-o-border-radius: 50%;
}
.WH6R50{
width: 6rpx;
height: 6rpx;
border-radius: 50%;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-ms-border-radius: 50%;
-o-border-radius: 50%;
}
\ No newline at end of file
......@@ -732,6 +732,45 @@
"path": "addGuest" //新增旅客
}
]
},
// 机票
{
"root": "pages/airTicket",
"pages": [
{
"path": "airTicketList",//机票列表
"style":{
"navigationBarTitleText": "机票列表"
}
},
{
"path": "airTicketDetails",//机票下单
"style":{
"navigationStyle": "custom"
}
},
{
"path": "AirplanePassengerList",//乘机人列表
"style":{
"navigationBarTitleText": "乘机人列表",
"navigationBarBackgroundColor": "#FFFFFF"
}
},
{
"path": "AirplanePassengerAddEditing"//添加编辑乘机人
},
{
"path": "TicketOrderList",//机票订单列表
"navigationBarTitleText": "订单列表"
},
{
"path": "TicketOrderDetails",//机票订单详情
"navigationBarTitleText": "订单详情",
"style": {
"navigationStyle": "custom"
}
}
]
}
],
"globalStyle": {
......
<template>
<view class="bgFFF height100vh">
<view class="AirplanePassengerAddEditingC">
<view class="column">
<view class="AirplanePassengerAddEditingC-text row-sb-n fz30">
<text class="flexS AirplanePassengerAddEditingC-textL">姓名(英文)</text>
<input class="flexG fontBold" type="text" placeholder="英文姓名,请于乘机证件相同"
v-model="addMsg.SurName"/>
</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 certificateList" class="AirplanePassengerAddEditingC-choose MR30"
@click="getType(item,1)">
<uni-icons color="#DEBF7B" :type="addMsg.GuestType==item.Id?'checkbox-filled':'circle'" size="18"></uni-icons>
<text class="ML20 fz30 fontBold">{{item.Name}}</text>
</view>
</view>
</view>
<view class="height-line1"></view>
</view>
<view class="column">
<view class="AirplanePassengerAddEditingC-text row-sb-n fz30">
<text class="flexS AirplanePassengerAddEditingC-textL">证件号</text>
<input v-if="addMsg.GuestType==1" class="flexG fontBold" type="text" placeholder="请输入身份证号码"
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 class="height-line1"></view>
</view>
</view>
<view class="AirplanePassengerList-footer fixedFooter bgFFF fixed z-index2">
<view v-if="addMsg.SurName&&(addMsg.PassportNo||addMsg.IdCard)"
class="AirplanePassengerList-buttom bgDEBF7B fz32 fontBold textCenter"
@click="showAddEditingPreviwe=true">
确认{{editorIndex||editorIndex==0?'编辑':'添加'}}
</view>
<view v-else class="AirplanePassengerList-buttom bgF5 fz32 fontBold textCenter">
确认{{editorIndex||editorIndex==0?'编辑':'添加'}}
</view>
</view>
<u-popup
v-model="showAddEditingPreviwe"
mode="center"
border-radius="20"
length="90%"
:safe-area-inset-bottom="true">
<view class="showAddEditing-box bgFFF">
<view class="fz30 fontBold textCenter">请确认乘机人信息</view>
<view class="showAddEditing-Tips textCenter fz26 MT25">
<text>请仔细检查乘机人信息,</text>
<text class="colorFF5858">信息错误将导致无法登机</text>
</view>
<view class="showAddEditing-Details bgF5 MT15">
<view class="row-aic-n">
<text class="fz26 flexS">姓名</text>
<text class="fz30 fontBold colorFF5858 flexG">{{addMsg.SurName}}</text>
</view>
<view class="row-aic-n">
<text class="fz26 flexS">证件号</text>
<text class="fz30 fontBold colorFF5858 flexG">{{addMsg.GuestType==1?addMsg.IdCard:addMsg.PassportNo}}</text>
</view>
<view class="row-aic-n" v-if="addMsg.result">
<text class="fz26 flexS">出生日期</text>
<text class="fz30 fontBold flexG">{{addMsg.result.birthday}}</text>
</view>
</view>
<view class="showAddEditing-buttom fz32 fontBold textCenter row-sb-n">
<view class="border1 colorDEBF7B borderDEBF7B" @click="showAddEditingPreviwe=false">返回修改</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>
</u-popup>
</view>
</template>
<script>
import { parseIDCard } from "./dates.js";
export default {
components: {
},
data() {
return {
loading: false,
certificateList:[
{Name:'身份证',Id:1},
{Name:'护照',Id:2},
],
GuestTypeList:[
{Name:'成人',Id:1},
{Name:'婴儿',Id:2},
],
text:'',
showAddEditingPreviwe: false,
addMsg: {
SurName:'',PassportNo:'',IdCard:'',MobilePhone:'',
result:null,show: false,GuestType:1,GuestNum: 1,Id:0
},
GuestList: [],
editorIndex: null
}
},
onLoad(options){
this.editorIndex = options.editorIndex||options.editorIndex==0?options.editorIndex:null
uni.setNavigationBarTitle({
title: options.editorIndex||options.editorIndex==0?'编辑乘机人':'新增乘机人'
})
},
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: {
submit(){
this.addMsg.Id = Math.floor(Math.random()*(100-1)+1)
if(!this.editorIndex){
this.GuestList.push(this.addMsg)
}
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>
<style scoped>
@import url("@/asset/css/flex.css");
@import url("./style.css");
.AirplanePassengerAddEditingC{
padding: 0 54rpx;
}
.AirplanePassengerAddEditingC-text{
padding: 35rpx 0;
}
.AirplanePassengerAddEditingC-textL{
width: 147rpx;
}
.AirplanePassengerAddEditingC-choose:last-child{
margin-left: 79rpx;
}
.showAddEditing-box{
width: 642rpx;
border-radius: 50rpx;
padding: 49rpx 55rpx 74rpx 55rpx;
}
.showAddEditing-Tips{
padding: 0 70rpx;
}
.showAddEditing-Details{
border-radius: 50rpx;
padding: 60rpx 47rpx;
}
.showAddEditing-Details>view:nth-child(2){
padding: 68rpx 0;
}
.showAddEditing-Details>view>text:first-child{
width: 150rpx;
}
.showAddEditing-buttom{
margin-top: 70rpx;
}
.showAddEditing-buttom>view{
width: 244rpx;
padding: 25rpx 0;
border-radius: 40rpx;
}
</style>
\ No newline at end of file
<template>
<view class="bgF5 height100vh">
<view class="AirplanePassengerList-Selected bgFFF">
<view class="AirplanePassengerList-Selected-num">
<text class="fz30 fontBold">已选:</text>
<text class="fz34 fontBold ML15">1</text>
<text class="fz30 fontBold ML10">人数</text>
<text class="fz26 color9999A5">(2岁以上)</text>
<text class="fz30 fontBold ML20">0</text>
<text class="fz30 fontBold ML10">婴儿</text>
</view>
<view class="AirplanePassengerList-add bgFFF textCenter fz26 colorDEBF7B border1 borderDEBF7B"
@click="clickAddEditing()">
添加乘机人
</view>
</view>
<view class="AirplanePassengerList-box bgFFF">
<view class="AirplanePassengerListC" v-for="(item,index) in 2">
<u-swipe-action
:index="index" :key="index"
:options="options"
:show="item.show"
:auto-close="false"
:content-click="bindClick"
@click="bindClick">
<view class="row-sb-n">
<view class="flexS row-aic-n">
<!-- <uni-icons color="#DEBF7B" type="checkbox-filled" size="18"></uni-icons> -->
<uni-icons color="#DEBF7B" type="circle" size="18"></uni-icons>
<!-- <view class="AirplanePassengerListC-status border1 borderDEBF7B bgDEBF7B textCenter">
<uni-icons type="checkmarkempty" size="15"></uni-icons>
</view> -->
</view>
<view class="flexG column ML30 title-wrap">
<view class="row-aic-n">
<text class="fz30 fontBold">王俊苏</text>
<text class="AirplanePassengerListC-infant ML15 fz20 colorDEBF7B border1 borderDEBF7B">婴儿</text>
</view>
<view class="fz26 color9999A5 MT25">
<text>身份证</text> <text class="ML15">2221115454465632535</text>
</view>
</view>
<!-- <view class="flexS ML15" @click="clickAddEditing(index+1)">
<img class="inlineblock" mode="widthFix" style="width: 28rpx;height: 30rpx;"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1696835692000_775.png"/>
</view> -->
</view>
</u-swipe-action>
</view>
</view>
<view class="AirplanePassengerList-footer fixedFooter bgFFF fixed z-index2">
<view class="AirplanePassengerList-buttom bgDEBF7B fz32 fontBold textCenter">
确认
</view>
</view>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
options: [{
text: '编辑',
style: {
backgroundColor: '#DEBF7B'
}
},
{
text: '删除',
style: {
backgroundColor: '#f5f5f5',
color:'#DEBF7B'
}
}
],
isOpened: 'right',
}
},
onLoad(options){
},
created() {},
methods: {
bindClick(index,index1) {
uni.showToast({
title: `点击了第${index+1}条数据${index1?'删除':'编辑'}按钮`,
icon: 'none'
});
},
clickEdit(){
},
clickDelete(){
},
clickAddEditing(item){
uni.navigateTo({
url: '/pages/airTicket/AirplanePassengerAddEditing?item='+item
});
}
}
}
</script>
<style scoped>
@import url("@/asset/css/flex.css");
@import url("./style.css");
.AirplanePassengerList-Selected{
padding: 51rpx 54rpx 41rpx 54rpx;
}
.AirplanePassengerList-Selected-num{
text-align: center;
margin-bottom: 42rpx;
}
.AirplanePassengerList-add{
padding: 18rpx 0;
border-radius: 35rpx;
}
.AirplanePassengerList-box{
padding: 0 54rpx;
margin-top: 29rpx;
margin-bottom: 200rpx;
}
.AirplanePassengerListC:first-child{
padding: 38rpx 0 49rpx 0;
}
.AirplanePassengerListC{
padding: 0 0 49rpx 0;
}
.AirplanePassengerListC-status{
width: 36rpx;
height: 36rpx;
line-height: 36rpx;
border-radius: 50%;
}
.AirplanePassengerListC-infant{
padding: 1rpx 11rpx;
border-radius: 6rpx;
}
</style>
\ No newline at end of file
This diff is collapsed.
<template>
<view class="bgF5"
:class="[dataList.length==0||3>dataList.length?'height100vh':'height100']">
<view class="TicketOrderList-header bgFFF fixed row-sb-n z-index3">
<view v-for="(item,index) in TicketOrderTyle"
class="border1 hidden fz24 bgF5 textCenter"
:class="[OrderTyle==item.Id?'borderDEBF7B':'borderF5']"
@click="research(item)">
{{item.Name}}
</view>
</view>
<u-empty v-if="dataList.length==0" text="暂无数据" mode="data"></u-empty>
<scroll-view v-else :scroll-y="true" style="background-color: #f0f4f7;"
:enable-back-to-top="true" :enable-flex="true"
@scrolltolower="lower" :style="{ 'height': `calc(100% - ${scrollHeight})`}">
<view class="TicketOrderListC">
<view class="TicketOrderList-box">
<template v-for="(item,index) in dataList">
<TicketOrderList></TicketOrderList>
</template>
</view>
<view style="padding:10px 0;">
<u-loadmore :status="status" :load-text="loadText"
:font-size="24" :margin-top="0"
:margin-bottom="0" bg-color="#f0f4f7" />
</view>
</view>
</scroll-view>
</view>
</template>
<script>
import TicketOrderList from "./components/TicketOrderList.vue";
export default {
components: {
TicketOrderList
},
data() {
return {
scrollTop: 0,
status: 'loadmore',
msg:{
ageIndex:1,
pageSize:5,
OrderStaus:0,
TeacherId:0,
CourseId:0,
ID:0,
StartTime:'',
EndTime:''
},
pageCount: 0,
OrderTyle: 1,
dataList: [],
loading: false,
TicketOrderTyle:[
{Name:'全部订单',Id:1},
{Name:'已付款',Id:2},
{Name:'待付款',Id:3},
{Name:'已取消',Id:4},
],
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
scrollHeight: 0,
}
},
onLoad(options){
},
created() {},
mounted() {
setTimeout(() => {
this.getHeadHeight();
}, 1000);
},
methods: {
getHeadHeight() {
let that = this;
const query = uni.createSelectorQuery().in(this);
query
.select(".TicketOrderList-header")
.boundingClientRect((data) => {
that.scrollHeight = data.height + "px";
})
.exec();
},
research(item) {
this.OrderTyle = item.Id
this.msg.pageIndex = 1;
this.getList(1);
},
//获取列表数据
getList(type) {
if (type == 1) {
this.dataList = [];
}
return
uni.showLoading()
this.request2({
url: "/api/Hotel/AppGetHotelPage",
data: this.msg,
},
(res) => {
if (res.resultCode == 1) {
if (this.msg.pageIndex === 1) {
this.dataList = res.data.pageData;
} else {
this.dataList = this.dataList.concat(res.data.pageData);
}
this.pageCount = res.data.pageCount;
}
uni.hideLoading()
}
);
},
//滚动加载
lower(e) {
if (this.msg.pageIndex < this.pageCount) {
this.msg.pageIndex++;
this.status = "loading";
this.getList();
} else {
this.status = "nomore";
}
},
}
}
</script>
<style scoped>
@import url("@/asset/css/flex.css");
@import url("./style.css");
.TicketOrderList-header{
left: 0;
right: 0;
top: 0;
padding: 27rpx 54rpx;
}
.TicketOrderList-header>view{
width: 135rpx;
padding: 15rpx 0;
border-radius: 20rpx;
}
.TicketOrderListC{
padding-top: 145rpx;
}
.TicketOrderList-box{
padding: 0 54rpx;
padding-bottom: 49rpx;
}
</style>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
<template>
<view class="NavigationHeader-box">
<!-- #ifdef MP-WEIXIN -->
<view
:style="[titleStyle, { opacity: '100% !important' }]"
class="top-title fixed z-index2 row-aic-n"
style="padding-left: 6rpx;"
>
<view class="flexS" @click="goBack">
<u-icon
name="arrow-left"
size="44"
color=""
></u-icon>
</view>
<view class="ML30 flexG fz32 color1D1D20">
<text class="block width45vh color111 textCenter ellipsis1">{{ title }}</text>
</view>
</view>
<!-- #endif -->
<view class="top-title bgF5 fixed z-index2 row-aic-n" :style="[titleStyle]">
<view class="flexS" @click="goBack">
<!-- #ifdef MP-WEIXIN -->
<u-icon name="arrow-left" size="44"></u-icon>
<!-- #endif -->
</view>
<view
class="ML30 flexG fz32 color1D1D20">
<text class="block width45vh color111 textCenter ellipsis1">{{ title }}</text>
</view>
</view>
</view>
</template>
<script>
export default {
components: {},
props:['title','titleStyle'],
data() {
return {
}
},
onLoad(options){
},
created() {},
mounted() {
},
methods: {
goBack(){
uni.navigateBack({
delta: -1
})
}
}
}
</script>
<style scoped>
@import url("@/asset/css/flex.css");
.NavigationHeader-box{
}
.top-title {
line-height: 45px !important;
padding-top: 20rpx;
left: 0;
right: 0;
top: 0;
width: 100%;
box-sizing: content-box;
z-index: 5;
padding-left: 6rpx;
}
</style>
\ No newline at end of file
<template>
<view class="TicketOrderListCard bgFFF relative">
<view class="TicketOrderListCard-wf absolute bg111 colorFFF fz24 z-index2">异地</view>
<view class="row-sb-n">
<view class="flexG"></view>
<view class="fz24 color111 flexS">
<text>09-28</text>
<text class="ML5 MR10">周六</text>
<text>10:39</text>
</view>
</view>
<view class="MB55" v-for="(item,index) in 2">
<view class="row-sb-n MT10">
<view class="flexS MR20">
<view class="TicketOrderListCard-qc bgE1C278 fz24 color111 overflow textCenter relative relativeFT8">
{{index?'返':'去'}}
<!-- 往返 -->
</view>
</view>
<view class="column flexS">
<text class="fz30 fontBold">09:00 </text>
<text class="fz22 MT5 width100 ellipsis1">天府T2</text>
</view>
<view class="FlightDirection-box relative">
<view class="FlightDirection-Title column">
<!-- :style="{'height':'90rpx'}" -->
<view class="row-ajc-n">
<view class="FlightDirection-zhuan z-index2 MB10">
<text class="block bgECF1F4 fz21 nowrap">转+2</text>
</view>
</view>
<view>
<text class="fz19 textCenter width100 ellipsis1 relative relativeFT8">
武汉 北京
</text>
</view>
</view>
<view class="FlightDirection-line absolute row-aic-n">
<view class="FlightDirection-line-one bgECF1F4"></view>
<view class="FlightDirection-line-two">
<view class="height-line2"></view>
</view>
<view class="FlightDirection-line-one bgECF1F4"></view>
</view>
</view>
<view class="column">
<text class="fz36 fontBold">11:30 </text>
<text class="fz22 MT5 width100 ellipsis1">许家坪</text>
</view>
<view class="ML20 TicketOrderListCard-Pr textRight">
<text v-if="index==1" class="color9999A5 fz32 relative TicketOrderListCard-PrQx">取消</text>
<text v-else class="fz34 fontBold">¥ 5,800</text>
</view>
</view>
<view class="row-w">
<view class="aviationTitle row-aic-n">
<img class="inlineblock flexS" mode="widthFix" style="width: 36rpx;height: 30rpx;"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1696749257000_469.png"/>
<view class="flexG">
<text class="fz22 ML5 color9999A5 width100One ellipsis1">东航CA1852...</text>
</view>
</view>
</view>
</view>
<view class="row-sb-n MT30">
<view class="fz324 color9999A5 MR30 flexG">
<txet class="block TicketOrderListCard-title width100One ellipsis1">陈伟霆、郑中基等4人</txet>
</view>
<view class="flexS">
<!-- colorDEBF7B -->
<view class="TicketOrderListCard-buttom overflow fz32 fontBold textCenter border1 bgDEBF7B borderDEBF7B"
@click="getDetail">
待付款
</view>
<!-- <view class="TicketOrderListCard-buttom overflow fz32 fontBold textCenter border1 bgF5 borderF5 color9999A5">
已取消
</view>
<view class="TicketOrderListCard-buttom overflow fz32 fontBold textCenter border1 bgFFF borderDEBF7B colorDEBF7B">
已支付
</view> -->
</view>
</view>
</view>
</template>
<script>
export default {
components: {
},
data() {
return {
}
},
onLoad(options){
},
created() {},
mounted() {
},
methods: {
getDetail(item){
uni.navigateTo({
url: '/pages/airTicket/TicketOrderDetails'
});
},
}
}
</script>
<style scoped>
@import url("@/asset/css/flex.css");
@import url("../style.css");
.TicketOrderListCard{
border-radius: 50rpx;
padding: 27rpx 39rpx 34rpx 50rpx;
margin-bottom: 40rpx;
}
.TicketOrderListCard-wf{
left: 0;
top: 0;
border-top-left-radius: 50rpx;
border-bottom-right-radius: 50rpx;
padding: 7rpx 27rpx;
}
.TicketOrderListCard-dashed{
margin-top: 25rpx;
margin-bottom: 25rpx;
}
.TicketOrderListCard-R{
margin-left: 80rpx;
}
.TicketOrderListCard-R>view:last-child{
padding-top: 37rpx;
}
.TicketOrderListCard-buttom{
width: 170rpx;
padding: 18rpx 0;
border-radius: 35rpx;
}
.TicketOrderListCard-qc{
padding: 2rpx 3rpx;
border-radius: 8rpx;
}
.TicketOrderListCard-Pr{
width: 150rpx;
}
.TicketOrderListCard-PrQx{
padding: 10rpx;
top: 34rpx;
}
</style>
\ No newline at end of file
<template>
<view class="addressIndex-box">
<view class="fz30 fontBold textCenter MB30">选择{{AddressType==1?'出发地':'目的地'}}</view>
<view class="fz30 fontBold MB30">当前{{AddressType==1?'出发地':'目的地'}}</view>
<view class="MT30">
<view class="addressIndex-Orientation inlineblock bgF5 row-ajc-n textCenter">
<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"/>
<text class="fz30">{{SelectObj.Name?SelectObj.Name:'--'}}</text>
</view>
</view>
<view class="fz30 fontBold MT45">地址</view>
<view class="hidden" style="height: calc(100vh - 60vh);">
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" :style="{ height: '100%' }">
<view class="addressIndex-toponym row-sb-w">
<template v-for="(item,index) in dataList">
<view class="addressIndex-Orientation inlineblock textCenter MT30 fz30"
:class="[SelectObj.ID==item.ID?'bgDEBF7B':'bgF5']"
@click="getAddress(item)">{{item.Name}}</view>
</template>
</view>
</scroll-view>
</view>
</view>
</template>
<script>
export default {
props:['AddressType','OriginAddressObj','dataList'],
data() {
return {
SelectObj: {
Name: '',
ID: ''
},
}
},
onLoad(options){
},
watch: {
AddressType: {
handler(newVal, oldval) {
if(newVal==1){
this.SelectObj.Name = this.OriginAddressObj.DepartCityName
this.SelectObj.ID = this.OriginAddressObj.DepartCityId
}else{
this.SelectObj.Name = this.OriginAddressObj.ArriveCityName
this.SelectObj.ID = this.OriginAddressObj.ArriveCityId
}
},
deep: false
},
OriginAddressObj: {
handler(newVal, oldval) {
if(this.AddressType==1){
this.SelectObj.Name = newVal.DepartCityName
this.SelectObj.ID = newVal.DepartCityId
}else{
this.SelectObj.Name = newVal.ArriveCityName
this.SelectObj.ID = newVal.ArriveCityId
}
},
deep: true
},
},
created() {},
mounted() {
},
methods: {
getAddress(item){
if(item.ID==this.SelectObj.ID){
this.SelectObj = {
Name: '',
ID: 0,
}
}else{
this.SelectObj = {
Name: item.Name,
ID: item.ID,
}
}
this.$emit('RenewalAddres',this.SelectObj ,this.AddressType)
// this.$forceUpdate()
},
}
}
</script>
<style scoped>
@import url("@/asset/css/flex.css");
@import url("../../style.css");
.addressIndex-box{
padding: 46rpx 53rpx 139rpx 53rpx;
}
.addressIndex-Orientation{
width: 190rpx;
padding: 15rpx 0;
border-radius: 30rpx;
}
.addressIndex-toponym{
}
</style>
\ No newline at end of file
<template>
<view class="airTicketDetailsList column">
<view v-for="(items,i) in dataList">
<view class="airTicketDetailsCard bgFFF MB40">
<view class="row-sb-n MR50">
<view class="row-aic-n">
<view>
<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 class="fz28 color111 ML20">
<text>{{items.time}}</text> <text class="ML10">周{{items.week}}</text>
</view>
<view class="fz28 color111 ML31">
总时长 {{items.duration}}
</view>
</view>
<view v-if="items.FlightList.length>1" class="fz28 colorE1C278 row-aic-n" @click="TicketDetails(items)">
<text>详情</text>
<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> -->
</view>
</view>
<view class="MT60 PX50" v-if="!items.show">
<view class="row relative" v-for="(item,index) in items.NewFlightList"
:class="[index==0?'MB50':'']">
<text v-if="index==1" class="fz18 fontWeight400 colorFF5858 absolute airTicketDetailsCard-timeT">
{{item.time}} 周{{item.week}}
</text>
<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="items.NewFlightList.length-1==index" class="MT25 fz28 fontBold">
{{item.Arrival_time}}
</view>
</view>
<view class="flexS MR30">
<view class="width-lineH49 bgE1C278 relative">
<view class="bgE1C278 absolute WH12R50 airTicketDetailsCard-LinT"></view>
<template v-if="index">
<view class="bgE1C278 absolute WH6R50 airTicketDetailsCard-LinT2"></view>
<view class="bgE1C278 absolute WH6R50 airTicketDetailsCard-LinT3"></view>
<view class="bgE1C278 absolute WH6R50 airTicketDetailsCard-LinT4"></view>
</template>
<view class="bgE1C278 absolute WH12R50 airTicketDetailsCard-LinB"></view>
<template v-if="index!=1">
<view class="bgE1C278 absolute WH6R50 airTicketDetailsCard-LinB2"></view>
</template>
</view>
</view>
<view class="column flexG relative">
<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">
<img class="inlineblock flexS" mode="widthFix" style="width: 20rpx;height: 17rpx;"
:src="item.AlImage"/>
<view class="flexG">
<text class="block width100One overflow fz20 ML5 color9999A5 fontWeight400">{{item.AlName}} {{item.Flight_number}} </text>
</view>
</view>
<view class="fz28 fontBold relative relativeFT8" v-if="index==0">
<text class="block width100One hidden">{{item.DepartureName}} {{item.dName}}</text>
</view>
<view class="fz28 fontBold MT25" v-if="index==1">
<text class="block width100One hidden">{{item.ArrivalCityName}} {{item.aName}}</text>
</view>
</view>
</view>
</view>
<template v-if="items.show">
<view class="MT60 PX50" v-for="(item,index) in items.FlightList"
:class="[items.FlightList.length-1!=index?'MB50':'']">
<view class="row-aic-n relative"
: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>
<view class="airTicketDetailsCard-timeL column flexS MR20 textRight">
<view :class="[index?'fz24':'fz28 fontBold']">{{item.Departure_time}} </view>
<view class="MT35" :class="[items.FlightList.length-1!=index?'fz24':'fz28 fontBold']">
{{item.Arrival_time}}
</view>
</view>
<view class="flexS MR30">
<view class="width-lineH83 bgE1C278 relative">
<view class="bgE1C278 absolute WH12R50 airTicketDetailsCard-LinT"></view>
<template v-if="index">
<view class="bgE1C278 absolute WH6R50 airTicketDetailsCard-LinT2"></view>
<view class="bgE1C278 absolute WH6R50 airTicketDetailsCard-LinT3"></view>
</template>
<view class="bgE1C278 absolute WH12R50 airTicketDetailsCard-LinB"></view>
<template v-if="items.FlightList.length-1>index">
<view class="bgE1C278 absolute WH6R50 airTicketDetailsCard-LinB2"></view>
<view class="bgE1C278 fz18 colorFFF absolute airTicketDetailsCard-LinText">
中转
</view>
</template>
</view>
</view>
<view class="column flexG relative">
<view class="airTicketDetailsCard-title row-aic-n absolute">
<img class="inlineblock flexS" mode="widthFix" style="width: 20rpx;height: 17rpx;"
:src="item.AlImage"/>
<view class="flexG">
<text class="block width100One overflow fz20 ML5 color9999A5 fontWeight400">{{item.AlName}} {{item.Flight_number}}</text>
</view>
</view>
<view class="fz28 fontBold relative relativeFT8">
<text class="block width100One hidden">{{item.DepartureName}} {{item.dName}} </text>
</view>
<view class="fz28 fontBold MT25">
<text class="block width100One hidden">{{item.ArrivalCityName}} {{item.aName}} </text>
</view>
</view>
</view>
</view>
</template>
</view>
</view>
</view>
</template>
<script>
export default {
props:['DetailsList'],
components: {
},
data() {
return {
dataList:[
{
show:true
},
{
show:false
},
],
}
},
onLoad(options){
},
watch: {
DetailsList:{
handler(newVal, oldval) {
this.dataList = JSON.parse(JSON.stringify(this.DetailsList))
},
deep: true,
immediate: true
}
},
created() {},
methods: {
TicketDetails(items){
items.show=!items.show
this.$forceUpdate();
},
}
}
</script>
<style scoped>
@import url("@/asset/css/flex.css");
@import url("../style.css");
.airTicketDetailsList{
margin: 0 54rpx;
}
.airTicketDetailsCard{
border-radius: 50rpx;
padding: 45rpx 0;
}
</style>
\ No newline at end of file
<template>
<view class="header-box row-aic-w">
<img class="block" mode="widthFix"
style="width: 157rpx;height: 61rpx"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1696747312000_626.png"/>
</view>
</template>
<script>
export default {
components: {},
data() {
return {
}
},
onLoad(options){
},
created() {},
methods: {
}
}
</script>
<style scoped>
.header-box{
padding: 14rpx 44rpx 0 44rpx;
}
</style>
\ No newline at end of file
<template>
<view>
<view class="aviationCard bgFFF row-sbas-n relative"
v-for="(item,index) in dataList"
@click="getPriceDetail(item)">
<view v-if="item.FlightList.length>2" class="aviationCard-wf absolute bg111 colorFFF fz20 z-index2">异地往返</view>
<view class="column flexG">
<view
:class="[item.FlightList.length-1!=indexs?'MB30':'']"
v-for="(childs,indexs) in item.NewFlightList">
<view class="row-sb-n MT25">
<view class="flexS MR20">
<view class="FlightDirection-qc bgE1C278 fz24 color111 overflow textCenter">
<template v-if="childs.FlightSubType==1">去程</template>
<template v-if="childs.FlightSubType==3">返程</template>
</view>
</view>
<view class="column flexS">
<text class="fz36 fontBold">{{childs.Departure_time}} </text>
<text class="fz22 MT5 width100 ellipsis1">{{childs.dName}}</text>
</view>
<view class="FlightDirection-box relative">
<view class="FlightDirection-Title column">
<!-- :style="{'height':'90rpx'}" -->
<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&&childs.frequency>1">
转+{{childs.frequency}}
</template>
<template v-if="childs.frequency&&childs.frequency==1">
经停
</template>
</text>
</view>
</view>
<view>
<text class="fz19 textCenter width100 ellipsis1">
{{childs.DepartureName}} {{childs.ArrivalCityName}}
</text>
</view>
</view>
<view class="FlightDirection-line absolute row-aic-n">
<view class="FlightDirection-line-one bgECF1F4"></view>
<view class="FlightDirection-line-two">
<view class="height-line1"></view>
</view>
<view class="FlightDirection-line-one bgECF1F4"></view>
</view>
</view>
<view class="relative">
<view class="column">
<text class="fz36 fontBold">{{childs.Arrival_time}} </text>
<text class="fz22 MT5 width100 ellipsis1">{{childs.aName}}</text>
</view>
<!-- <view class="FlightDirection-time absolute colorFF5858 fz20 nowrap">
<text>+</text>
<text class="ML5">1</text>
<text class="ML5">天</text>
</view> -->
</view>
</view>
<view class="row-w MT15">
<view class="aviationTitle row-aic-n">
<img class="inlineblock" mode="widthFix" style="width: 36rpx;height: 30rpx;"
:src="item.AirlineUrl"/>
<text class="fz22 ML10 color9999A5">{{item.AirLineName}}</text>
</view>
</view>
</view>
</view>
<view class="FlightDirection-Price flexS column">
<view class="colorC09D4F fontBold row-aic-n MT25">
<view class="FlightDirection-Price-symbol MR10">
<text class="fz20 relative" v-if="item.Price>0">¥</text>
</view>
<text :class="[item.Price>0?'fz36':'fz22 fontWeight400']">
<template v-if="item.Price>0">
{{item.Price}}
</template>
<template v-else>暂无报价</template>
</text>
</view>
<view class="textRight">
<text class="FlightDirection-zhang border1 borde fz18"
:class="[item.B2BSellNum>0?'borderFF5858 colorFF5858':'borderF5 color9999A5']">
<template v-if="item.B2BSellNum>0">{{item.B2BSellNum}}</template>
<template v-if="item.Price>0&&item.B2BSellNum==0">售罄</template>
</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props:['dataList'],
components: {},
data() {
return {
}
},
onLoad(options){
},
created() {},
methods: {
getPriceDetail(item){
uni.navigateTo({
url: `/pages/airTicket/airTicketDetails?TCID=${item.TCID}&Price=${item.Price}`
});
},
}
}
</script>
<style scoped>
@import url("@/asset/css/flex.css");
@import url("../style.css");
.aviationCard{
border-radius: 20rpx;
padding: 37rpx 34rpx 48rpx 37rpx;
margin: 0 30rpx 40rpx;
}
.aviationCard-wf{
left: 0;
top: 0;
border-top-left-radius: 50rpx;
border-bottom-right-radius: 50rpx;
padding: 7rpx 27rpx;
}
.aviationTitle{
margin-right: 31rpx;
}
.aviationTitle:last-child{
margin-right: 0;
}
.FlightDirection-time{
left: 0;
right: 0;
top: -33rpx;
}
.FlightDirection-Price{
margin-left: 45rpx;
}
.FlightDirection-Price>view{
}
.FlightDirection-Price-symbol text{
top: -3rpx;
}
</style>
\ No newline at end of file
//节假日信息
const day=[
{
year:2022,
month:1,
festival:[
{name:'元旦',day:1},
{name:'除夕',day:31},
]
},
{
year:2022,
month:2,
festival:[
{name:'春节',day:1},
{name:'元宵',day:15},
{name:'情人节',day:14}
]
},
{
year:2022,
month:3,
festival:[
{name:'妇女节',day:8},
]
},
{
year:2022,
month:4,
festival:[
{name:'清明',day:4},
]
},
{
year:2022,
month:5,
festival:[
{name:'劳动节',day:1},
{name:'青年节',day:4},
{name:'母亲节',day:10},
]
},
{
year:2021,
month:6,
festival:[
{name:'儿童节',day:1},
{name:'父亲节',day:21},
{name:'端午',day:14},
]
},
{
year:2021,
month:7,
festival:[
{name:'建党节',day:1}
]
},
{
year:2021,
month:8,
festival:[
{name:'建军节',day:1},
{name:'七夕',day:14},
{name:'中元节',day:22},
]
},
{
year:2021,
month:9,
festival:[
{name:'教师节',day:10},
{name:'中秋',day:21}
]
},
{
year:2021,
month:10,
festival:[
{name:'国庆',day:1},
{name:'重阳',day:14}
]
},
{
year:2021,
month:11,
festival:[
{name:'感恩节',day:26}
]
},
{
year:2021,
month:12,
festival:[
{name:'平安夜',day:24},
{name:'圣诞节',day:25}
]
}
]
export default day
\ No newline at end of file
This diff is collapsed.
/*
*此函数的作用是根据传入的一个日期,返回这一周的日期或者这一个月的日期,
* 如果是月的话注意还包含上个月和下个月的日期,月的话总共数据有 6 * 7 = 42个
*
*/
/*
* 时间格式化函数
* 重要提示,微信小程序new Date('2020-04-16')在ios中无法获取时间对象
* 解决方式: 建议将时间都格式化成'2020/04/16 00:00:00'的格式
* 函数示例: formatDate(new Date(), 'YYYY/MM/dd hh:mm:ss')
*/
export const formatDate = (date, fmt) => {
if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
}
let o = {
'M+': date.getMonth() + 1,
'd+': date.getDate(),
'h+': date.getHours(),
'm+': date.getMinutes(),
's+': date.getSeconds()
}
for (let k in o) {
if (new RegExp(`(${k})`).test(fmt)) {
let str = o[k] + ''
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? str : padLeftZero(str))
}
}
return fmt
}
const padLeftZero = (str) => {
return ('00' + str).substr(str.length)
}
export const judgeType = (s) => {
// 函数返回数据的具体类型
return Object.prototype.toString.call(s).slice(8,-1);
}
export const equalDate = (d1, d2) => {
let result = false;
if (d1.getFullYear() === d2.getFullYear() && d1.getMonth() === d2.getMonth() && d1.getDate() === d2.getDate()) {
result = true;
}
return result;
}
/* 比较时间,时间格式为2020-04-04
*/
export const dateEqual = (before, after) => {
before = new Date(before.replace('-', '/').replace('-', '/'))
after = new Date(after.replace('-', '/').replace('-', '/'))
if (before.getTime() - after.getTime() === 0) {
return true
} else {
return false
}
}
export const gegerateDates = (date = new Date(), type='week') => {
const result = [];
if (judgeType(date) === 'Date') {
// 年,月,日
const y = date.getFullYear();
const m = date.getMonth();
const d = date.getDate();
const days = new Date(y, m+1, 0).getDate();
// 获取日期是星期几
let weekIndex = date.getDay() === 0 ? 7 : date.getDay();
if (type === 'month') {
const dobj = new Date(y,m,1);
weekIndex = dobj.getDay() === 0 ? 7 : dobj.getDay();
}
if (type === 'week') {
for(let i = weekIndex - 1; i >0; i--) {
const dtemp = new Date(y,m,d);
dtemp.setDate(dtemp.getDate() - i);
result.push({
time: dtemp,
show: true,
fullDate: formatDate(dtemp, 'yyyy-MM-dd'),
isToday: equalDate(new Date(), dtemp)
})
}
for(let i = 0; i <= 7 - weekIndex; i++) {
const dtemp = new Date(y,m,d);
dtemp.setDate(dtemp.getDate() + i);
result.push({
time: dtemp,
show: true,
fullDate: formatDate(dtemp, 'yyyy-MM-dd'),
isToday: equalDate(new Date(), dtemp)
})
}
} else if (type === 'month') {
// 上个月
for(let i = weekIndex - 1; i > 0; i--) {
const dtemp = new Date(y,m,1);
dtemp.setDate(dtemp.getDate() - i);
result.push({
time: dtemp,
show: false,
fullDate: formatDate(dtemp, 'yyyy-MM-dd'),
isToday: equalDate(new Date(), dtemp)
});
}
// 这个月的日期
for (let i = 0; i < days; i++) {
const dtemp = new Date(y,m,1);
dtemp.setDate(dtemp.getDate() + i);
result.push({
time: dtemp,
show: true,
fullDate: formatDate(dtemp, 'yyyy-MM-dd'),
isToday: equalDate(new Date(), dtemp)
});
}
const len = 42 - result.length;
// 下个月的日期
for (let i = 1; i <= len;i++) {
const dtemp = new Date(y,m+1,0);
dtemp.setDate(dtemp.getDate() + i);
result.push({
time: dtemp,
show: false,
fullDate: formatDate(dtemp, 'yyyy-MM-dd'),
isToday: equalDate(new Date(), dtemp)
})
}
}
}
return result;
}
// 计算当前日期的前后日期
export const getBeforeDate = (num, time)=> {
let n = num;
let d = '';
if (time) {
d = new Date(time);
} else {
d = new Date();
}
let year = d.getFullYear();
let mon = d.getMonth() + 1;
let day = d.getDate();
if (day <= n) {
if (mon > 1) {
mon = mon - 1;
} else {
year = year - 1;
mon = 12;
}
}
d.setDate(d.getDate() - n);
year = d.getFullYear();
mon = d.getMonth() + 1;
day = d.getDate();
let s = year + "-" + (mon < 10 ? ('0' + mon) : mon) + "-" + (day < 10 ? ('0' + day) : day);
return s;
}
// 获取当前是周几
export const getDateWeek = (time)=> {
let w = new Date(time).getDay()
let week
if(w==1){week = '一'}
else if(w==2){week = '二'}
else if(w==3){week = '三'}
else if(w==4){week = '四'}
else if(w==5){week = '五'}
else if(w==6){week = '六'}
else{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
.FlightDirection-box{
flex-grow: 1;
margin: 0 21rpx;
}
.FlightDirection-Title{
width: 100%;
text-align: center;
}
.FlightDirection-zhuan{
padding: 5rpx 0;
}
.FlightDirection-zhuan text{
border-radius: 8rpx;
width: 60rpx;
height: 28rpx;
line-height: 28rpx;
text-align: center;
margin: auto;
}
.FlightDirection-line{
left: 0;
top: 0;
right: 0;
bottom: 0;
}
.FlightDirection-line-one{
width: 12rpx;
height: 12rpx;
border-radius: 50%;
}
.FlightDirection-line-two{
flex-grow: 1;
}
.FlightDirection-line-one.FlightDirection-line-therr{
background: #FF5858;
}
.FlightDirection-zhang{
padding: 2rpx 9rpx;
border-radius: 8rpx;
-webkit-border-radius: 8rpx;
-moz-border-radius: 8rpx;
-ms-border-radius: 8rpx;
-o-border-radius: 8rpx;
}
.FlightDirection-qc{
width: 33rpx;
padding: 6rpx 0;
border-radius: 8rpx;
-webkit-border-radius: 8rpx;
-moz-border-radius: 8rpx;
-ms-border-radius: 8rpx;
-o-border-radius: 8rpx;
}
.AirplanePassengerList-footer{
padding: 38rpx 54rpx 67rpx 54rpx;
}
.AirplanePassengerList-buttom{
border-radius: 40rpx;
padding: 25rpx 0;
}
.airTicketDetailsInstructionsBox{
padding: 0 53rpx;
}
.airTicketDetailsInstructions{
line-height: 48rpx;
padding-bottom: 220rpx;
}
.airTicketDetailsFooter-order{
padding: 24rpx 47rpx;
border-radius: 40rpx;
}
.TicketOrderDetailsBg{
background: linear-gradient(180deg, #ECDFC4, #F5F5F5);
}
.airTicketDetailsBg{
background: linear-gradient(180deg, #DEBF7B , #F5F5F5);
}
.airTicketDetailsCard-qfc{
padding: 5rpx 15rpx;
border-radius: 0px 14px 14px 0px;
}
.airTicketDetailsCard-timeL{
width: 75rpx;
}
.airTicketDetailsCard-timeT{
bottom: 39rpx;
left: -8rpx;
}
.airTicketDetailsCard-LinT{
top: 0;
left: -4rpx;
}
.airTicketDetailsCard-LinT2{
top: -11rpx;
left: 0px;
}
.airTicketDetailsCard-LinT3{
top: -22rpx;
left: 0px;
}
.airTicketDetailsCard-LinT4{
top: -34rpx;
left: 0px;
}
.airTicketDetailsCard-LinB{
bottom: 0;
left: -4rpx;
}
.airTicketDetailsCard-LinB2{
bottom: -10rpx;
left: -.5rpx;
}
.airTicketDetailsCard-LinText{
bottom: -69rpx;
left: -5px;
border-radius: 6rpx;
padding: 6rpx 4rpx;
}
.airTicketDetailsCard-title{
top: -38rpx;
left: 0;
}
.airTicketDetailsCard-ZhuanNum{
border-radius: 6rpx;
padding: 0rpx 6rpx 3rpx 6rpx;
top: -34rpx;
}
\ 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