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({
...
@@ -6,14 +6,14 @@ Page({
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
StopResh
:
false
,
StopResh
:
false
,
dates
:[],
dates
:
[],
startCityList
:[],
startCityList
:
[],
datecount
:[],
datecount
:
[],
//显示默认天数
//显示默认天数
showDays
:
-
1
,
showDays
:
-
1
,
ckedStartCity
:
0
,
ckedStartCity
:
0
,
listmsg
:{
listmsg
:
{
cityId
:
"262"
,
cityId
:
"262"
,
companyId
:
0
,
companyId
:
0
,
endDate
:
""
,
endDate
:
""
,
...
@@ -33,48 +33,47 @@ Page({
...
@@ -33,48 +33,47 @@ Page({
startCityId
:
0
,
startCityId
:
0
,
startDate
:
""
startDate
:
""
},
},
ScreenStatus
:
false
,
ScreenStatus
:
false
,
dataList
:[],
dataList
:
[],
site
:
{
site
:
{
companyId
:
app
.
state
.
companyId
,
companyId
:
app
.
state
.
companyId
,
cityId
:
app
.
state
.
cityId
cityId
:
app
.
state
.
cityId
},
},
isLogin
:
app
.
isLogin
,
isLogin
:
app
.
isLogin
,
orderType
:
0
,
orderType
:
0
,
orderindex
:
1
orderindex
:
1
},
},
// 最近3个月
// 最近3个月
loadDates
()
{
loadDates
()
{
let
dates
=
[];
let
dates
=
[];
let
d
=
new
Date
().
getMonth
();
let
d
=
new
Date
().
getMonth
();
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
for
(
let
i
=
0
;
i
<
3
;
i
++
)
{
d
++
;
d
++
;
d
=
d
>
12
?
d
-
12
:
d
;
d
=
d
>
12
?
d
-
12
:
d
;
let
obj
=
{
let
obj
=
{
id
:
d
,
id
:
d
,
name
:
d
+
"月"
name
:
d
+
"月"
}
}
dates
.
push
(
obj
);
dates
.
push
(
obj
);
}
}
this
.
setData
({
this
.
setData
({
dates
:
dates
dates
:
dates
})
})
},
},
PXClick
()
{
PXClick
()
{
this
.
setData
({
this
.
setData
({
StopResh
:
true
,
StopResh
:
true
,
})
})
},
},
ClosePXView
(
e
)
{
ClosePXView
(
e
)
{
if
(
e
.
target
.
dataset
.
target
==
"self"
)
{
if
(
e
.
target
.
dataset
.
target
==
"self"
)
{
this
.
setData
({
this
.
setData
({
StopResh
:
false
,
StopResh
:
false
,
})
})
}
}
},
},
ChangeSite
(
val
)
{
ChangeSite
(
val
)
{
console
.
log
(
val
.
detail
);
this
.
data
.
listmsg
.
companyId
=
val
.
companyId
;
this
.
data
.
listmsg
.
companyId
=
val
.
companyId
;
this
.
data
.
listmsg
.
cityId
=
val
.
cityId
;
this
.
data
.
listmsg
.
cityId
=
val
.
cityId
;
this
.
setData
({
this
.
setData
({
...
@@ -89,25 +88,24 @@ Page({
...
@@ -89,25 +88,24 @@ Page({
cityId
:
this
.
data
.
site
.
cityId
,
cityId
:
this
.
data
.
site
.
cityId
,
}
}
app
.
$api
(
'b2b_get_GetGroupSearchItem'
,
tagmsg
).
then
(
res
=>
{
app
.
$api
(
'b2b_get_GetGroupSearchItem'
,
tagmsg
).
then
(
res
=>
{
console
.
log
(
res
);
res
.
startCity
.
unshift
({
res
.
startCity
.
unshift
({
id
:
0
,
id
:
0
,
startCityName
:
'不限'
startCityName
:
'不限'
})
})
this
.
setData
({
this
.
setData
({
startCityList
:
res
.
startCity
,
startCityList
:
res
.
startCity
,
datecount
:
res
.
tripDay
datecount
:
res
.
tripDay
})
})
}).
catch
(
err
=>
{
})
}).
catch
(
err
=>
{
})
},
},
//价格区间输入框改变
//价格区间输入框改变
bindKeyInput
:
function
(
e
)
{
bindKeyInput
:
function
(
e
)
{
if
(
e
.
target
.
dataset
.
type
==
1
)
{
if
(
e
.
target
.
dataset
.
type
==
1
)
{
this
.
data
.
listmsg
.
minPrice
=
e
.
detail
.
value
;
this
.
data
.
listmsg
.
minPrice
=
e
.
detail
.
value
;
this
.
setData
({
this
.
setData
({
listmsg
:
this
.
data
.
listmsg
listmsg
:
this
.
data
.
listmsg
})
})
}
else
{
}
else
{
this
.
data
.
listmsg
.
maxPrice
=
e
.
detail
.
value
;
this
.
data
.
listmsg
.
maxPrice
=
e
.
detail
.
value
;
this
.
setData
({
this
.
setData
({
listmsg
:
this
.
data
.
listmsg
listmsg
:
this
.
data
.
listmsg
...
@@ -115,16 +113,15 @@ Page({
...
@@ -115,16 +113,15 @@ Page({
}
}
},
},
//点击行程天数
//点击行程天数
getTripDay
(
e
){
getTripDay
(
e
)
{
this
.
data
.
listmsg
.
maxTripDay
=
e
.
target
.
dataset
.
id
;
this
.
data
.
listmsg
.
maxTripDay
=
e
.
target
.
dataset
.
id
;
this
.
setData
({
this
.
setData
({
listmsg
:
this
.
data
.
listmsg
,
listmsg
:
this
.
data
.
listmsg
,
showDays
:
e
.
target
.
dataset
.
id
showDays
:
e
.
target
.
dataset
.
id
})
})
},
},
//点击月份的到出发结束日期
//点击月份的到出发结束日期
getStartMonth
(
e
){
getStartMonth
(
e
)
{
console
.
log
(
e
);
let
year
=
new
Date
().
getFullYear
();
let
year
=
new
Date
().
getFullYear
();
let
month
=
e
.
target
.
dataset
.
type
;
let
month
=
e
.
target
.
dataset
.
type
;
let
firstdate
=
year
+
'-'
+
month
+
'-01'
;
let
firstdate
=
year
+
'-'
+
month
+
'-01'
;
...
@@ -134,14 +131,14 @@ Page({
...
@@ -134,14 +131,14 @@ Page({
this
.
data
.
listmsg
.
startDate
=
firstdate
;
this
.
data
.
listmsg
.
startDate
=
firstdate
;
this
.
data
.
listmsg
.
endDate
=
lastdate
;
this
.
data
.
listmsg
.
endDate
=
lastdate
;
this
.
setData
({
this
.
setData
({
listmsg
:
this
.
data
.
listmsg
listmsg
:
this
.
data
.
listmsg
})
})
},
},
//给日期赋值
//给日期赋值
bindDateChange
(
e
){
bindDateChange
(
e
)
{
if
(
e
.
target
.
dataset
.
type
==
1
)
{
if
(
e
.
target
.
dataset
.
type
==
1
)
{
this
.
data
.
listmsg
.
startDate
=
e
.
detail
.
value
;
this
.
data
.
listmsg
.
startDate
=
e
.
detail
.
value
;
}
else
{
}
else
{
this
.
data
.
listmsg
.
endDate
=
e
.
detail
.
value
;
this
.
data
.
listmsg
.
endDate
=
e
.
detail
.
value
;
}
}
this
.
setData
({
this
.
setData
({
...
@@ -150,7 +147,6 @@ Page({
...
@@ -150,7 +147,6 @@ Page({
},
},
//点击过滤条件
//点击过滤条件
changeOrderType
(
e
)
{
changeOrderType
(
e
)
{
console
.
log
(
e
);
let
type
=
e
.
target
.
dataset
.
type
;
let
type
=
e
.
target
.
dataset
.
type
;
if
(
this
.
data
.
orderindex
==
type
)
{
if
(
this
.
data
.
orderindex
==
type
)
{
this
.
data
.
ordertype
=
this
.
data
.
ordertype
==
0
?
1
:
0
this
.
data
.
ordertype
=
this
.
data
.
ordertype
==
0
?
1
:
0
...
@@ -159,18 +155,15 @@ Page({
...
@@ -159,18 +155,15 @@ Page({
this
.
data
.
ordertype
=
0
this
.
data
.
ordertype
=
0
}
}
this
.
setData
({
this
.
setData
({
orderindex
:
this
.
data
.
orderindex
,
orderindex
:
this
.
data
.
orderindex
,
ordertype
:
this
.
data
.
ordertype
ordertype
:
this
.
data
.
ordertype
})
})
console
.
log
(
this
.
data
.
orderindex
,
'orderindex'
);
console
.
log
(
this
.
data
.
ordertype
,
'ordertype'
);
this
.
onLoad
();
this
.
onLoad
();
},
},
//点击确定查询数据
//点击确定查询数据
getList
(){
getList
()
{
let
that
=
this
;
let
that
=
this
;
that
.
data
.
listmsg
.
companyId
=
that
.
data
.
site
.
companyId
;
that
.
data
.
listmsg
.
companyId
=
that
.
data
.
site
.
companyId
;
that
.
data
.
listmsg
.
cityId
=
that
.
data
.
site
.
cityId
;
that
.
data
.
listmsg
.
cityId
=
that
.
data
.
site
.
cityId
;
if
(
this
.
data
.
isLogin
==
1
)
{
if
(
this
.
data
.
isLogin
==
1
)
{
...
@@ -184,21 +177,18 @@ Page({
...
@@ -184,21 +177,18 @@ Page({
this
.
setData
({
this
.
setData
({
listmsg
:
that
.
data
.
listmsg
listmsg
:
that
.
data
.
listmsg
})
})
console
.
log
(
"listmsg"
,
that
.
data
.
listmsg
)
app
.
$api
(
'b2b_get_GetB2BTravelPageList'
,
that
.
data
.
listmsg
).
then
(
res
=>
{
app
.
$api
(
'b2b_get_GetB2BTravelPageList'
,
that
.
data
.
listmsg
).
then
(
res
=>
{
res
.
pageData
.
forEach
(
x
=>
{
res
.
pageData
.
forEach
(
x
=>
{
x
.
newImgCover
=
JSON
.
parse
(
x
.
imgCover
);
x
.
newImgCover
=
JSON
.
parse
(
x
.
imgCover
);
})
})
console
.
log
(
res
.
pageData
,
'ssss'
);
this
.
setData
({
this
.
setData
({
dataList
:
res
.
pageData
,
dataList
:
res
.
pageData
,
ScreenStatus
:
false
ScreenStatus
:
false
})
})
}).
catch
(
err
=>
{
})
}).
catch
(
err
=>
{
})
},
},
//点击重置
//点击重置
resetMsg
(){
resetMsg
()
{
this
.
data
.
listmsg
.
startDate
=
''
;
this
.
data
.
listmsg
.
startDate
=
''
;
this
.
data
.
listmsg
.
endDate
=
''
;
this
.
data
.
listmsg
.
endDate
=
''
;
this
.
data
.
listmsg
.
maxTripDay
=
-
1
;
this
.
data
.
listmsg
.
maxTripDay
=
-
1
;
...
@@ -206,32 +196,39 @@ Page({
...
@@ -206,32 +196,39 @@ Page({
this
.
data
.
listmsg
.
minPrice
=
-
1
;
this
.
data
.
listmsg
.
minPrice
=
-
1
;
this
.
data
.
listmsg
.
maxPrice
=
-
1
;
this
.
data
.
listmsg
.
maxPrice
=
-
1
;
this
.
setData
({
this
.
setData
({
listmsg
:
this
.
data
.
listmsg
,
listmsg
:
this
.
data
.
listmsg
,
showDays
:
this
.
data
.
showDays
showDays
:
this
.
data
.
showDays
})
})
this
.
onLoad
();
this
.
onLoad
();
},
},
//点击出发城市
//点击出发城市
getStartCity
(
e
){
getStartCity
(
e
)
{
console
.
log
(
e
);
this
.
data
.
listmsg
.
startCityId
=
e
.
target
.
dataset
.
id
;
this
.
data
.
listmsg
.
startCityId
=
e
.
target
.
dataset
.
id
;
this
.
data
.
ckedStartCity
=
e
.
target
.
dataset
.
index
;
this
.
data
.
ckedStartCity
=
e
.
target
.
dataset
.
index
;
this
.
setData
({
this
.
setData
({
listmsg
:
this
.
data
.
listmsg
,
listmsg
:
this
.
data
.
listmsg
,
ckedStartCity
:
this
.
data
.
ckedStartCity
ckedStartCity
:
this
.
data
.
ckedStartCity
})
})
this
.
onLoad
();
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
({
this
.
setData
({
ScreenStatus
:
true
,
ScreenStatus
:
true
,
})
})
},
},
CloseScreen
(
e
)
{
CloseScreen
(
e
)
{
if
(
e
.
target
.
dataset
.
target
==
"self"
)
{
if
(
e
.
target
.
dataset
.
target
==
"self"
)
{
this
.
setData
({
this
.
setData
({
ScreenStatus
:
false
,
ScreenStatus
:
false
,
})
})
}
}
},
},
...
@@ -295,4 +292,4 @@ Page({
...
@@ -295,4 +292,4 @@ Page({
onShareAppMessage
:
function
()
{
onShareAppMessage
:
function
()
{
}
}
})
})
\ No newline at end of file
pages/GroupTour/GroupList/GroupList.wxml
View file @
caed59fc
...
@@ -35,7 +35,7 @@
...
@@ -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>
<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>
</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">
<view class="imgView">
<image src="{{item.newImgCover[0].Url}}"></image>
<image src="{{item.newImgCover[0].Url}}"></image>
</view>
</view>
...
@@ -62,13 +62,6 @@
...
@@ -62,13 +62,6 @@
<!-- 筛选多条件 -->
<!-- 筛选多条件 -->
<view bindtap='CloseScreen' data-target="self" class="screen" hidden="{{!ScreenStatus}}">
<view bindtap='CloseScreen' data-target="self" class="screen" hidden="{{!ScreenStatus}}">
<view>
<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="title">出发日期</view>
<view class="DatePicker">
<view class="DatePicker">
<picker class="pcikerView" mode="date" value="{{date}}" data-type="{{1}}" bindchange="bindDateChange">
<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