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
04bd4889
Commit
04bd4889
authored
Jan 18, 2023
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/zk123/jz_travel
parents
baf7f746
5c894c67
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
609 additions
and
646 deletions
+609
-646
list.vue
pages/hotel/list.vue
+609
-646
No files found.
pages/hotel/list.vue
View file @
04bd4889
...
@@ -2,12 +2,7 @@
...
@@ -2,12 +2,7 @@
<view
class=
"hotel-list"
>
<view
class=
"hotel-list"
>
<view
class=
"search-box"
>
<view
class=
"search-box"
>
<view
class=
"hotel-city"
@
click=
"showCity"
>
<view
class=
"hotel-city"
@
click=
"showCity"
>
<u-icon
<u-icon
name=
"location"
:size=
"24"
color=
"#000000"
style=
"margin-right: 8rpx"
></u-icon>
name=
"location"
:size=
"24"
color=
"#000000"
style=
"margin-right: 8rpx"
></u-icon>
{{
city
}}
{{
city
}}
</view>
</view>
...
@@ -17,50 +12,36 @@
...
@@ -17,50 +12,36 @@
</view>
</view>
<view
class=
"days"
>
{{
day
}}
晚
</view>
<view
class=
"days"
>
{{
day
}}
晚
</view>
<view
style=
"width: 1px; flex: 1"
>
<view
style=
"width: 1px; flex: 1"
>
<u-search
<u-search
placeholder=
"关键字/位置/品牌/酒店名"
v-model=
"searchObj.Name"
input-align=
"left"
placeholder=
"关键字/位置/品牌/酒店名"
:value=
"searchObj.Name"
text-color=
"#111"
bg-color=
"rgba(0,0,0,0)"
@
change=
"research()"
v-model=
"searchObj.Name"
:show-action=
"false"
></u-search>
input-align=
"left"
:value=
"searchObj.Name"
text-color=
"#111"
bg-color=
"rgba(0,0,0,0)"
@
change=
"research()"
:show-action=
"false"
></u-search>
</view>
</view>
</view>
</view>
<u-popup
<u-popup
v-model=
"showCityList"
mode=
"bottom"
:border-radius=
"40"
:safe-area-inset-bottom=
"true"
>
v-model=
"showCityList"
mode=
"bottom"
:border-radius=
"40"
:safe-area-inset-bottom=
"true"
>
<Address
@
confirm=
"confirmCity"
:list=
"cityList"
/>
<Address
@
confirm=
"confirmCity"
:list=
"cityList"
/>
</u-popup>
</u-popup>
<view>
<view>
<u-dropdown
<u-dropdown
ref=
"uDropdown"
@
open=
"open"
@
close=
"close"
active-color=
"#000"
inactive-color=
"#444"
>
ref=
"uDropdown"
<u-dropdown-item
v-model=
"searchObj.OrderByType"
:title=
"optionsTitle[0]"
:options=
"options1"
@
open=
"open"
@
change=
"change"
>
@
close=
"close"
active-color=
"#000"
inactive-color=
"#444"
>
<u-dropdown-item
v-model=
"searchObj.OrderByType"
:title=
"optionsTitle[0]"
:options=
"options1"
@
change=
"change"
>
</u-dropdown-item>
</u-dropdown-item>
<u-dropdown-item
<u-dropdown-item
v-model=
"searchObj.District"
:title=
"optionsTitle[1]"
:options=
"DistrictOptions"
v-model=
"searchObj.District"
@
change=
"changeDistrict"
>
:title=
"optionsTitle[1]"
<!--
<view
class=
"slot-content"
style=
"background-color: #FFFFFF;"
>
:options=
"DistrictOptions"
<scroll-view
scroll-y=
"true"
style=
"height: 200rpx;"
>
@
change=
"changeDistrict"
<view
v-for=
"(item.in)"
class=
"u-text-center u-content-color u-m-t-20 u-m-b-20"
>
无言独上西楼
</view>
>
<view
class=
"u-text-center u-content-color u-m-t-20 u-m-b-20"
>
月如钩
</view>
<view
class=
"u-text-center u-content-color u-m-t-20 u-m-b-20"
>
寂寞梧桐深院锁清秋
</view>
<view
class=
"u-text-center u-content-color u-m-t-20 u-m-b-20"
>
剪不断
</view>
<view
class=
"u-text-center u-content-color u-m-t-20 u-m-b-20"
>
理还乱
</view>
<view
class=
"u-text-center u-content-color u-m-t-20 u-m-b-20"
>
是离愁
</view>
<view
class=
"u-text-center u-content-color u-m-t-20 u-m-b-20"
>
别是一般滋味在心头
</view>
</scroll-view>
</view>
-->
</u-dropdown-item>
</u-dropdown-item>
<!--
<u-dropdown-item
v-model=
"searchObj.enclosure"
:title=
"optionsTitle[1]"
:options=
"options2"
@
change=
"change2"
></u-dropdown-item>
-->
<!--
<u-dropdown-item
v-model=
"searchObj.enclosure"
:title=
"optionsTitle[1]"
:options=
"options2"
@
change=
"change2"
></u-dropdown-item>
-->
<u-dropdown-item
:title=
"optionsTitle[2]"
>
<!--
<u-dropdown-item
:title=
"optionsTitle[2]"
>
<view
<view
class=
"slot-content"
class=
"slot-content"
style=
"padding: 30rpx; background-color: #fff"
style=
"padding: 30rpx; background-color: #fff"
...
@@ -147,19 +128,13 @@
...
@@ -147,19 +128,13 @@
</view>
</view>
</view>
</view>
</view>
</view>
</u-dropdown-item>
</u-dropdown-item>
-->
</u-dropdown>
</u-dropdown>
</view>
</view>
<u-popup
<u-popup
v-model=
"showTimePopup"
mode=
"bottom"
border-radius=
"20"
length=
"95%"
:safe-area-inset-bottom=
"true"
>
v-model=
"showTimePopup"
mode=
"bottom"
border-radius=
"20"
length=
"95%"
:safe-area-inset-bottom=
"true"
>
<canlendar
@
finish=
"chosenDateResult"
></canlendar>
<canlendar
@
finish=
"chosenDateResult"
></canlendar>
</u-popup>
</u-popup>
<view
class=
"morewhere"
>
<!--
<view
class=
"morewhere"
>
<view
<view
v-for=
"(x, i) in searchObj.TagList"
v-for=
"(x, i) in searchObj.TagList"
class=
"item"
class=
"item"
...
@@ -167,50 +142,28 @@
...
@@ -167,50 +142,28 @@
:class=
"
{ active: x.IsCheck == 1 }"
:class=
"
{ active: x.IsCheck == 1 }"
>
{{
x
.
Name
}}
</view
>
{{
x
.
Name
}}
</view
>
>
</view>
</view>
-->
<view
class=
"no-data"
v-if=
"HotelList.length === 0"
>
<view
class=
"no-data"
v-if=
"HotelList.length === 0"
>
<image
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/no-data.png"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/CustomizedCar/no-data.png"
mode=
"aspectFit"
class=
"no-data-img"
></image>
mode=
"aspectFit"
class=
"no-data-img"
></image>
<view
class=
"zhanwu"
>
暂无数据
</view>
<view
class=
"zhanwu"
>
暂无数据
</view>
</view>
</view>
<scroll-view
<scroll-view
:scroll-y=
"true"
@
scrolltolower=
"lower"
:enable-back-to-top=
"true"
:enable-flex=
"true"
:scroll-y=
"true"
:scroll-top=
"scrollTop"
@
scroll=
"scroll"
style=
"height: calc(100% - 224rpx); padding-bottom: 0px"
@
scrolltolower=
"lower"
v-if=
"HotelList.length > 0"
>
:enable-back-to-top=
"true"
<hotel-good
:HotelList=
"HotelList"
:dayObj=
"dayObj"
:searchObj=
"searchObj"
></hotel-good>
:enable-flex=
"true"
<u-loadmore
v-if=
"showLoading"
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:scroll-top=
"scrollTop"
:margin-bottom=
"20"
bg-color=
"#F5F5F5"
color=
"#111"
/>
@
scroll=
"scroll"
style=
"height: calc(100% - 224rpx); padding-bottom: 0px"
v-if=
"HotelList.length > 0"
>
<hotel-good
:HotelList=
"HotelList"
:dayObj=
"dayObj"
:searchObj=
"searchObj"
></hotel-good>
<u-loadmore
v-if=
"showLoading"
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
:margin-bottom=
"20"
bg-color=
"#F5F5F5"
color=
"#111"
/>
</scroll-view>
</scroll-view>
</view>
</view>
</
template
>
</
template
>
<
script
>
<
script
>
import
rangeSlider
from
"./components/range-slider.vue"
;
import
rangeSlider
from
"./components/range-slider.vue"
;
import
canlendar
from
"./components/time/index"
;
import
canlendar
from
"./components/time/index"
;
import
hotelGood
from
"./components/hotel-good.vue"
;
import
hotelGood
from
"./components/hotel-good.vue"
;
import
Address
from
"./components/address/smh-address-indexed.vue"
;
import
Address
from
"./components/address/smh-address-indexed.vue"
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
city
:
"成都"
,
city
:
"成都"
,
...
@@ -243,8 +196,7 @@ export default {
...
@@ -243,8 +196,7 @@ export default {
optionsTitle
:
[
"推荐排序"
,
"区域"
,
"价格/星级"
,
"筛选"
],
optionsTitle
:
[
"推荐排序"
,
"区域"
,
"价格/星级"
,
"筛选"
],
rates
:
[],
rates
:
[],
options1
:
[],
//推荐排序数据
options1
:
[],
//推荐排序数据
options2
:
[
options2
:
[{
{
label
:
"不限"
,
label
:
"不限"
,
value
:
-
1
,
value
:
-
1
,
},
},
...
@@ -309,7 +261,10 @@ export default {
...
@@ -309,7 +261,10 @@ export default {
status
:
"loadmore"
,
status
:
"loadmore"
,
page_count
:
0
,
page_count
:
0
,
dayObj
:
{},
dayObj
:
{},
DistrictOptions
:
[{
label
:
"不限"
,
value
:
0
}],
DistrictOptions
:
[{
label
:
"不限"
,
value
:
0
}],
};
};
},
},
components
:
{
components
:
{
...
@@ -370,12 +325,12 @@ export default {
...
@@ -370,12 +325,12 @@ export default {
this
.
optionsTitle
[
1
]
=
"区域"
;
this
.
optionsTitle
[
1
]
=
"区域"
;
this
.
getList
();
this
.
getList
();
},
},
scroll
:
function
(
e
)
{
scroll
:
function
(
e
)
{
this
.
old
.
scrollTop
=
e
.
detail
.
scrollTop
;
this
.
old
.
scrollTop
=
e
.
detail
.
scrollTop
;
},
},
goTop
:
function
(
e
)
{
goTop
:
function
(
e
)
{
this
.
scrollTop
=
this
.
old
.
scrollTop
;
this
.
scrollTop
=
this
.
old
.
scrollTop
;
this
.
$nextTick
(
function
()
{
this
.
$nextTick
(
function
()
{
this
.
scrollTop
=
0
;
this
.
scrollTop
=
0
;
});
});
},
},
...
@@ -518,8 +473,7 @@ export default {
...
@@ -518,8 +473,7 @@ export default {
},
},
//获取查询条件
//获取查询条件
getSearchCondition
()
{
getSearchCondition
()
{
this
.
request2
(
this
.
request2
({
{
url
:
"/api/Hotel/GetHotelQuery"
,
url
:
"/api/Hotel/GetHotelQuery"
,
data
:
{},
data
:
{},
},
},
...
@@ -554,8 +508,7 @@ export default {
...
@@ -554,8 +508,7 @@ export default {
if
(
type
==
1
)
{
if
(
type
==
1
)
{
this
.
HotelList
=
[];
this
.
HotelList
=
[];
}
}
this
.
request2
(
this
.
request2
({
{
url
:
"/api/Hotel/AppGetHotelPage"
,
url
:
"/api/Hotel/AppGetHotelPage"
,
data
:
this
.
searchObj
,
data
:
this
.
searchObj
,
},
},
...
@@ -572,10 +525,11 @@ export default {
...
@@ -572,10 +525,11 @@ export default {
);
);
},
},
getCity
()
{
getCity
()
{
this
.
request2
(
this
.
request2
({
{
url
:
"/api/Hotel/GetHotelDestination"
,
url
:
"/api/Hotel/GetHotelDestination"
,
data
:
{
ID
:
0
},
data
:
{
ID
:
0
},
},
},
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
resultCode
==
1
)
{
...
@@ -603,14 +557,18 @@ export default {
...
@@ -603,14 +557,18 @@ export default {
);
);
},
},
getDistrict
(
id
)
{
getDistrict
(
id
)
{
this
.
request2
(
this
.
request2
({
{
url
:
"/api/Hotel/GetHotelDestination"
,
url
:
"/api/Hotel/GetHotelDestination"
,
data
:
{
ID
:
id
},
data
:
{
ID
:
id
},
},
},
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
resultCode
==
1
)
{
this
.
DistrictOptions
=
[{
label
:
"不限"
,
value
:
0
}];
this
.
DistrictOptions
=
[{
label
:
"不限"
,
value
:
0
}];
res
.
data
.
map
((
i
)
=>
{
res
.
data
.
map
((
i
)
=>
{
let
obj
=
{
let
obj
=
{
label
:
i
.
Name
,
label
:
i
.
Name
,
...
@@ -632,17 +590,22 @@ export default {
...
@@ -632,17 +590,22 @@ export default {
this
.
optionsTitle
[
1
]
=
res
[
0
].
label
;
this
.
optionsTitle
[
1
]
=
res
[
0
].
label
;
},
},
},
},
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
/
deep
/
.u-flex
{
/
deep
/
.u-dropdown-item
scroll-view
{
height
:
100vh
!
important
;
}
/
deep
/
.u-flex
{
justify-content
:
center
;
justify-content
:
center
;
}
}
.hotel-list
{
.hotel-list
{
height
:
100vh
;
height
:
100vh
;
}
}
.hotel-list
.hotel-city
{
.hotel-list
.hotel-city
{
width
:
105rpx
;
width
:
105rpx
;
height
:
40rpx
;
height
:
40rpx
;
padding
:
0rpx
10rpx
8rpx
0rpx
;
padding
:
0rpx
10rpx
8rpx
0rpx
;
...
@@ -656,9 +619,9 @@ export default {
...
@@ -656,9 +619,9 @@ export default {
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
}
}
.hotel-list
.search-box
{
.hotel-list
.search-box
{
height
:
88rpx
;
height
:
88rpx
;
background
:
#ecf1f4
;
background
:
#ecf1f4
;
border-radius
:
44rpx
;
border-radius
:
44rpx
;
...
@@ -666,9 +629,9 @@ export default {
...
@@ -666,9 +629,9 @@ export default {
align-items
:
center
;
align-items
:
center
;
padding
:
19rpx
30rpx
;
padding
:
19rpx
30rpx
;
margin
:
0
30rpx
;
margin
:
0
30rpx
;
}
}
.hotel-list
.search-box
.date
{
.hotel-list
.search-box
.date
{
width
:
82rpx
;
width
:
82rpx
;
height
:
50rpx
;
height
:
50rpx
;
font-size
:
22rpx
;
font-size
:
22rpx
;
...
@@ -676,22 +639,22 @@ export default {
...
@@ -676,22 +639,22 @@ export default {
color
:
#111111
;
color
:
#111111
;
line-height
:
29rpx
;
line-height
:
29rpx
;
margin-top
:
-6px
;
margin-top
:
-6px
;
}
}
.hotel-list
.search-box
.days
{
.hotel-list
.search-box
.days
{
height
:
40rpx
;
height
:
40rpx
;
padding
:
8rpx
20rpx
8rpx
10rpx
;
padding
:
8rpx
20rpx
8rpx
10rpx
;
color
:
#dfbe6e
;
color
:
#dfbe6e
;
border-right
:
1px
solid
#e2e2e2
;
border-right
:
1px
solid
#e2e2e2
;
font-size
:
24rpx
;
font-size
:
24rpx
;
}
}
.hotel-rate-box
{
.hotel-rate-box
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
}
}
.hotel-rate
{
.hotel-rate
{
width
:
160rpx
;
width
:
160rpx
;
height
:
60rpx
;
height
:
60rpx
;
background
:
#ecf1f4
;
background
:
#ecf1f4
;
...
@@ -701,26 +664,26 @@ export default {
...
@@ -701,26 +664,26 @@ export default {
line-height
:
60rpx
;
line-height
:
60rpx
;
margin-right
:
15rpx
;
margin-right
:
15rpx
;
text-align
:
center
;
text-align
:
center
;
}
}
.hotel-rate
:last-child
{
.hotel-rate
:last-child
{
margin-right
:
0
;
margin-right
:
0
;
}
}
.hotel-rate.active
{
.hotel-rate.active
{
background
:
#111111
;
background
:
#111111
;
color
:
#ffffff
;
color
:
#ffffff
;
}
}
.hotel-list
.morewhere
{
.hotel-list
.morewhere
{
padding
:
10rpx
30rpx
;
padding
:
10rpx
30rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
overflow-x
:
auto
;
overflow-x
:
auto
;
flex-wrap
:
nowrap
;
flex-wrap
:
nowrap
;
}
}
.hotel-list
.morewhere
.item
{
.hotel-list
.morewhere
.item
{
padding
:
0
20rpx
;
padding
:
0
20rpx
;
height
:
36rpx
;
height
:
36rpx
;
line-height
:
36rpx
;
line-height
:
36rpx
;
...
@@ -731,18 +694,18 @@ export default {
...
@@ -731,18 +694,18 @@ export default {
color
:
#999999
;
color
:
#999999
;
font-weight
:
400
;
font-weight
:
400
;
flex-shrink
:
0
;
flex-shrink
:
0
;
}
}
.hotel-list
.morewhere
.item.active
{
.hotel-list
.morewhere
.item.active
{
background
:
#111111
;
background
:
#111111
;
color
:
#ffffff
;
color
:
#ffffff
;
}
}
.hotel-list
.morewhere
.item
:last-child
{
.hotel-list
.morewhere
.item
:last-child
{
margin-right
:
0
;
margin-right
:
0
;
}
}
.no-data
{
.no-data
{
.no-data-img
{
.no-data-img
{
width
:
180rpx
;
width
:
180rpx
;
height
:
240rpx
;
height
:
240rpx
;
...
@@ -758,5 +721,5 @@ export default {
...
@@ -758,5 +721,5 @@ export default {
color
:
#999999
;
color
:
#999999
;
margin-top
:
20rpx
;
margin-top
:
20rpx
;
}
}
}
}
</
style
>
</
style
>
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