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
caed59fc
Commit
caed59fc
authored
Jul 04, 2019
by
huangyuanyuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/huaguohao/flashman
parents
77fb70dc
14265875
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
64 deletions
+54
-64
GroupList.js
pages/GroupTour/GroupList/GroupList.js
+53
-56
GroupList.wxml
pages/GroupTour/GroupList/GroupList.wxml
+1
-8
No files found.
pages/GroupTour/GroupList/GroupList.js
View file @
caed59fc
...
...
@@ -6,14 +6,14 @@ Page({
* 页面的初始数据
*/
data
:
{
StopResh
:
false
,
dates
:[],
startCityList
:[],
datecount
:[],
StopResh
:
false
,
dates
:
[],
startCityList
:
[],
datecount
:
[],
//显示默认天数
showDays
:
-
1
,
ckedStartCity
:
0
,
listmsg
:{
showDays
:
-
1
,
ckedStartCity
:
0
,
listmsg
:
{
cityId
:
"262"
,
companyId
:
0
,
endDate
:
""
,
...
...
@@ -33,48 +33,47 @@ Page({
startCityId
:
0
,
startDate
:
""
},
ScreenStatus
:
false
,
dataList
:[],
ScreenStatus
:
false
,
dataList
:
[],
site
:
{
companyId
:
app
.
state
.
companyId
,
cityId
:
app
.
state
.
cityId
},
isLogin
:
app
.
isLogin
,
orderType
:
0
,
isLogin
:
app
.
isLogin
,
orderType
:
0
,
orderindex
:
1
},
// 最近3个月
loadDates
()
{
let
dates
=
[];
let
dates
=
[];
let
d
=
new
Date
().
getMonth
();
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
d
++
;
d
=
d
>
12
?
d
-
12
:
d
;
let
obj
=
{
id
:
d
,
let
obj
=
{
id
:
d
,
name
:
d
+
"月"
}
dates
.
push
(
obj
);
}
this
.
setData
({
dates
:
dates
dates
:
dates
})
},
PXClick
()
{
this
.
setData
({
StopResh
:
true
,
StopResh
:
true
,
})
},
ClosePXView
(
e
)
{
if
(
e
.
target
.
dataset
.
target
==
"self"
)
{
this
.
setData
({
StopResh
:
false
,
})
}
},
ChangeSite
(
val
)
{
console
.
log
(
val
.
detail
);
this
.
data
.
listmsg
.
companyId
=
val
.
companyId
;
this
.
data
.
listmsg
.
cityId
=
val
.
cityId
;
this
.
setData
({
...
...
@@ -89,25 +88,24 @@ Page({
cityId
:
this
.
data
.
site
.
cityId
,
}
app
.
$api
(
'b2b_get_GetGroupSearchItem'
,
tagmsg
).
then
(
res
=>
{
console
.
log
(
res
);
res
.
startCity
.
unshift
({
id
:
0
,
startCityName
:
'不限'
id
:
0
,
startCityName
:
'不限'
})
this
.
setData
({
startCityList
:
res
.
startCity
,
datecount
:
res
.
tripDay
startCityList
:
res
.
startCity
,
datecount
:
res
.
tripDay
})
}).
catch
(
err
=>
{
})
},
//价格区间输入框改变
bindKeyInput
:
function
(
e
)
{
if
(
e
.
target
.
dataset
.
type
==
1
)
{
if
(
e
.
target
.
dataset
.
type
==
1
)
{
this
.
data
.
listmsg
.
minPrice
=
e
.
detail
.
value
;
this
.
setData
({
listmsg
:
this
.
data
.
listmsg
})
}
else
{
}
else
{
this
.
data
.
listmsg
.
maxPrice
=
e
.
detail
.
value
;
this
.
setData
({
listmsg
:
this
.
data
.
listmsg
...
...
@@ -115,16 +113,15 @@ Page({
}
},
//点击行程天数
getTripDay
(
e
){
getTripDay
(
e
)
{
this
.
data
.
listmsg
.
maxTripDay
=
e
.
target
.
dataset
.
id
;
this
.
setData
({
listmsg
:
this
.
data
.
listmsg
,
showDays
:
e
.
target
.
dataset
.
id
showDays
:
e
.
target
.
dataset
.
id
})
},
//点击月份的到出发结束日期
getStartMonth
(
e
){
console
.
log
(
e
);
getStartMonth
(
e
)
{
let
year
=
new
Date
().
getFullYear
();
let
month
=
e
.
target
.
dataset
.
type
;
let
firstdate
=
year
+
'-'
+
month
+
'-01'
;
...
...
@@ -134,14 +131,14 @@ Page({
this
.
data
.
listmsg
.
startDate
=
firstdate
;
this
.
data
.
listmsg
.
endDate
=
lastdate
;
this
.
setData
({
listmsg
:
this
.
data
.
listmsg
listmsg
:
this
.
data
.
listmsg
})
},
//给日期赋值
bindDateChange
(
e
){
if
(
e
.
target
.
dataset
.
type
==
1
)
{
bindDateChange
(
e
)
{
if
(
e
.
target
.
dataset
.
type
==
1
)
{
this
.
data
.
listmsg
.
startDate
=
e
.
detail
.
value
;
}
else
{
}
else
{
this
.
data
.
listmsg
.
endDate
=
e
.
detail
.
value
;
}
this
.
setData
({
...
...
@@ -150,7 +147,6 @@ Page({
},
//点击过滤条件
changeOrderType
(
e
)
{
console
.
log
(
e
);
let
type
=
e
.
target
.
dataset
.
type
;
if
(
this
.
data
.
orderindex
==
type
)
{
this
.
data
.
ordertype
=
this
.
data
.
ordertype
==
0
?
1
:
0
...
...
@@ -159,18 +155,15 @@ Page({
this
.
data
.
ordertype
=
0
}
this
.
setData
({
orderindex
:
this
.
data
.
orderindex
,
ordertype
:
this
.
data
.
ordertype
orderindex
:
this
.
data
.
orderindex
,
ordertype
:
this
.
data
.
ordertype
})
console
.
log
(
this
.
data
.
orderindex
,
'orderindex'
);
console
.
log
(
this
.
data
.
ordertype
,
'ordertype'
);
this
.
onLoad
();
},
//点击确定查询数据
getList
(){
let
that
=
this
;
getList
()
{
let
that
=
this
;
that
.
data
.
listmsg
.
companyId
=
that
.
data
.
site
.
companyId
;
that
.
data
.
listmsg
.
cityId
=
that
.
data
.
site
.
cityId
;
if
(
this
.
data
.
isLogin
==
1
)
{
...
...
@@ -184,21 +177,18 @@ Page({
this
.
setData
({
listmsg
:
that
.
data
.
listmsg
})
console
.
log
(
"listmsg"
,
that
.
data
.
listmsg
)
app
.
$api
(
'b2b_get_GetB2BTravelPageList'
,
that
.
data
.
listmsg
).
then
(
res
=>
{
res
.
pageData
.
forEach
(
x
=>
{
res
.
pageData
.
forEach
(
x
=>
{
x
.
newImgCover
=
JSON
.
parse
(
x
.
imgCover
);
})
console
.
log
(
res
.
pageData
,
'ssss'
);
this
.
setData
({
dataList
:
res
.
pageData
,
ScreenStatus
:
false
ScreenStatus
:
false
})
}).
catch
(
err
=>
{
})
},
//点击重置
resetMsg
(){
resetMsg
()
{
this
.
data
.
listmsg
.
startDate
=
''
;
this
.
data
.
listmsg
.
endDate
=
''
;
this
.
data
.
listmsg
.
maxTripDay
=
-
1
;
...
...
@@ -206,32 +196,39 @@ Page({
this
.
data
.
listmsg
.
minPrice
=
-
1
;
this
.
data
.
listmsg
.
maxPrice
=
-
1
;
this
.
setData
({
listmsg
:
this
.
data
.
listmsg
,
showDays
:
this
.
data
.
showDays
listmsg
:
this
.
data
.
listmsg
,
showDays
:
this
.
data
.
showDays
})
this
.
onLoad
();
},
//点击出发城市
getStartCity
(
e
){
console
.
log
(
e
);
getStartCity
(
e
)
{
this
.
data
.
listmsg
.
startCityId
=
e
.
target
.
dataset
.
id
;
this
.
data
.
ckedStartCity
=
e
.
target
.
dataset
.
index
;
this
.
setData
({
listmsg
:
this
.
data
.
listmsg
,
listmsg
:
this
.
data
.
listmsg
,
ckedStartCity
:
this
.
data
.
ckedStartCity
})
this
.
onLoad
();
},
ScreenOpen
(){
//跳转至详情
Godetail
(
e
)
{
console
.
log
(
e
);
let
item
=
e
.
currentTarget
.
dataset
;
wx
.
navigateTo
({
url
:
'/pages/GroupTour/GroupDetails/GroupDetails?idDes='
+
encodeURIComponent
(
item
.
id
)
+
"&tcid="
+
item
.
tcid
,
})
},
ScreenOpen
()
{
this
.
setData
({
ScreenStatus
:
true
,
ScreenStatus
:
true
,
})
},
CloseScreen
(
e
)
{
if
(
e
.
target
.
dataset
.
target
==
"self"
)
{
this
.
setData
({
ScreenStatus
:
false
,
})
}
},
...
...
@@ -295,4 +292,4 @@ Page({
onShareAppMessage
:
function
()
{
}
})
\ No newline at end of file
})
pages/GroupTour/GroupList/GroupList.wxml
View file @
caed59fc
...
...
@@ -35,7 +35,7 @@
<view wx:for="{{startCityList}}" bindtap='getStartCity' data-id="{{item.id}}" data-index="{{index}}" wx:key="index" class="{{ckedStartCity==index?'ScrollActive':''}}">{{item.startCityName}}</view>
</scroll-view>
<!-- 列表数据 -->
<view class="ListItem" wx:for="{{dataList}}" wx:key="index">
<view class="ListItem" wx:for="{{dataList}}" wx:key="index"
data-id="{{item.id}}" data-tcid="{{item.tcid}}" bindtap='Godetail'
>
<view class="imgView">
<image src="{{item.newImgCover[0].Url}}"></image>
</view>
...
...
@@ -62,13 +62,6 @@
<!-- 筛选多条件 -->
<view bindtap='CloseScreen' data-target="self" class="screen" hidden="{{!ScreenStatus}}">
<view>
<!-- <view class="title">系列</view>
<view class="xl">
<text>本州 147升级版</text>
<text>希尔顿假期系列</text>
<text>希尔顿假期系列</text>
<text>小王子x列</text>
</view> -->
<view class="title">出发日期</view>
<view class="DatePicker">
<picker class="pcikerView" mode="date" value="{{date}}" data-type="{{1}}" bindchange="bindDateChange">
...
...
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