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
1b3d3a96
Commit
1b3d3a96
authored
Jul 16, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
c67c904a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
609 additions
and
105 deletions
+609
-105
Common.wxss
Common.wxss
+3
-0
app.js
app.js
+7
-7
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
+249
-16
TicketList.json
pages/Ticket/TicketList/TicketList.json
+4
-1
TicketList.wxml
pages/Ticket/TicketList/TicketList.wxml
+116
-54
TicketList.wxss
pages/Ticket/TicketList/TicketList.wxss
+106
-3
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
-3
util.js
utils/util.js
+70
-1
No files found.
Common.wxss
View file @
1b3d3a96
...
...
@@ -2,6 +2,9 @@
color:#000000;
background: #fff;
}
.commonF .cff{
color: #fff;
}
#searchView{
height: 70rpx;
width: 100%;
...
...
app.js
View file @
1b3d3a96
...
...
@@ -51,8 +51,8 @@ App({
let
timestamp
=
(
new
Date
()).
valueOf
()
let
sign
=
md5
(
'cmd='
+
url
+
'&'
+
'msg='
+
encodeURIComponent
(
data
).
toLowerCase
()
+
'&'
+
'timestamp='
+
timestamp
+
'&'
+
'token='
+
getApp
().
state
.
admin
.
token
+
'&'
+
'key='
+
''
)
wx
.
request
({
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.214:8082/api/Common/Post',
url
:
'http://192.168.2.65:8025/api/Common/Post'
,
//春姐
// url: 'https://reborn.oytour.com/api/common/post', //线上
// url: ' http://test.viitto.com/api/common/post',
...
...
@@ -73,11 +73,11 @@ App({
url
:
'/pages/login/login'
})
}
else
{
wx
.
showToast
({
title
:
res
.
data
.
message
,
icon
:
'none'
,
duration
:
1000
})
//
wx.showToast({
//
title: res.data.message,
//
icon: 'none',
//
duration: 1000
//
})
reject
(
res
.
data
)
}
}
...
...
app.json
View file @
1b3d3a96
...
...
@@ -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 @
1b3d3a96
...
...
@@ -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 @
1b3d3a96
...
...
@@ -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 @
1b3d3a96
...
...
@@ -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 @
1b3d3a96
...
...
@@ -6,6 +6,7 @@ Page({
* 页面的初始数据
*/
data
:
{
isLogin
:
app
.
isLogin
,
screenList
:[
{
name
:
'航空公司'
,
...
...
@@ -38,13 +39,13 @@ Page({
arrival_cityname
:
""
,
freightSpace
:
0
,
airTicketScatterNum
:
0
,
flithtMonthDate
:
''
,
flithtMonthDate
:
new
Date
().
Format
(
"yyyy-MM"
)
,
timeSort
:
0
,
priceSort
:
0
,
},
airlineList
:
[],
bottomActive
:
1
,
screenBoxShow
:
tru
e
,
screenBoxShow
:
fals
e
,
screenID
:
1
,
getMonthMsg
:{
id
:
0
,
...
...
@@ -54,13 +55,133 @@ Page({
ticketType
:
2
,
lineId
:
0
,
isPayOrder
:
0
,
departure_city
:
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
=>
{
})
},
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
)
{
...
...
@@ -83,6 +204,7 @@ Page({
'msg.airLineID'
:
id
})
},
// 关闭筛选框
closeScreenBox
:
function
(){
this
.
setData
({
screenBoxShow
:
false
...
...
@@ -91,7 +213,6 @@ Page({
// 航空公司下拉框
initAirlines
:
function
()
{
app
.
$api
(
'airline_get_GetB2BAirLineList'
,
{}).
then
(
res
=>
{
console
.
log
(
res
)
this
.
setData
({
airlineList
:
res
})
...
...
@@ -100,8 +221,9 @@ Page({
//底部按钮监听
cahngeBtnActive
:
function
(
e
)
{
let
index
=
e
.
currentTarget
.
dataset
.
index
;
let
timeSort
=
index
==
2
?
1
:
0
let
priceSort
=
index
==
3
?
1
:
0
console
.
log
(
index
==
3
)
let
priceSort
=
index
==
2
?
1
:
0
let
timeSort
=
index
==
3
?
1
:
0
this
.
setData
({
bottomActive
:
Number
(
index
),
'msg.timeSort'
:
timeSort
,
...
...
@@ -115,23 +237,134 @@ Page({
this
.
getList
()
}
},
// 获取数据
getList
:
function
()
{
app
.
$apiJavaData
(
"api/dmc/airticket/getB2BAirticketForMinPrice"
,
this
.
data
.
msg
).
then
(
res
=>
{
console
.
log
(
res
)
//获取月日历
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
({
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
=>
{
})
},
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
)
{
// this.getList()
console
.
log
(
new
Date
().
Format
(
"yyyy-MM-dd"
))
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 @
1b3d3a96
{
"usingComponents"
:
{}
"usingComponents"
:
{
"newCalendar"
:
"/component/newCalendar/newCalendar"
,
"amount"
:
"/component/amount/amount"
}
}
\ No newline at end of file
pages/Ticket/TicketList/TicketList.wxml
View file @
1b3d3a96
This diff is collapsed.
Click to expand it.
pages/Ticket/TicketList/TicketList.wxss
View file @
1b3d3a96
...
...
@@ -8,6 +8,10 @@
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%;
...
...
@@ -57,6 +61,7 @@
background-color: white;
border-radius:12rpx;
position: relative;
margin-bottom: 20rpx;
}
.item-tag{
width:90rpx;
...
...
@@ -71,15 +76,21 @@
top: 0;
}
.list-item-left{
width:
7
0%;
width:
8
0%;
}
.list-item-right{
width:
3
0%;
width:
2
0%;
}
.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;
...
...
@@ -127,7 +138,7 @@
text-align: center;
}
.screen-box{
.screen-box
,.calen-box,.detail-box
{
width: 100%;
height: 100%;
position: fixed;
...
...
@@ -136,6 +147,10 @@
background:rgba(17,17,17, .5);
z-index: 2;
}
.calen-box>view{
background-color: white;
padding: 30rpx 0;
}
.screen-box-top{
padding: 30rpx;
}
...
...
@@ -215,4 +230,92 @@
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;
}
\ No newline at end of file
pages/Voucher/Voucher.js
View file @
1b3d3a96
...
...
@@ -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 @
1b3d3a96
<view class='page-Voucher'>
<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>
<text class='phone'>{{item.MobilePhoneS}}</text>
</view>
<image mode='widthFix' src='../../images/group/chakn.png'></image>
</view>
<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>
<text class='phone'>{{item.MobilePhoneS}}</text>
</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 @
1b3d3a96
...
...
@@ -143,7 +143,7 @@ Page({
if
(
tagItem
[
i
].
active
)
{
this
.
data
.
listmsg
.
tags
.
push
(
tagItem
[
i
].
id
)
}
}
}
this
.
setData
({
listmsg
:
this
.
data
.
listmsg
,
showBox
:
false
,
...
...
@@ -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 @
1b3d3a96
...
...
@@ -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 @
1b3d3a96
...
...
@@ -39,7 +39,7 @@
"list"
:
[]
},
"miniprogram"
:
{
"current"
:
1
5
,
"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
},
{
...
...
utils/util.js
View file @
1b3d3a96
...
...
@@ -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
...
...
@@ -70,11 +84,66 @@ Date.prototype.Format = function (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
=
{
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