Commit 1b3d3a96 authored by 华国豪's avatar 华国豪 🙄

1

parent c67c904a
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
color:#000000; color:#000000;
background: #fff; background: #fff;
} }
.commonF .cff{
color: #fff;
}
#searchView{ #searchView{
height: 70rpx; height: 70rpx;
width: 100%; width: 100%;
......
...@@ -51,8 +51,8 @@ App({ ...@@ -51,8 +51,8 @@ App({
let timestamp = (new Date()).valueOf() let timestamp = (new Date()).valueOf()
let sign = md5('cmd=' + url + '&' + 'msg=' + encodeURIComponent(data).toLowerCase() + '&' + 'timestamp=' + timestamp + '&' + 'token=' + getApp().state.admin.token + '&' + 'key=' + '') let sign = md5('cmd=' + url + '&' + 'msg=' + encodeURIComponent(data).toLowerCase() + '&' + 'timestamp=' + timestamp + '&' + 'token=' + getApp().state.admin.token + '&' + 'key=' + '')
wx.request({ wx.request({
url: 'http://192.168.2.214:8082/api/Common/Post', // url: 'http://192.168.2.214:8082/api/Common/Post',
// url: 'http://192.168.2.65:8025/api/Common/Post', //春姐 url: 'http://192.168.2.65:8025/api/Common/Post', //春姐
// url: 'https://reborn.oytour.com/api/common/post', //线上 // url: 'https://reborn.oytour.com/api/common/post', //线上
// url: ' http://test.viitto.com/api/common/post', // url: ' http://test.viitto.com/api/common/post',
...@@ -73,11 +73,11 @@ App({ ...@@ -73,11 +73,11 @@ App({
url: '/pages/login/login' url: '/pages/login/login'
}) })
} else { } else {
wx.showToast({ // wx.showToast({
title: res.data.message, // title: res.data.message,
icon: 'none', // icon: 'none',
duration: 1000 // duration: 1000
}) // })
reject(res.data) reject(res.data)
} }
} }
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
"pages/Voucher/write/write", "pages/Voucher/write/write",
"pages/Ticket/Ticket", "pages/Ticket/Ticket",
"pages/Ticket/TicketList/TicketList", "pages/Ticket/TicketList/TicketList",
"pages/Ticket/TicketDate/TicketDate",
"pages/login/smsLogin/smsLogin", "pages/login/smsLogin/smsLogin",
"pages/login/revisePwd/revisePwd", "pages/login/revisePwd/revisePwd",
"pages/product/SametradeZW/prizelist/prizelist", "pages/product/SametradeZW/prizelist/prizelist",
...@@ -54,6 +55,7 @@ ...@@ -54,6 +55,7 @@
"pages/product/SametradeZW/Applicationnotes/Applicationnotes", "pages/product/SametradeZW/Applicationnotes/Applicationnotes",
"pages/product/SametradeZW/Successview/Successview", "pages/product/SametradeZW/Successview/Successview",
"component/amount/amount", "component/amount/amount",
"component/newCalendar/newCalendar",
"pages/activity/activity", "pages/activity/activity",
"pages/local/TicketOrder/TicketOrder", "pages/local/TicketOrder/TicketOrder",
"pages/local/LocalFoodDetails/LocalFoodDetails", "pages/local/LocalFoodDetails/LocalFoodDetails",
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
<view>{{item.date}}</view> <view>{{item.date}}</view>
<view wx:if="{{index<1}}" wx:key="index2" wx:for="{{item.datalist}}" wx:for-item="pre">¥{{pre.b2BPrice}}起</view> <view wx:if="{{index<1}}" wx:key="index2" wx:for="{{item.datalist}}" wx:for-item="pre">¥{{pre.b2BPrice}}起</view>
</view> </view>
</scroll-view> </scroll-view>
<!-- 日历 --> <!-- 日历 -->
<view style="padding-bottom:10rpx"> <view style="padding-bottom:10rpx">
......
...@@ -44,11 +44,20 @@ Page({ ...@@ -44,11 +44,20 @@ Page({
cr: 0, cr: 0,
child: 0, child: 0,
ye: 0, ye: 0,
lr: 0 lr: 0,
arrivalName: '',
departureName: ''
}, },
countryHidden:false, countryHidden:false,
type:'', type:'',
}, },
// 搜索进入机票列表
seachTiket: function () {
let _this = this;
wx.navigateTo({
url: '/pages/Ticket/TicketList/TicketList?date=' + _this.data.msg.qFlightDateStart + "&sName=" + _this.data.msg.departureName + "&sId=" + _this.data.msg.departure_city + "&eName=" + _this.data.msg.arrivalName + "&eId=" + _this.data.msg.arrival_city + "&type=" + _this.data.msg.ticketType
})
},
bindPickerChange: function (e) { bindPickerChange: function (e) {
console.log('picker发送选择改变,携带值为', e.detail.value) console.log('picker发送选择改变,携带值为', e.detail.value)
this.setData({ this.setData({
...@@ -73,9 +82,16 @@ Page({ ...@@ -73,9 +82,16 @@ Page({
type: type type: type
}) })
}, },
changeTiketType: function(e){
let type = Number(e.currentTarget.dataset.type)
this.setData({
"msg.ticketType": type
})
},
selectCity(val) { selectCity(val) {
let that = this; let that = this;
let vastr = val.detail; let vastr = val.detail;
console.log(vastr)
if (that.data.type == "start") { if (that.data.type == "start") {
that.data.msg.departure_city = vastr.id; that.data.msg.departure_city = vastr.id;
that.data.msg.departureName = vastr.name; that.data.msg.departureName = vastr.name;
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
</view> </view>
<view class="Choose"> <view class="Choose">
<view class="Title flex"> <view class="Title flex">
<view class="{{msg.ticketType==1?'Active':''}}">单程</view> <view data-type='1' bindtap='changeTiketType' class="{{msg.ticketType==1?'Active':''}}">单程</view>
<view class="{{msg.ticketType==2?'Active':''}}">往返</view> <view data-type='2' bindtap='changeTiketType' class="{{msg.ticketType==2?'Active':''}}">往返</view>
</view> </view>
<view class="city flexb"> <view class="city flexb">
<view style="width:200rpx" bindtap="getCity" data-type="start">出发:{{msg.departureName}}</view> <view style="width:200rpx" bindtap="getCity" data-type="start">出发:{{msg.departureName}}</view>
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
</radio-group> </radio-group>
</view> </view>
</view> </view>
<view class="btn"> <view class="btn" bindtap='seachTiket'>
搜索 搜索
</view> </view>
</view> </view>
......
...@@ -6,6 +6,7 @@ Page({ ...@@ -6,6 +6,7 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
isLogin: app.isLogin,
screenList:[ screenList:[
{ {
name: '航空公司', name: '航空公司',
...@@ -38,13 +39,13 @@ Page({ ...@@ -38,13 +39,13 @@ Page({
arrival_cityname: "", arrival_cityname: "",
freightSpace: 0, freightSpace: 0,
airTicketScatterNum: 0, airTicketScatterNum: 0,
flithtMonthDate: '', flithtMonthDate: new Date().Format("yyyy-MM"),
timeSort: 0, timeSort: 0,
priceSort: 0, priceSort: 0,
}, },
airlineList: [], airlineList: [],
bottomActive: 1, bottomActive: 1,
screenBoxShow: true, screenBoxShow: false,
screenID: 1, screenID: 1,
getMonthMsg:{ getMonthMsg:{
id: 0, id: 0,
...@@ -54,13 +55,133 @@ Page({ ...@@ -54,13 +55,133 @@ Page({
ticketType: 2, ticketType: 2,
lineId: 0, lineId: 0,
isPayOrder: 0, isPayOrder: 0,
departure_city: 0,
freightSpace: 0, freightSpace: 0,
airTicketScatterNum: 0, airTicketScatterNum: 0,
qFlightDateStart: "",
departure_city: 0,
departure_cityname: "",
arrival_city: 0,
arrival_cityname: "",
},
MinPriceList: [],
MinPriceListActive: -1,
qitianhou: "",
monthList: [],
classArray: [],
calendarTit: "",
MonthDate: new Date().Format("yyyy-MM"),
MonthDate2: new Date().Format("MM"),
leftpx: -1,
dateBoxShow: true,
AirticketList: [],
pageIndex: 1,
totalPage: 1,
detailShow: false,
detailMsg: {},
},
// 航班详情弹窗
closeDetail: function (e) {
let index = e.currentTarget.dataset.index;
let msg = index >= 0 ? this.data.AirticketList[index] : ""
console.log(msg)
this.setData({
detailShow: !this.data.detailShow,
detailMsg: msg
})
},
// 加载更多
scrollGetMore: function () {
this.setData({
'msg.pageIndex': this.data.pageIndex + 1,
})
this.getList(1)
},
// 获取机票列表
getList: function (type) {
if (this.data.pageIndex >= this.data.totalPage && type) {
return
} }
app.$apiJavaData("api/dmc/airticket/getB2BAirticketList", this.data.msg).then(res => {
let arr = this.data.AirticketList;
let arr2 = res.data.pageData;
if (type) {
for (let i = 0; i < arr2.length; i++){
arr.push(arr2[i])
}
} else {
arr = arr2
}
this.setData({
AirticketList: arr,
totalPage: res.data.pageCount ? res.data.pageCount : 1,
pageIndex: res.data.pageIndex ? res.data.pageIndex : 1,
})
}).catch(err => { })
}, },
getMonthMinPrice: function () { //切换月份
changeMonth: function (e) {
let t = e.currentTarget.dataset.type;
let newDate = this.data.classArray[0][0].dateStr;
let preMonth = this.data.MinPriceList[0].timeStr;
if (t == 'a') {
if (this.data.MonthDate2 == new Date().Format("MM")) {
wx.showToast({
title: '不能再往前了',
icon: 'none',
duration: 2000
})
return
}else{
preMonth = util.getPreMonth(newDate)
preMonth = new Date(preMonth).Format("yyyy-MM")
}
} else if (t == 'b'){
preMonth = util.getNextMonth(newDate)
preMonth = new Date(preMonth).Format("yyyy-MM")
}
this.setData({
MonthDate2: new Date(preMonth).Format("MM"),
"msg.flithtMonthDate": preMonth,
'getMonthMsg.flithtMonthDate': preMonth + "-01",
'getMonthMsg.qFlightDateStart': preMonth + "-01" + " 00:00:00",
"msg.qFlightDateStart": preMonth + "-01" + " 00:00:00",
totalPage: 0,
pageIndex: 0,
'msg.pageIndex': 0
})
this.getMinPrice()
this.getForMonthMinPrice()
},
//打开日历
openDate: function () {
this.setData({
dateBoxShow: !this.data.dateBoxShow
})
},
// 点击上面一坨日历
changeMinPrice: function (e) {
let index = Number(e.currentTarget.dataset.index)
if (this.data.MinPriceList[index].price !== '0.00' && this.data.MinPriceList[index].timeStr > this.data.qitianhou){
this.setData({
MinPriceListActive: index,
"msg.qFlightDateStart": this.data.MinPriceList[index].timeStr,
"MonthDate2": new Date(this.data.MinPriceList[index].timeStr).Format("MM"),
"msg.flithtMonthDate": new Date(this.data.MinPriceList[index].timeStr).Format("yyyy-MM"),
"msg.qFlightDateStart": this.data.MinPriceList[index].timeStr,
totalPage: 0,
pageIndex: 0,
'msg.pageIndex': 0
})
this.getList()
} else {
if (this.data.MinPriceList[index].timeStr < this.data.qitianhou){
wx.showToast({
title: '只能购买7天以后的机票',
icon: 'none',
duration: 2000
})
}
}
}, },
//舱位筛选 //舱位筛选
changeCangwei: function (e) { changeCangwei: function (e) {
...@@ -83,6 +204,7 @@ Page({ ...@@ -83,6 +204,7 @@ Page({
'msg.airLineID': id 'msg.airLineID': id
}) })
}, },
// 关闭筛选框
closeScreenBox: function (){ closeScreenBox: function (){
this.setData({ this.setData({
screenBoxShow: false screenBoxShow: false
...@@ -91,7 +213,6 @@ Page({ ...@@ -91,7 +213,6 @@ Page({
// 航空公司下拉框 // 航空公司下拉框
initAirlines: function () { initAirlines: function () {
app.$api('airline_get_GetB2BAirLineList', {}).then(res => { app.$api('airline_get_GetB2BAirLineList', {}).then(res => {
console.log(res)
this.setData({ this.setData({
airlineList: res airlineList: res
}) })
...@@ -100,8 +221,9 @@ Page({ ...@@ -100,8 +221,9 @@ Page({
//底部按钮监听 //底部按钮监听
cahngeBtnActive: function (e) { cahngeBtnActive: function (e) {
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
let timeSort = index == 2 ? 1 : 0 console.log(index == 3)
let priceSort = index == 3 ? 1 : 0 let priceSort = index == 2 ? 1 : 0
let timeSort = index == 3 ? 1 : 0
this.setData({ this.setData({
bottomActive: Number(index), bottomActive: Number(index),
'msg.timeSort': timeSort, 'msg.timeSort': timeSort,
...@@ -115,23 +237,134 @@ Page({ ...@@ -115,23 +237,134 @@ Page({
this.getList() this.getList()
} }
}, },
// 获取数据 //获取月日历
getList: function () { getForMonthMinPrice: function () {
app.$apiJavaData("api/dmc/airticket/getB2BAirticketForMinPrice", this.data.msg).then(res => { app.$apiJavaData("api/dmc/airticket/getB2BAirticketForMonthMinPrice", this.data.msg).then(res => {
console.log(res) this.creatCalendar(res.data)
}).catch(err => { })
},
// 获取上面一坨日历
getMinPrice: function (date) {
app.$apiJavaData("api/dmc/airticket/getB2BAirticketForMinPrice", this.data.getMonthMsg).then(res => {
this.setData({ this.setData({
orderAdd: res.data MinPriceList: res.data
}) })
//日历联动
if (date) {
for (let i = 0; i < res.data.length; i++) {
if (date == res.data[i].timeStr){
this.setData({
leftpx: i,
MinPriceListActive: i
})
}
}
}
}).catch(err => { }) }).catch(err => { })
}, },
creatCalendar(list) {
// 创建日历
let dateList = [];
if (list && list.length > 0) {
list.forEach((x, index) => {
// if(parseFloat(999) > 0){
let msg = {
dateStr: x.timeStr,
cDate: x.timeStr.replace("-", "年").replace("-", "月"),
price: x.price,
b2BMemberPrice: x.price,
b2BPrice: x.price,
b2CMemberPrice: x.price,
id: index,
dateStrS: x.timeStr.substring(0, x.timeStr.length - 3)
};
dateList.push(msg);
// }
});
}
let monthArray = [];
for (var i in dateList) {
var data = dateList[i];
var dateDict = {
mounth: data.dateStr.substring(0, data.dateStr.length - 3)
};
monthArray.push(dateDict);
}
//数组去重,获取有几个月
var hash = {};
monthArray = monthArray.reduce(function (item, next) {
hash[next.mounth] ? "" : (hash[next.mounth] = true && item.push(next));
return item;
}, []);
//数据分组
let classArray = [];
for (var j in monthArray) {
var newArray = new Array();
for (var i in dateList) {
var data = dateList[i];
if (
data.dateStr.substring(0, data.dateStr.length - 3) ==
monthArray[j].mounth
) {
newArray.push(data);
}
}
classArray.push(newArray);
}
this.data.classArray = classArray;
var hash = {};
dateList = dateList.reduce(function (item, next) {
hash[next.dateStrS]
? ""
: (hash[next.dateStrS] = true && item.push(next));
return item;
}, []);
this.setData({
calendarTit: dateList,
classArray: classArray
})
this.calendarCreatCalendar()
},
calendarCreatCalendar() {
this.calendar = this.selectComponent('#calendar');
this.calendar.getYearMonthDay(this.data.classArray);
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
// this.getList() let tit = "机票列表"
console.log(new Date().Format("yyyy-MM-dd")) if (options.sName && options.eName){
tit = options.sName + '——' + options.eName
}
wx.setNavigationBarTitle({
title: tit
})
this.setData({
'getMonthMsg.flithtMonthDate': new Date().Format("yyyy-MM-dd"),
'getMonthMsg.qFlightDateStart': new Date().Format("yyyy-MM-dd")+ " 00:00:00",
"msg.qFlightDateStart": util.AddDays(new Date().Format("yyyy-MM-dd"), 6),
qitianhou: util.AddDays(new Date().Format("yyyy-MM-dd"), 6),
// "getMonthMsg.departure_city": options.sId,
// "getMonthMsg.departure_cityname": options.sName,
// "getMonthMsg.arrival_city": options.eId,
// "getMonthMsg.ticketType": options.type,
// "msg.ticketType": options.type,
})
this.getMinPrice()
this.getForMonthMinPrice()
this.getList()
},
childrenEvent: function (i) {
console.log(i)
this.data.getMonthMsg.flithtMonthDate = i.detail.date_str
this.data.getMonthMsg.qFlightDateStart = i.detail.date_str + " 00:00:00"
this.getMinPrice(i.detail.date_str)
this.openDate()
this.setData({
"msg.qFlightDateStart": i.detail.date_str
})
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
......
{ {
"usingComponents": {} "usingComponents": {
"newCalendar": "/component/newCalendar/newCalendar",
"amount": "/component/amount/amount"
}
} }
\ No newline at end of file
<view class='TicketList commonF'> <view class='TicketList commonF'>
<view class='top-date-box clearfix'> <view class='top-date-box clearfix'>
<scroll-view scroll-x style='white-space: nowrap;' class='date'> <scroll-view scroll-left="{{(leftpx*160) + 'rpx'}}" scroll-x style='white-space: nowrap;' class='date'>
<view class='date-item f22 c11'> <view bindtap='changeMinPrice' class='date-item f22 c11 {{MinPriceListActive === index? "active" : ""}}' data-index="{{index}}" wx:for="{{MinPriceList}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view> <view>
<view>07-11</view> <view>{{item.monthTime}}</view>
<view>今天</view> <view>{{item.week}}</view>
<view>¥3516</view> <view>¥{{item.price}}</view>
</view>
</view>
<view class='date-item f22 c11'>
<view>
<view>07-11</view>
<view>今天</view>
<view>¥3516</view>
</view>
</view>
<view class='date-item f22 c11 '>
<view class='active'>
<view>07-11</view>
<view>今天</view>
<view>¥3516</view>
</view>
</view>
<view class='date-item f22 c11'>
<view>
<view>07-11</view>
<view>今天</view>
<view>¥3516</view>
</view>
</view>
<view class='date-item f22 c11'>
<view>
<view>07-11</view>
<view>今天</view>
<view>¥3516</view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<view class='more-date'> <view class='more-date' bindtap='openDate'>
<view class='date-img'> <view class='date-img'>
<image src='../../../images/product/ico_date.png'></image> <image src='../../../images/product/ico_date.png'></image>
</view> </view>
...@@ -46,59 +18,89 @@ ...@@ -46,59 +18,89 @@
</view> </view>
</view> </view>
</view> </view>
<view class='calen-box' hidden='{{dateBoxShow}}' bindtap='openDate'>
<view catchtap>
<view class='calender-ctrl'>
<text class='btn f28' data-type='a' catchtap='changeMonth'>{{"<"}}</text>
<text class='c99'>{{MonthDate2}}月</text>
<text class='btn f28' data-type='b' catchtap='changeMonth'>{{">"}}</text>
</view>
<newCalendar bind:childrenEvent="childrenEvent" selectIndex="{{selectIndex}}" day="{{MonthDate}}" priceData="{{priceData}}" id="calendar"></newCalendar>
</view>
</view>
<view class='tips-box f22 c66'> <view class='tips-box f22 c66'>
航班起降均为当地时间 航班起降均为当地时间
</view> </view>
<scroll-view scroll-y class='content-box'> <scroll-view scroll-y class='content-box' bindscrolltolower="scrollGetMore">
<view class='list-item'> <view class='list-item' wx:for="{{AirticketList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<text class='item-tag cee f20'>当日最低</text> <!-- <text class='item-tag cee f20'>当日最低</text> -->
<view class='list-item-content clearfix'> <view class='list-item-content clearfix'>
<view class='list-item-left'> <view class='list-item-left' bindtap='closeDetail' data-index='{{index}}'>
<view class='list-item-left-time'> <view class='list-item-left-time'>
<view> <view>
<view class='f40 c11 bold'>03:20</view> <view class='f40 c11 bold'>{{item.flightList[0].departuretime}}</view>
<view class='c99 f24'>双流机场</view> <view class='c99 f24 text1'>{{item.flightList[0].dName}}</view>
</view> </view>
<view class='margin-lr20'> <view class='margin-lr20'>
<image src='../../../images/ticket/big_arr2.png'></image> <image src='../../../images/ticket/big_arr2.png'></image>
<view class='c55 f22 tct zhuan'> <view class='c55 f22 tct zhuan'>
<view>转</view> <view>转</view>
<view>2次</view> <view>{{item.flightList.length}}次</view>
</view> </view>
</view> </view>
<view> <view>
<view class='f40 c11 bold'>03:20</view> <view class='f40 c11 bold'>{{item.flightList[0].arrivaltime}}</view>
<view class='c99 f24'>双流机场</view> <view class='c99 f24 text1'>{{item.flightList[0].aName}}</view>
</view> </view>
<view class='f20 c11'> <view class='f20 c11'>
+1天 +{{item.goIsNextDay}}
</view> </view>
</view> </view>
<view class='name-time c88 f24'> <view class='list-item-left-time'>
<view> <view>
<image src='../../../images/ticket/paixu2_1.png'></image> <view class='f40 c11 bold'>{{item.backFlightList[item.backFlightList.length-1].departuretime}}</view>
<text>四川航空</text> <view class='c99 f24 text1'>{{item.backFlightList[item.backFlightList.length-1].dName}}</view>
</view>
<view class='margin-lr20'>
<image src='../../../images/ticket/big_arr2.png'></image>
<view class='c55 f22 tct zhuan'>
<view>转</view>
<view>{{item.backFlightList.length}}次</view>
</view>
</view> </view>
<view> <view>
<view class='f40 c11 bold'>{{item.backFlightList[item.backFlightList.length-1].arrivaltime}}</view>
<view class='c99 f24 text1'>{{item.backFlightList[item.backFlightList.length-1].aName}}</view>
</view>
<view class='f20 c11'>
+{{item.backIsNextDay}}
</view>
</view>
<view class='name-time c88 f24'>
<view>
<image src='{{item.airlineUrl}}'></image>
<text>{{item.airlineName}} {{item.alCode}}</text>
</view>
<!-- <view>
<image src='../../../images/ticket/shijian.png'></image> <image src='../../../images/ticket/shijian.png'></image>
<text>33h20m</text> <text>33h20m</text>
</view> </view> -->
</view> </view>
</view> </view>
<view class='list-item-right'> <view class='list-item-right'>
<view class='f22 cee'> <view class='f22 cee'>
¥ <text class='f40 blod'>2092</text> ¥ <text class='f40 blod'>{{isLogin!=1 ? item.scatterB2CPrice : item.scatterB2BPrice}}</text>
</view> </view>
<view class='c99 f20'> <view class='c99 f20'>
<view>含税总价</view> <view>{{item.freightSpace == 1 ? "头等舱" : item.freightSpace == 2 ? "商务舱" : "经济舱"}}</view>
<view>含税总价</view>
</view> </view>
<view class='cee f20 shengyu'> <view class='cee f20 shengyu'>
<text>剩3张</text> <text>剩{{item.residue}}张</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class='body_footer'>{{pageIndex >= totalPage ? '没有更多了...' : '上拉获取更多数据'}}</view>
</scroll-view> </scroll-view>
<view class='bottom-btn f24 c11'> <view class='bottom-btn f24 c11'>
<view class='btn-item {{bottomActive === 1 ? "cee" : ""}}' data-index="1" bindtap='cahngeBtnActive'> <view class='btn-item {{bottomActive === 1 ? "cee" : ""}}' data-index="1" bindtap='cahngeBtnActive'>
...@@ -138,7 +140,67 @@ ...@@ -138,7 +140,67 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 详情弹窗 -->
<view wx:if="{{detailShow}}" class='detail-box' bindtap='closeDetail'>
<view>
<image class='close-img' src='../../../images/ticket/close-img.png' catchtap="closeDetail"></image>
<view class='screen-box-top tct c11 f30'>
航班详情
</view>
</view>
<scroll-view scroll-y style='height: 750rpx;position:absolute;bottom:0;padding-bottom:30rpx;'>
<view class='detail-box-tit f22'>
<text class='cee'>去</text>
<text class='c11'>{{detailMsg.goFlightTime}} {{detailMsg.goStartCityName}}-{{detailMsg.goEndCityName}} 共{{detailMsg.goTotalTime}}</text>
</view>
<view wx:for="{{detailMsg.flightList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class='detail-box-item'>
<view class='detail-box-left'>
<view class='f30 c11 bold'>{{item.departuretime}}</view>
<view class='f24 cff'>3小时0分</view>
<view class='f30 c11 bold'>{{item.arrivaltime}}</view>
</view>
<view class='detail-box-right'>
<view class='f28 c11 bold margin-b10'>{{item.dIATA}} {{item.dName}}</view>
<view class='f24 c99 imgs-item'> <image src='{{detailMsg.airlineUrl}}'></image> {{item.alName}}</view>
<view class='f24 cff imgs-item'> 四川航空</view>
<!-- <image src='../../../images/ticket/dafeiji.png'></image> -->
<view class='f28 c11 bold margin-t10'>{{item.aIATA}} {{item.aName}}</view>
</view>
</view>
<view class='detail-box-zhuan f22' wx:if="{{index!==detailMsg.flightList.length -1}}">
<text class='cee'>中转</text>
<text class='c66'>{{item.arrivalCityName}}</text>
<text class='cee'>行李直达</text>
</view>
</view>
<view class='detail-box-tit f22 margin-top30'>
<text class='cee'>返</text>
<text class='c11'>{{detailMsg.backFlightTime}} {{detailMsg.backStartCityName}}-{{detailMsg.backEndCityName}} 共{{detailMsg.backTotalTime}}</text>
</view>
<view wx:for="{{detailMsg.backFlightList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class='detail-box-item'>
<view class='detail-box-left'>
<view class='f30 c11 bold'>{{item.departuretime}}</view>
<view class='f24 cff'>3小时0分</view>
<view class='f30 c11 bold'>{{item.arrivaltime}}</view>
</view>
<view class='detail-box-right'>
<view class='f28 c11 bold margin-b10'>{{item.dIATA}} {{item.dName}}</view>
<view class='f24 c99 imgs-item'> <image src='{{detailMsg.airlineUrl}}'></image> {{item.alName}}</view>
<view class='f24 cff imgs-item'> 四川航空</view>
<!-- <image src='../../../images/ticket/dafeiji.png'></image> -->
<view class='f28 c11 bold margin-t10'>{{item.aIATA}} {{item.aName}}</view>
</view>
</view>
<view class='detail-box-zhuan f22' wx:if="{{index!==detailMsg.backFlightList.length -1}}">
<text class='cee'>中转</text>
<text class='c66'>{{item.arrivalCityName}}</text>
<text class='cee'>行李直达</text>
</view>
</view>
</scroll-view>
</view>
<!-- 筛选弹窗 --> <!-- 筛选弹窗 -->
<view wx:if="{{screenBoxShow}}" class='screen-box' bindtap='closeScreenBox'> <view wx:if="{{screenBoxShow}}" class='screen-box' bindtap='closeScreenBox'>
<view class='screen-box-content' catchtap> <view class='screen-box-content' catchtap>
......
...@@ -8,6 +8,10 @@ ...@@ -8,6 +8,10 @@
width: 90%; width: 90%;
display: flex; display: flex;
} }
.date-item.active view{
background:rgba(238,68,84,1);
color: white;
}
.top-date-box .more-date{ .top-date-box .more-date{
float: left; float: left;
width: 10%; width: 10%;
...@@ -57,6 +61,7 @@ ...@@ -57,6 +61,7 @@
background-color: white; background-color: white;
border-radius:12rpx; border-radius:12rpx;
position: relative; position: relative;
margin-bottom: 20rpx;
} }
.item-tag{ .item-tag{
width:90rpx; width:90rpx;
...@@ -71,15 +76,21 @@ ...@@ -71,15 +76,21 @@
top: 0; top: 0;
} }
.list-item-left{ .list-item-left{
width: 70%; width: 80%;
} }
.list-item-right{ .list-item-right{
width: 30%; width: 20%;
} }
.list-item-left-time{ .list-item-left-time{
display: flex; display: flex;
align-items: center; align-items: center;
} }
.list-item-left-time>view{
width: 40%;
}
.list-item-left-time>view:nth-child(2){
width: 20%;
}
.list-item-left-time image{ .list-item-left-time image{
height: 10rpx; height: 10rpx;
width: 118rpx; width: 118rpx;
...@@ -127,7 +138,7 @@ ...@@ -127,7 +138,7 @@
text-align: center; text-align: center;
} }
.screen-box{ .screen-box,.calen-box,.detail-box{
width: 100%; width: 100%;
height: 100%; height: 100%;
position: fixed; position: fixed;
...@@ -136,6 +147,10 @@ ...@@ -136,6 +147,10 @@
background:rgba(17,17,17, .5); background:rgba(17,17,17, .5);
z-index: 2; z-index: 2;
} }
.calen-box>view{
background-color: white;
padding: 30rpx 0;
}
.screen-box-top{ .screen-box-top{
padding: 30rpx; padding: 30rpx;
} }
...@@ -215,4 +230,92 @@ ...@@ -215,4 +230,92 @@
color: white; color: white;
line-height: 70rpx; line-height: 70rpx;
margin-top: 10rpx; margin-top: 10rpx;
}
.calender-ctrl{
text-align: center;
}
.calender-ctrl .btn{
width: 60rpx;
height: 60rpx;
display: inline-block;
line-height: 60rpx;
color: #ffffff;
font-weight: 700;
text-align: center;
background: rgba(210, 210, 210, 1);
border-radius: 50%;
margin: 0 60rpx;
}
.body_footer{
display: flex;
justify-content: center;
align-items: center;
height: 30px;
font-size: 12px;
color: #666666;
background-color:#F5F5F5;
}
.detail-box>view{
height: 870rpx;
position: absolute;
bottom: 0;
width: 100%;
background-color: white;
}
.detail-box-tit{
background-color: #FFE9EB;
height: 30rpx;
line-height: 30rpx;
border-radius:12rpx 12rpx 0 0;
overflow: hidden;
margin-bottom: 30rpx;
}
.detail-box-tit text:nth-child(1) {
width: 30rpx;
text-align: center;
display: inline-block;
background:rgba(250,199,203,1);
margin-right: 20rpx;
}
.detail-box-item{
display: flex;
}
.detail-box-item .detail-box-left{
width: 25%;
border-right: 4rpx solid #E9E9E9;
padding-right: 30rpx;
text-align: right;
}
.detail-box-item .detail-box-left view:nth-child(2){
margin: 10rpx 0 37rpx 0;
}
.detail-box-item .detail-box-right{
flex: 1;
padding-left: 30rpx;
}
.detail-box-item .detail-box-right view.imgs-item{
display: flex;
align-items: center;
}
.detail-box-item .detail-box-right view.imgs-item image{
width: 24rpx;
height: 24rpx;
margin-right: 15rpx;
}
.margin-b10{
margin-bottom: 10rpx;
}
.margin-t10{
margin-top: 10rpx;
}
.detail-box-zhuan{
margin: 28rpx 0 28rpx 138rpx;
}
.detail-box-zhuan text:nth-child(2){
padding: 0 10rpx;
border-right: 1px solid #CCCCCC;
margin-right: 10rpx;
}
.margin-top30{
margin-top: 30rpx;
} }
\ No newline at end of file
...@@ -10,6 +10,7 @@ Page({ ...@@ -10,6 +10,7 @@ Page({
tcId: null, tcId: null,
orderId: null, orderId: null,
dataList: [], dataList: [],
tipsMsg: ""
}, },
goPage: function (e) { goPage: function (e) {
console.log(e) console.log(e)
...@@ -51,10 +52,9 @@ Page({ ...@@ -51,10 +52,9 @@ Page({
dataList: data dataList: data
}) })
}).catch(err => { }).catch(err => {
wx.showToast({ console.log(err)
title: err.message, this.setData({
icon: 'none', tipsMsg: err.message
duration: 1000
}) })
}) })
return return
......
<view class='page-Voucher'> <view class='page-Voucher commonF'>
<view class='item' wx:for="{{dataList}}" wx:for-index="index" wx:for-item="item" wx:key="index" data-index="{{index}}" bindtap='goPage'> <view wx:if="{{dataList.length>0}}">
<view> <view class='item' wx:for="{{dataList}}" wx:for-index="index" wx:for-item="item" wx:key="index" data-index="{{index}}" bindtap='goPage'>
<text class='name'>{{item.SurName + item.Name}}</text> <view>
<text class='phone'>{{item.MobilePhoneS}}</text> <text class='name'>{{item.SurName + item.Name}}</text>
</view> <text class='phone'>{{item.MobilePhoneS}}</text>
<image mode='widthFix' src='../../images/group/chakn.png'></image> </view>
</view> <image mode='widthFix' src='../../images/group/chakn.png'></image>
</view>
</view>
<view wx:else class='f26' style='width:80%;margin: 2rem auto'>
{{tipsMsg}}
</view>
<!-- <text class='text'>身份确认</text> <!-- <text class='text'>身份确认</text>
<input bindinput='TelPhone' placeholder='请输入手机号以确认身份'></input> <input bindinput='TelPhone' placeholder='请输入手机号以确认身份'></input>
<button class='next {{telPhone !== "" ? "active" : ""}}' type="default" size="mini" bindtap="Details">确认</button> --> <button class='next {{telPhone !== "" ? "active" : ""}}' type="default" size="mini" bindtap="Details">确认</button> -->
......
...@@ -143,7 +143,7 @@ Page({ ...@@ -143,7 +143,7 @@ Page({
if (tagItem[i].active) { if (tagItem[i].active) {
this.data.listmsg.tags.push(tagItem[i].id) this.data.listmsg.tags.push(tagItem[i].id)
} }
} }
this.setData({ this.setData({
listmsg: this.data.listmsg, listmsg: this.data.listmsg,
showBox: false, showBox: false,
...@@ -155,8 +155,17 @@ Page({ ...@@ -155,8 +155,17 @@ Page({
data[i].tagList = data[i].tagTames.split(","); data[i].tagList = data[i].tagTames.split(",");
} }
} }
let arr = this.data.AirticketList;
let arr2 = data;
if (type) {
for (let i = 0; i < data.length; i++) {
arr.push(data[i])
}
} else {
arr = arr2
}
this.setData({ this.setData({
dataList: res.pageData, dataList: arr,
totalPage: res.pageCount ? res.pageCount : 1, totalPage: res.pageCount ? res.pageCount : 1,
pageIndex: res.pageIndex ? res.pageIndex : 1, pageIndex: res.pageIndex ? res.pageIndex : 1,
}) })
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class='searcj-box'> <view class='searcj-box'>
<search></search> <search></search>
</view> </view>
<scroll-view scroll-x style="height: 180rpx;width: 100%; white-space: nowrap; padding-left: 30rpx;"> <scroll-view scroll-x style="height: 180rpx;width: 100%; white-space: nowrap; padding-left: 30rpx;" bindscrolltolower="scrollGetMore">
<view class='top-scroll-nav'> <view class='top-scroll-nav'>
<view class='top-scroll-nav-item {{CountryId == item.id ? "active" : "" }}' data-id="{{item.id}}" bindtap='setCountry' wx:for="{{hotcountry}}" wx:for-item="item" wx:for-index="index" wx:key="index"> <view class='top-scroll-nav-item {{CountryId == item.id ? "active" : "" }}' data-id="{{item.id}}" bindtap='setCountry' wx:for="{{hotcountry}}" wx:for-item="item" wx:for-index="index" wx:key="index">
<view class='img-box'> <view class='img-box'>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"current": 15, "current": 1,
"list": [ "list": [
{ {
"id": 2, "id": 2,
...@@ -49,10 +49,10 @@ ...@@ -49,10 +49,10 @@
"scene": null "scene": null
}, },
{ {
"id": 3, "id": 1,
"name": "调查", "name": "调查",
"pathName": "pages/Voucher/Voucher", "pathName": "pages/Voucher/Voucher",
"query": "", "query": "tcid=3922",
"scene": null "scene": null
}, },
{ {
......
...@@ -8,6 +8,20 @@ const formatTime = date => { ...@@ -8,6 +8,20 @@ const formatTime = date => {
return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':') return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
} }
// 获取7天后是啥时候
const AddDays = (date, days) =>{
var nd = new Date(date);
nd = nd.valueOf();
nd = nd + days * 24 * 60 * 60 * 1000;
nd = new Date(nd);
var y = nd.getFullYear();
var m = nd.getMonth() + 1;
var d = nd.getDate();
if (m <= 9) m = "0" + m;
if (d <= 9) d = "0" + d;
var cdate = y + "-" + m + "-" + d;
return cdate;
}
const YYMMDD = date => { const YYMMDD = date => {
const year = date.getFullYear() const year = date.getFullYear()
const month = date.getMonth() + 1 const month = date.getMonth() + 1
...@@ -70,11 +84,66 @@ Date.prototype.Format = function (fmt) { ...@@ -70,11 +84,66 @@ Date.prototype.Format = function (fmt) {
} }
return fmt; return fmt;
} }
// 上个月
const getPreMonth = (date) => {
var arr = date.split('-');
var year = arr[0]; //获取当前日期的年份
var month = arr[1]; //获取当前日期的月份
var day = arr[2]; //获取当前日期的日
var days = new Date(year, month, 0);
days = days.getDate(); //获取当前日期中月的天数
var year2 = year;
var month2 = parseInt(month) - 1;
if (month2 == 0) {
year2 = parseInt(year2) - 1;
month2 = 12;
}
var day2 = day;
var days2 = new Date(year2, month2, 0);
days2 = days2.getDate();
if (day2 > days2) {
day2 = days2;
}
if (month2 < 10) {
month2 = '0' + month2;
}
var t2 = year2 + '-' + month2 + '-' + day2;
return t2;
}
//下个月
const getNextMonth = (date) => {
var arr = date.split('-');
var year = arr[0]; //获取当前日期的年份
var month = arr[1]; //获取当前日期的月份
var day = arr[2]; //获取当前日期的日
var days = new Date(year, month, 0);
days = days.getDate(); //获取当前日期中的月的天数
var year2 = year;
var month2 = parseInt(month) + 1;
if (month2 == 13) {
year2 = parseInt(year2) + 1;
month2 = 1;
}
var day2 = day;
var days2 = new Date(year2, month2, 0);
days2 = days2.getDate();
if (day2 > days2) {
day2 = days2;
}
if (month2 < 10) {
month2 = '0' + month2;
}
var t2 = year2 + '-' + month2 + '-' + day2;
return t2;
}
module.exports = { module.exports = {
formatTime: formatTime, formatTime: formatTime,
CompareDate: CompareDate, CompareDate: CompareDate,
YYMMDD: YYMMDD, YYMMDD: YYMMDD,
changeMonth: changeMonth, changeMonth: changeMonth,
YYMM: YYMM, YYMM: YYMM,
getDays: getDays getDays: getDays,
AddDays: AddDays,
getNextMonth: getNextMonth,
getPreMonth: getPreMonth,
} }
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