Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
FlashMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
华国豪
FlashMan
Commits
2dcabb44
Commit
2dcabb44
authored
Jul 17, 2019
by
huangyuanyuan
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
8b04d869
e1bde05d
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1083 additions
and
77 deletions
+1083
-77
Common.wxss
Common.wxss
+3
-0
app.json
app.json
+2
-0
ChDateNum.wxml
pages/GroupTour/ChDateNum/ChDateNum.wxml
+0
-1
Ticket.js
pages/Ticket/Ticket.js
+17
-1
Ticket.wxml
pages/Ticket/Ticket.wxml
+3
-3
TicketList.js
pages/Ticket/TicketList/TicketList.js
+357
-7
TicketList.json
pages/Ticket/TicketList/TicketList.json
+4
-1
TicketList.wxml
pages/Ticket/TicketList/TicketList.wxml
+256
-2
TicketList.wxss
pages/Ticket/TicketList/TicketList.wxss
+322
-1
Voucher.js
pages/Voucher/Voucher.js
+4
-4
Voucher.wxml
pages/Voucher/Voucher.wxml
+13
-8
visaList.js
pages/visa/visaList/visaList.js
+11
-2
visaList.wxml
pages/visa/visaList/visaList.wxml
+1
-1
project.config.json
project.config.json
+3
-44
util.js
utils/util.js
+87
-2
No files found.
Common.wxss
View file @
2dcabb44
...
...
@@ -2,6 +2,9 @@
color:#000000;
background: #fff;
}
.commonF .cff{
color: #fff;
}
#searchView{
height: 70rpx;
width: 100%;
...
...
app.json
View file @
2dcabb44
...
...
@@ -39,6 +39,7 @@
"pages/Voucher/write/write"
,
"pages/Ticket/Ticket"
,
"pages/Ticket/TicketList/TicketList"
,
"pages/Ticket/TicketDate/TicketDate"
,
"pages/login/smsLogin/smsLogin"
,
"pages/login/revisePwd/revisePwd"
,
"pages/product/SametradeZW/prizelist/prizelist"
,
...
...
@@ -54,6 +55,7 @@
"pages/product/SametradeZW/Applicationnotes/Applicationnotes"
,
"pages/product/SametradeZW/Successview/Successview"
,
"component/amount/amount"
,
"component/newCalendar/newCalendar"
,
"pages/activity/activity"
,
"pages/local/TicketOrder/TicketOrder"
,
"pages/local/LocalFoodDetails/LocalFoodDetails"
,
...
...
pages/GroupTour/ChDateNum/ChDateNum.wxml
View file @
2dcabb44
...
...
@@ -7,7 +7,6 @@
<view>{{item.date}}</view>
<view wx:if="{{index<1}}" wx:key="index2" wx:for="{{item.datalist}}" wx:for-item="pre">¥{{pre.b2BPrice}}起</view>
</view>
</scroll-view>
<!-- 日历 -->
<view style="padding-bottom:10rpx">
...
...
pages/Ticket/Ticket.js
View file @
2dcabb44
...
...
@@ -44,11 +44,20 @@ Page({
cr
:
0
,
child
:
0
,
ye
:
0
,
lr
:
0
lr
:
0
,
arrivalName
:
''
,
departureName
:
''
},
countryHidden
:
false
,
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
)
{
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
detail
.
value
)
this
.
setData
({
...
...
@@ -73,9 +82,16 @@ Page({
type
:
type
})
},
changeTiketType
:
function
(
e
){
let
type
=
Number
(
e
.
currentTarget
.
dataset
.
type
)
this
.
setData
({
"msg.ticketType"
:
type
})
},
selectCity
(
val
)
{
let
that
=
this
;
let
vastr
=
val
.
detail
;
console
.
log
(
vastr
)
if
(
that
.
data
.
type
==
"start"
)
{
that
.
data
.
msg
.
departure_city
=
vastr
.
id
;
that
.
data
.
msg
.
departureName
=
vastr
.
name
;
...
...
pages/Ticket/Ticket.wxml
View file @
2dcabb44
...
...
@@ -7,8 +7,8 @@
</view>
<view class="Choose">
<view class="Title flex">
<view class="{{msg.ticketType==1?'Active':''}}">单程</view>
<view class="{{msg.ticketType==2?'Active':''}}">往返</view>
<view
data-type='1' bindtap='changeTiketType'
class="{{msg.ticketType==1?'Active':''}}">单程</view>
<view
data-type='2' bindtap='changeTiketType'
class="{{msg.ticketType==2?'Active':''}}">往返</view>
</view>
<view class="city flexb">
<view style="width:200rpx" bindtap="getCity" data-type="start">出发:{{msg.departureName}}</view>
...
...
@@ -39,7 +39,7 @@
</radio-group>
</view>
</view>
<view class="btn">
<view class="btn"
bindtap='seachTiket'
>
搜索
</view>
</view>
...
...
pages/Ticket/TicketList/TicketList.js
View file @
2dcabb44
// pages/Ticket/TicketList/TicketList.js
let
app
=
getApp
();
var
util
=
require
(
'../../../utils/util.js'
)
Page
({
/**
* 页面的初始数据
*/
data
:
{
isLogin
:
app
.
isLogin
,
screenList
:[
{
name
:
'航空公司'
,
id
:
1
,
},
{
name
:
'舱位'
,
id
:
2
,
}
],
cangweiList
:
[
{
title
:
"头等舱"
,
id
:
1
},
{
title
:
"商务舱"
,
id
:
2
},
{
title
:
"经济舱"
,
id
:
3
}
],
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
id
:
0
,
qFlightDateStart
:
util
.
YYMMDD
(
new
Date
()),
qFlightDateEnd
:
""
,
flight_number
:
""
,
airLineID
:
0
,
ticketType
:
2
,
lineId
:
0
,
isPayOrder
:
0
,
departure_city
:
0
,
departure_cityname
:
""
,
arrival_city
:
0
,
arrival_cityname
:
""
,
freightSpace
:
0
,
airTicketScatterNum
:
0
,
flithtMonthDate
:
new
Date
().
Format
(
"yyyy-MM"
),
timeSort
:
0
,
priceSort
:
0
,
},
airlineList
:
[],
bottomActive
:
1
,
screenBoxShow
:
false
,
screenID
:
1
,
getMonthMsg
:{
id
:
0
,
flithtMonthDate
:
''
,
flight_number
:
''
,
airLineID
:
0
,
ticketType
:
2
,
lineId
:
0
,
isPayOrder
:
0
,
freightSpace
:
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
=>
{
})
},
//切换月份
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
)
{
let
id
=
Number
(
e
.
currentTarget
.
dataset
.
id
)
this
.
setData
({
'msg.freightSpace'
:
id
})
},
// 筛选项切换
changeScreenList
:
function
(
e
)
{
let
id
=
Number
(
e
.
currentTarget
.
dataset
.
id
)
this
.
setData
({
screenID
:
id
})
},
// 航空公司筛选
changeAirline
:
function
(
e
)
{
let
id
=
Number
(
e
.
currentTarget
.
dataset
.
id
)
this
.
setData
({
'msg.airLineID'
:
id
})
},
// 关闭筛选框
closeScreenBox
:
function
(){
this
.
setData
({
screenBoxShow
:
false
})
},
// 航空公司下拉框
initAirlines
:
function
()
{
app
.
$api
(
'airline_get_GetB2BAirLineList'
,
{}).
then
(
res
=>
{
this
.
setData
({
airlineList
:
res
})
}).
catch
(
err
=>
{
});
},
//底部按钮监听
cahngeBtnActive
:
function
(
e
)
{
let
index
=
e
.
currentTarget
.
dataset
.
index
;
console
.
log
(
index
==
3
)
let
priceSort
=
index
==
2
?
1
:
0
let
timeSort
=
index
==
3
?
1
:
0
this
.
setData
({
bottomActive
:
Number
(
index
),
'msg.timeSort'
:
timeSort
,
'msg.priceSort'
:
priceSort
})
if
(
index
==
4
)
{
this
.
setData
({
screenBoxShow
:
true
})
}
else
{
this
.
getList
()
}
},
//获取月日历
getForMonthMinPrice
:
function
()
{
app
.
$apiJavaData
(
"api/dmc/airticket/getB2BAirticketForMonthMinPrice"
,
this
.
data
.
msg
).
then
(
res
=>
{
this
.
creatCalendar
(
res
.
data
)
}).
catch
(
err
=>
{
})
},
// 获取上面一坨日历
getMinPrice
:
function
(
date
)
{
app
.
$apiJavaData
(
"api/dmc/airticket/getB2BAirticketForMinPrice"
,
this
.
data
.
getMonthMsg
).
then
(
res
=>
{
this
.
setData
({
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
=>
{
})
},
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
)
{
let
tit
=
"机票列表"
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
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
...
...
pages/Ticket/TicketList/TicketList.json
View file @
2dcabb44
{
"usingComponents"
:
{}
"usingComponents"
:
{
"newCalendar"
:
"/component/newCalendar/newCalendar"
,
"amount"
:
"/component/amount/amount"
}
}
\ No newline at end of file
pages/Ticket/TicketList/TicketList.wxml
View file @
2dcabb44
<!--pages/Ticket/TicketList/TicketList.wxml-->
<text>pages/Ticket/TicketList/TicketList.wxml</text>
<view class='TicketList commonF'>
<view class='top-date-box clearfix'>
<scroll-view scroll-left="{{(leftpx*160) + 'rpx'}}" scroll-x style='white-space: nowrap;' class='date'>
<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>{{item.monthTime}}</view>
<view>{{item.week}}</view>
<view>¥{{item.price}}</view>
</view>
</view>
</scroll-view>
<view class='more-date' bindtap='openDate'>
<view class='date-img'>
<image src='../../../images/product/ico_date.png'></image>
</view>
<view class='arr-img'>
<image src='../../../images/product/arr_bottom.png'></image>
</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>
<scroll-view scroll-y class='content-box' bindscrolltolower="scrollGetMore">
<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> -->
<view class='list-item-content clearfix'>
<view class='list-item-left' bindtap='closeDetail' data-index='{{index}}'>
<view class='list-item-left-time'>
<view>
<view class='f40 c11 bold'>{{item.flightList[0].departuretime}}</view>
<view class='c99 f24 text1'>{{item.flightList[0].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.flightList.length}}次</view>
</view>
</view>
<view>
<view class='f40 c11 bold'>{{item.flightList[0].arrivaltime}}</view>
<view class='c99 f24 text1'>{{item.flightList[0].aName}}</view>
</view>
<view class='f20 c11'>
+{{item.goIsNextDay}}
</view>
</view>
<view class='list-item-left-time'>
<view>
<view class='f40 c11 bold'>{{item.backFlightList[item.backFlightList.length-1].departuretime}}</view>
<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 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>
<text>33h20m</text>
</view> -->
</view>
</view>
<view class='list-item-right'>
<view class='f22 cee'>
¥ <text class='f40 blod'>{{isLogin!=1 ? item.scatterB2CPrice : item.scatterB2BPrice}}</text>
</view>
<view class='c99 f20'>
<view>{{item.freightSpace == 1 ? "头等舱" : item.freightSpace == 2 ? "商务舱" : "经济舱"}}</view>
</view>
<view class='cee f20 shengyu'>
<text>剩{{item.residue}}张</text>
</view>
</view>
</view>
</view>
<view class='body_footer'>{{pageIndex >= totalPage ? '没有更多了...' : '上拉获取更多数据'}}</view>
</scroll-view>
<view class='bottom-btn f24 c11'>
<view class='btn-item {{bottomActive === 1 ? "cee" : ""}}' data-index="1" bindtap='cahngeBtnActive'>
<view>
<image wx:if="{{bottomActive!==1}}" src='../../../images/ticket/paixu1.png'></image>
<image wx:if="{{bottomActive===1}}" src='../../../images/ticket/paixu1_1.png'></image>
</view>
<view>
推荐排序
</view>
</view>
<view class='btn-item {{bottomActive === 2 ? "cee" : ""}}' data-index="2" bindtap='cahngeBtnActive'>
<view>
<image wx:if="{{bottomActive!==2}}" src='../../../images/ticket/paixu2.png'></image>
<image wx:if="{{bottomActive===2}}" src='../../../images/ticket/paixu2_1.png'></image>
</view>
<view>
低价优先
</view>
</view>
<view class='btn-item {{bottomActive === 3 ? "cee" : ""}}' data-index="3" bindtap='cahngeBtnActive'>
<view>
<image wx:if="{{bottomActive!==3}}" src='../../../images/ticket/paixu3.png'></image>
<image wx:if="{{bottomActive===3}}" src='../../../images/ticket/paixu3_1.png'></image>
</view>
<view>
时间排序
</view>
</view>
<view class='btn-item {{bottomActive === 4 ? "cee" : ""}}' data-index="4" bindtap='cahngeBtnActive'>
<view>
<image wx:if="{{bottomActive!==4}}" src='../../../images/ticket/paixu4.png'></image>
<image wx:if="{{bottomActive===4}}" src='../../../images/ticket/paixu4_1.png'></image>
</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 class='screen-box-content' catchtap>
<image class='close-img' src='../../../images/ticket/close-img.png' catchtap="closeScreenBox"></image>
<view class='screen-box-top tct c11 f30'>
筛选
</view>
<view class='screen-list'>
<view class='left-type'>
<view class='c11 f28 {{item.id === screenID ? "active" : ""}}' wx:for="{{screenList}}" wx:for-index="index" wx:for-item="item" wx:key="index" bindtap='changeScreenList' data-id="{{item.id}}">{{item.name}}</view>
</view>
<scroll-view class='right-list' scroll-y>
<view class='airline-list' hidden='{{screenID!==1}}'>
<view class='airline-list-item' catchtap='changeAirline' data-id="0">
<text class='f28 {{msg.airLineID === 0 ? "cee" : ""}}'>不限</text>
<view>
<image wx:if="{{msg.airLineID === 0}}" class='xuanzhong' src='/images/visa/xunazhong.png'></image>
<view wx:else class='raduis'></view>
</view>
</view>
<view class='airline-list-item' wx:for="{{airlineList}}" wx:for-index="index" wx:for-item="item" wx:key="index" catchtap='changeAirline' data-id="{{item.AirLineId}}">
<text class='f28 {{msg.airLineID === item.AirLineId ? "cee" : ""}}'>{{item.AlName}}</text>
<view>
<image wx:if="{{msg.airLineID === item.AirLineId}}" class='xuanzhong' src='/images/visa/xunazhong.png'></image>
<view wx:else class='raduis'></view>
</view>
</view>
</view>
<view class='airline-list' hidden='{{screenID!==2}}'>
<view class='airline-list-item' catchtap='changeCangwei' data-id="0">
<text class='f28 {{msg.freightSpace === 0 ? "cee" : ""}}'>不限</text>
<view>
<image wx:if="{{msg.freightSpace === 0}}" class='xuanzhong' src='/images/visa/xunazhong.png'></image>
<view wx:else class='raduis'></view>
</view>
</view>
<view class='airline-list-item' wx:for="{{cangweiList}}" wx:for-index="index" wx:for-item="item" wx:key="index" catchtap='changeCangwei' data-id="{{item.id}}">
<text class='f28 {{msg.freightSpace === item.id ? "cee" : ""}}'>{{item.title}}</text>
<view>
<image wx:if="{{msg.freightSpace === item.id}}" class='xuanzhong' src='/images/visa/xunazhong.png'></image>
<view wx:else class='raduis'></view>
</view>
</view>
</view>
</scroll-view>
</view>
<view class='screen-btn '>
<text class='f28' catchtap='getList'>查看结果</text>
</view>
</view>
</view>
</view>
pages/Ticket/TicketList/TicketList.wxss
View file @
2dcabb44
/* pages/Ticket/TicketList/TicketList.wxss */
\ No newline at end of file
.top-date-box{
padding: 17rpx 0;
background-color: #fff;
display: flex;
}
.top-date-box .date{
float: left;
width: 90%;
display: flex;
}
.date-item.active view{
background:rgba(238,68,84,1);
color: white;
}
.top-date-box .more-date{
float: left;
width: 10%;
text-align: center;
padding-top: 20rpx;
border-left: 2rpx solid #f5f5f5;
}
.top-date-box .date .date-item{
width: 160rpx;
text-align: center;
padding: 14rpx 16rpx;
border-radius: 4rpx;
display: inline-block;
}
.top-date-box .date .date-item .active{
color: #fff;
background-color: #EE4454;
}
.date-img,.arr-img{
height: 30rpx;
}
.date-img image,.btn-item image{
width: 30rpx;
height: 30rpx;
}
.arr-img image{
width: 20rpx;
height: 10rpx;
}
.tips-box{
height: 60rpx;
line-height: 60rpx;
text-align: center;
background-color: #f5f5f5;
}
.content-box{
height:calc(100vh - 322rpx);
background-color: #f5f5f5;
padding: 0 30rpx;
}
.list-item-content{
display: flex;
align-items: center;
}
.list-item{
padding: 30rpx;
background-color: white;
border-radius:12rpx;
position: relative;
margin-bottom: 20rpx;
}
.item-tag{
width:90rpx;
height:28rpx;
background:rgba(250,199,203,1);
border-radius:0px 0px 4rpx 4rpx;
display: inline-block;
text-align: center;
line-height: 28rpx;
position: absolute;
left: 30rpx;
top: 0;
}
.list-item-left{
width: 80%;
}
.list-item-right{
width: 20%;
}
.list-item-left-time{
display: flex;
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{
height: 10rpx;
width: 118rpx;
}
.zhuan{
margin-top: -40rpx;
}
.list-item-right{
text-align: right;
}
.shengyu text{
display: inline-block;
width: 70rpx;
height: 30rpx;
line-height: 30rpx;
background: rgba(255,255,255,1);
border: 1px solid rgba(238, 68, 84, 1);
border-radius: 3rpx;
text-align: center;
}
.name-time{
margin-top: 15rpx;
display: flex;
align-items: center;
}
.name-time image{
width: 24rpx;
height: 24rpx;
margin-right: 10rpx;
}
.name-time view{
margin-right: 30rpx;
}
.margin-lr20{
margin: 0 30rpx;
}
.bottom-btn{
height:100rpx;
border-top: 1px solid #f5f5f5;
display: flex;
align-items: center;
justify-content: space-around;
}
.bottom-btn .btn-item{
text-align: center;
}
.screen-box,.calen-box,.detail-box{
width: 100%;
height: 100%;
position: fixed;
left: 0;
top: 0;
background:rgba(17,17,17, .5);
z-index: 2;
}
.calen-box>view{
background-color: white;
padding: 30rpx 0;
}
.screen-box-top{
padding: 30rpx;
}
.screen-box-content{
height: 90%;
width: 100%;
position: absolute;
bottom: 0;
left: 0;
background-color: white;
border-radius:12rpx 12rpx 0px 0px;
}
.close-img{
width: 30rpx;
height: 30rpx;
position: absolute;
right: 30rpx;
top: 30rpx;
}
.screen-list{
height: 900rpx;
display: flex;
border-top: 1px solid rgba(233,233,233,1);
}
.screen-list .left-type{
width: 20%;
background-color: rgba(246,247,250,1);
}
.screen-list .left-type>view{
border-bottom: 1px solid rgba(233,233,233,1);
border-right: 1px solid rgba(233,233,233,1);
background-color: rgba(246,247,250,1);
}
.screen-list .left-type view.active{
border-right: 0;
background-color: #fff;
}
.screen-list .right-list{
width: 80%;
padding: 0 20rpx;
}
.left-type>view{
height: 87rpx;
text-align: center;
line-height: 87rpx;
}
.airline-list-item{
display: flex;
align-items: center;
height: 87rpx;
line-height: 87rpx;
justify-content: space-between;
border-bottom: 1px solid rgba(233,233,233,1);
}
.raduis{
width:34rpx;
height:34rpx;
border-radius: 50%;
border:1px solid rgba(153, 153, 153, 1);
}
.xuanzhong{
width: 34rpx;
height: 34rpx;
}
.screen-btn{
height: 110rpx;
text-align: right;
padding-right: 30rpx;
}
.screen-btn text{
display: inline-block;
width: 400rpx;
height: 70rpx;
background:rgba(238,68,84,1);
border-radius: 35rpx;
text-align: center;
color: white;
line-height: 70rpx;
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;
}
pages/Voucher/Voucher.js
View file @
2dcabb44
...
...
@@ -10,6 +10,7 @@ Page({
tcId
:
null
,
orderId
:
null
,
dataList
:
[],
tipsMsg
:
""
},
goPage
:
function
(
e
)
{
console
.
log
(
e
)
...
...
@@ -51,10 +52,9 @@ Page({
dataList
:
data
})
}).
catch
(
err
=>
{
wx
.
showToast
({
title
:
err
.
message
,
icon
:
'none'
,
duration
:
1000
console
.
log
(
err
)
this
.
setData
({
tipsMsg
:
err
.
message
})
})
return
...
...
pages/Voucher/Voucher.wxml
View file @
2dcabb44
<view class='page-Voucher'>
<view class='page-Voucher commonF'>
<view wx:if="{{dataList.length>0}}">
<view class='item' wx:for="{{dataList}}" wx:for-index="index" wx:for-item="item" wx:key="index" data-index="{{index}}" bindtap='goPage'>
<view>
<text class='name'>{{item.SurName + item.Name}}</text>
...
...
@@ -6,6 +7,10 @@
</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>
<input bindinput='TelPhone' placeholder='请输入手机号以确认身份'></input>
<button class='next {{telPhone !== "" ? "active" : ""}}' type="default" size="mini" bindtap="Details">确认</button> -->
...
...
pages/visa/visaList/visaList.js
View file @
2dcabb44
...
...
@@ -155,8 +155,17 @@ Page({
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
({
dataList
:
res
.
pageData
,
dataList
:
arr
,
totalPage
:
res
.
pageCount
?
res
.
pageCount
:
1
,
pageIndex
:
res
.
pageIndex
?
res
.
pageIndex
:
1
,
})
...
...
pages/visa/visaList/visaList.wxml
View file @
2dcabb44
...
...
@@ -2,7 +2,7 @@
<view class='searcj-box'>
<search></search>
</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-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'>
...
...
project.config.json
View file @
2dcabb44
...
...
@@ -39,7 +39,7 @@
"list"
:
[]
},
"miniprogram"
:
{
"current"
:
2
1
,
"current"
:
1
,
"list"
:
[
{
"id"
:
2
,
...
...
@@ -49,10 +49,10 @@
"scene"
:
null
},
{
"id"
:
3
,
"id"
:
1
,
"name"
:
"调查"
,
"pathName"
:
"pages/Voucher/Voucher"
,
"query"
:
""
,
"query"
:
"
tcid=3922
"
,
"scene"
:
null
},
{
...
...
@@ -152,47 +152,6 @@
"pathName"
:
"pages/GroupTour/FillOrder/FillOrder"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"幸福存折"
,
"pathName"
:
"pages/mine/Happypassbook/Happypassbook"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"首页"
,
"pathName"
:
"pages/Home/home"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"幸福存折明细"
,
"pathName"
:
"pages/mine/UseDetails/UseDetails"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"登录"
,
"pathName"
:
"pages/login/login"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"支付"
,
"pathName"
:
"pages/Pay/Pay"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"定制游"
,
"pathName"
:
"pages/freeTravel/PersonalTailor/PersonalTailor"
,
"scene"
:
null
}
]
}
...
...
utils/util.js
View file @
2dcabb44
...
...
@@ -8,6 +8,20 @@ const formatTime = date => {
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
year
=
date
.
getFullYear
()
const
month
=
date
.
getMonth
()
+
1
...
...
@@ -53,12 +67,83 @@ const getDays = (year, month)=>{
var
d
=
new
Date
(
year
,
month
,
0
);
return
d
.
getDate
();
}
// 时间格式化
Date
.
prototype
.
Format
=
function
(
fmt
)
{
var
o
=
{
"M+"
:
this
.
getMonth
()
+
1
,
//月份
"d+"
:
this
.
getDate
(),
//日
"h+"
:
this
.
getHours
(),
//小时
"m+"
:
this
.
getMinutes
(),
//分
"s+"
:
this
.
getSeconds
()
//秒
};
if
(
/
(
y+
)
/
.
test
(
fmt
))
{
//根据y的长度来截取年
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
this
.
getFullYear
()
+
""
).
substr
(
4
-
RegExp
.
$1
.
length
));
}
for
(
var
k
in
o
)
{
if
(
new
RegExp
(
"("
+
k
+
")"
).
test
(
fmt
))
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
RegExp
.
$1
.
length
==
1
)
?
(
o
[
k
])
:
((
"00"
+
o
[
k
]).
substr
((
""
+
o
[
k
]).
length
)));
}
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
=
{
formatTime
:
formatTime
,
CompareDate
:
CompareDate
,
YYMMDD
:
YYMMDD
,
changeMonth
:
changeMonth
,
YYMM
:
YYMM
,
getDays
:
getDays
getDays
:
getDays
,
AddDays
:
AddDays
,
getNextMonth
:
getNextMonth
,
getPreMonth
:
getPreMonth
,
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment