Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jz_Travel
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
zhengke
jz_Travel
Commits
59e47805
Commit
59e47805
authored
Jun 07, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b1f9feb6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
239 additions
and
47 deletions
+239
-47
index.vue
pages/index/index.vue
+6
-6
list.vue
pages/restaurant/list.vue
+125
-38
list.vue
pages/ticketCoupons/list.vue
+108
-3
No files found.
pages/index/index.vue
View file @
59e47805
...
...
@@ -480,9 +480,9 @@
let
title
=
this
.
setting
.
share_title
?
this
.
setting
.
share_title
:
uni
.
getStorageSync
(
"basedata"
).
mall
.
name
if
(
SmallShopId
!=
0
)
{
title
=
this
.
shopData
.
Name
}
//
if (SmallShopId != 0) {
//
title = this.shopData.Name
//
}
let
Up
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
0
;
return
{
title
:
title
,
...
...
@@ -513,9 +513,9 @@
let
title
=
this
.
setting
.
share_title
?
this
.
setting
.
share_title
:
uni
.
getStorageSync
(
"basedata"
).
mall
.
name
if
(
SmallShopId
!=
0
)
{
title
=
this
.
shopData
.
Name
}
//
if (SmallShopId != 0) {
//
title = this.shopData.Name
//
}
let
Up
=
uni
.
getStorageSync
(
"mall_UserInfo"
)
?
uni
.
getStorageSync
(
"mall_UserInfo"
).
UserPageType
:
0
;
return
{
title
:
title
,
...
...
pages/restaurant/list.vue
View file @
59e47805
<
template
>
<view
class=
"hotel-list"
>
<view
class=
"search-box"
>
<view
class=
"city-box"
@
click=
"showCity"
>
{{
city
}}
</view>
<view
style=
"width: 1px; flex: 1;"
>
<u-search
placeholder=
"美食名称"
v-model=
"msg.Name"
input-align=
"left"
text-color=
"#111"
bg-color=
"rgba(0,0,0,0)"
:show-action=
"false"
clearabled
@
search=
"searchList"
@
clear=
"searchList"
>
</u-search>
</view>
</view>
<u-popup
v-model=
"showCityList"
mode=
"bottom"
:border-radius=
"40"
:safe-area-inset-bottom=
"true"
>
<Address
@
confirm=
"confirmCity"
:list=
"cityList"
/>
</u-popup>
<view>
<u-dropdown
ref=
"uDropdown"
@
open=
"open"
@
close=
"close"
active-color=
"#000"
inactive-color=
"#444"
>
<u-dropdown-item
v-model=
"msg.OrderBy"
:title=
"optionsTitle[0]"
:options=
"options1"
...
...
@@ -19,7 +25,10 @@
</restaurant-type>
</view>
</u-dropdown-item>
<u-dropdown-item
:title=
"optionsTitle[2]"
>
<u-dropdown-item
v-model=
"msg.District"
:title=
"optionsTitle[2]"
:options=
"DistrictOptions"
@
change=
"changeDistrict"
>
</u-dropdown-item>
<u-dropdown-item
:title=
"optionsTitle[3]"
>
<view
class=
"slot-content"
style=
"padding: 30rpx;background-color: #FFF;"
>
<!--
<view>
<text
style=
"font-size: 28rpx;color:#111;font-weight: 800;margin-right: 10rpx;"
>
餐厅类型
</text>
...
...
@@ -71,9 +80,11 @@
import
rangeSlider
from
"./components/range-slider.vue"
import
restaurantGood
from
'./components/restaurant-good.vue'
;
import
restaurantType
from
'./components/restaurant-type.vue'
;
import
Address
from
'./components/address/smh-address-indexed.vue'
export
default
{
data
()
{
return
{
city
:
"成都"
,
msg
:
{
pageIndex
:
1
,
pageSize
:
10
,
...
...
@@ -81,6 +92,9 @@
OrderBy
:
0
,
FoodTypeIds
:
0
,
DiningPriceType
:
0
,
City
:
262
,
District
:
0
,
},
page_count
:
1
,
status
:
"loadmore"
,
...
...
@@ -102,6 +116,7 @@
optionsTitle
:
[
"推荐排序"
,
"分类"
,
"区域"
,
"筛选"
,
],
rates
:
[],
//价格列表
...
...
@@ -176,15 +191,18 @@
active
:
0
},
foodType
:
[],
showCityList
:
false
,
cityList
:[],
DistrictOptions
:[{
label
:
"不限"
,
value
:
0
}],
}
},
components
:
{
rangeSlider
,
restaurantGood
,
restaurantType
restaurantType
,
Address
,
},
onLoad
(
options
)
{
console
.
log
(
options
)
if
(
options
&&
options
.
Name
){
this
.
msg
.
Name
=
options
.
Name
}
...
...
@@ -206,6 +224,8 @@
this
.
getFoodType
();
this
.
getPriceEnum
();
this
.
getFoodList
();
this
.
getCity
();
this
.
getDistrict
(
262
);
},
created
()
{
...
...
@@ -243,7 +263,7 @@
},
setRestaurantPrice
(
rateId
,
name
)
{
this
.
msg
.
DiningPriceType
=
rateId
this
.
optionsTitle
[
2
]
=
name
this
.
optionsTitle
[
3
]
=
name
// if(rateId==-1){
// this.tempRateAndPrice.rate=[-1]
// }else{
...
...
@@ -274,7 +294,7 @@
// }
// },
resetPrice
()
{
this
.
optionsTitle
[
2
]
=
"筛选"
this
.
optionsTitle
[
3
]
=
"筛选"
// this.searchObj.rateAndPrice={
// types:[-1],
// priceText:"不限",
...
...
@@ -416,52 +436,105 @@
uni
.
navigateTo
({
url
:
"/pages/restaurant/detail?id="
+
id
})
},
showCity
(){
this
.
showCityList
=
true
},
confirmCity
(
val
){
this
.
showCityList
=
false
this
.
msg
.
City
=
val
.
ID
this
.
city
=
val
.
Name
this
.
getDistrict
(
val
.
ID
)
this
.
msg
.
District
=
0
this
.
getFoodList
();
},
getCity
(){
this
.
request2
({
url
:
'/api/Hotel/GetHotelDestination'
,
data
:
{
ID
:
0
}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
cityList
=
[]
res
.
data
.
map
(
i
=>
{
let
initial
=
i
.
PinYin
.
slice
(
0
,
1
)
let
find
=
this
.
cityList
.
filter
((
e
)
=>
{
return
e
.
letter
==
initial
})
if
(
find
.
length
>
0
){
find
[
0
].
citylist
.
push
(
i
)
}
else
{
let
obj
=
{
letter
:
initial
,
citylist
:[
i
],
}
this
.
cityList
.
push
(
obj
)
}
})
}
},
err
=>
{
}
);
},
getDistrict
(
id
){
this
.
request2
({
url
:
'/api/Hotel/GetHotelDestination'
,
data
:
{
ID
:
id
}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
DistrictOptions
=
[{
label
:
"不限"
,
value
:
0
}]
res
.
data
.
map
(
i
=>
{
let
obj
=
{
label
:
i
.
Name
,
value
:
i
.
ID
}
this
.
DistrictOptions
.
push
(
obj
)
})
}
},
err
=>
{
}
);
},
changeDistrict
(
val
){
this
.
getFoodList
();
let
res
=
this
.
DistrictOptions
.
filter
(
i
=>
{
return
i
.
value
==
val
})
this
.
optionsTitle
[
2
]
=
res
[
0
].
label
}
},
}
</
script
>
<
style
scoped
>
/
deep
/
.u-flex
{
justify-content
:
center
;
}
.hotel-list
{
height
:
100vh
;
}
.hotel-list
.search-box
{
height
:
88
rpx
;
background
:
#ECF1F4
;
border-radius
:
44
rpx
;
display
:
flex
;
align-items
:
center
;
padding
:
19
rpx
30
rpx
;
margin
:
0
30
rpx
;
}
.hotel-list
.search-box
.date
{
width
:
104
rpx
;
height
:
50
rpx
;
font-size
:
22
rpx
;
font-weight
:
500
;
color
:
#111111
;
line-height
:
29
rpx
;
}
.hotel-list
.search-box
.days
{
.city-box
{
width
:
90
rpx
;
height
:
40
rpx
;
padding
:
8
rpx
30
rpx
8
rpx
19
rpx
;
color
:
#DFBE6E
;
line-height
:
30
rpx
;
padding
:
8
rpx
10
rpx
8
rpx
0
rpx
;
margin-right
:
20
rpx
;
text-align
:
center
;
/* color: #DFBE6E; */
border-right
:
1px
solid
#E2E2E2
;
font-size
:
24
rpx
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
/
deep
/
.u-flex
{
justify-content
:
center
;
}
.hotel-rate-box
{
display
:
flex
;
align-items
:
center
;
flex-wrap
:
wrap
;
align-items
:
center
;
}
.hotel-rate
{
...
...
@@ -474,7 +547,6 @@
line-height
:
60
rpx
;
margin-right
:
15
rpx
;
text-align
:
center
;
flex-shrink
:
0
;
margin-top
:
29
rpx
;
}
...
...
@@ -486,4 +558,19 @@
background
:
#111111
;
color
:
#FFFFFF
;
}
.hotel-list
{
height
:
100vh
;
}
.hotel-list
.search-box
{
height
:
88
rpx
;
background
:
#ECF1F4
;
border-radius
:
44
rpx
;
display
:
flex
;
align-items
:
center
;
padding
:
19
rpx
30
rpx
;
margin
:
0
30
rpx
;
}
</
style
>
pages/ticketCoupons/list.vue
View file @
59e47805
<
template
>
<view
class=
"hotel-list"
>
<view
class=
"search-box"
>
<view
class=
"city-box"
@
click=
"showCity"
>
{{
city
}}
</view>
<view
style=
"width: 1px; flex: 1;"
>
<u-search
placeholder=
"景点"
v-model=
"msg.Name"
input-align=
"left"
:value=
"searchObj.searchKey"
text-color=
"#111"
bg-color=
"rgba(0,0,0,0)"
:show-action=
"false"
@
search=
"searchList"
@
clear=
"searchList"
></u-search>
</view>
</view>
<u-popup
v-model=
"showCityList"
mode=
"bottom"
:border-radius=
"40"
:safe-area-inset-bottom=
"true"
>
<Address
@
confirm=
"confirmCity"
:list=
"cityList"
/>
</u-popup>
<view>
<u-dropdown
ref=
"uDropdown"
@
open=
"open"
@
close=
"close"
active-color=
"#000"
inactive-color=
"#444"
>
<!-- 推荐排序 -->
...
...
@@ -17,8 +23,11 @@
<!--
<Cascade
:dataList=
"typeList"
></Cascade>
-->
</u-dropdown-item>
<u-dropdown-item
v-model=
"msg.District"
:title=
"optionsTitle[2]"
:options=
"DistrictOptions"
@
change=
"changeDistrict"
>
</u-dropdown-item>
<!-- 筛选 -->
<u-dropdown-item
:title=
"optionsTitle[
2
]"
>
<u-dropdown-item
:title=
"optionsTitle[
3
]"
>
<view
class=
"slot-content"
>
<!--
<view
class=
"u-text-center u-content-color"
>
其他自定义内容
</view>
-->
<view
class=
"hotel-rate"
:class=
"
{'hotel-rate-active':msg.IsFree!=-1}" @click="changeScreen('IsFree')">是否免费
</view>
...
...
@@ -100,10 +109,14 @@
</
template
>
<
script
>
import
Address
from
'./components/address/smh-address-indexed.vue'
export
default
{
components
:{
Address
},
data
()
{
return
{
city
:
"成都"
,
dataList
:[],
//列表数据
typeList
:[],
//景点类型列表
msg
:{
...
...
@@ -115,6 +128,8 @@
IsSameDayBuy
:
-
1
,
IsWorryFreeRefund
:
-
1
,
OrderBy
:
1
,
City
:
262
,
District
:
0
,
},
page_count
:
1
,
loading
:
false
,
...
...
@@ -128,6 +143,7 @@
optionsTitle
:
[
"推荐排序"
,
"景点类型"
,
"区域"
,
"筛选"
],
orderOptions
:
[
...
...
@@ -159,7 +175,10 @@
fontSize
:
'30rpx'
,
width
:
'100%'
,
background
:
"#111"
}
},
showCityList
:
false
,
cityList
:[],
DistrictOptions
:[{
label
:
"不限"
,
value
:
0
}],
}
},
onLoad
(
options
)
{
...
...
@@ -169,6 +188,8 @@
this
.
getScenicType
();
// 获取景点类型
this
.
getList
();
// 获取景点门票类型
this
.
getCity
();
this
.
getDistrict
(
262
);
},
created
()
{
uni
.
setNavigationBarTitle
({
...
...
@@ -299,12 +320,96 @@
this
.
getList
();
let
res
=
this
.
classOptions
.
filter
(
i
=>
{
return
i
.
value
==
val
})
this
.
optionsTitle
[
1
]
=
res
[
0
].
label
},
showCity
(){
this
.
showCityList
=
true
},
confirmCity
(
val
){
this
.
showCityList
=
false
this
.
msg
.
City
=
val
.
ID
this
.
city
=
val
.
Name
this
.
getDistrict
(
val
.
ID
)
this
.
msg
.
District
=
0
this
.
getList
();
},
getCity
(){
this
.
request2
({
url
:
'/api/Hotel/GetHotelDestination'
,
data
:
{
ID
:
0
}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
cityList
=
[]
res
.
data
.
map
(
i
=>
{
let
initial
=
i
.
PinYin
.
slice
(
0
,
1
)
let
find
=
this
.
cityList
.
filter
((
e
)
=>
{
return
e
.
letter
==
initial
})
if
(
find
.
length
>
0
){
find
[
0
].
citylist
.
push
(
i
)
}
else
{
let
obj
=
{
letter
:
initial
,
citylist
:[
i
],
}
this
.
cityList
.
push
(
obj
)
}
})
}
},
err
=>
{
}
);
},
getDistrict
(
id
){
this
.
request2
({
url
:
'/api/Hotel/GetHotelDestination'
,
data
:
{
ID
:
id
}
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
this
.
DistrictOptions
=
[{
label
:
"不限"
,
value
:
0
}]
res
.
data
.
map
(
i
=>
{
let
obj
=
{
label
:
i
.
Name
,
value
:
i
.
ID
}
this
.
DistrictOptions
.
push
(
obj
)
})
}
},
err
=>
{
}
);
},
changeDistrict
(
val
){
this
.
getList
();
let
res
=
this
.
DistrictOptions
.
filter
(
i
=>
{
return
i
.
value
==
val
})
this
.
optionsTitle
[
2
]
=
res
[
0
].
label
}
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.city-box
{
width
:
90rpx
;
height
:
40rpx
;
line-height
:
30rpx
;
padding
:
8rpx
10rpx
8rpx
0rpx
;
margin-right
:
20rpx
;
text-align
:
center
;
/* color: #DFBE6E; */
border-right
:
1px
solid
#E2E2E2
;
font-size
:
24rpx
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.hotel-rate
{
width
:
215rpx
;
height
:
60rpx
;
...
...
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