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
Hide 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
<
template
>
<
template
>
<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"
{{
city
}}
:size=
"24"
</view>
color=
"#000000"
style=
"margin-right: 8rpx"
></u-icon>
{{
city
}}
</view>
<view
class=
"date"
@
click=
"chosenDate"
>
<view
class=
"date"
@
click=
"chosenDate"
>
<view>
住
{{
startDay
}}
</view>
<view>
住
{{
startDay
}}
</view>
<view>
离
{{
endDay
}}
</view>
<view>
离
{{
endDay
}}
</view>
</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"
</view>
:value=
"searchObj.Name"
</view>
text-color=
"#111"
<u-popup
v-model=
"showCityList"
mode=
"bottom"
:border-radius=
"40"
:safe-area-inset-bottom=
"true"
>
bg-color=
"rgba(0,0,0,0)"
<Address
@
confirm=
"confirmCity"
:list=
"cityList"
/>
@
change=
"research()"
</u-popup>
:show-action=
"false"
<view>
></u-search>
<u-dropdown
ref=
"uDropdown"
@
open=
"open"
@
close=
"close"
active-color=
"#000"
inactive-color=
"#444"
>
</view>
<u-dropdown-item
v-model=
"searchObj.OrderByType"
:title=
"optionsTitle[0]"
:options=
"options1"
</view>
@
change=
"change"
>
<u-popup
</u-dropdown-item>
v-model=
"showCityList"
<u-dropdown-item
v-model=
"searchObj.District"
:title=
"optionsTitle[1]"
:options=
"DistrictOptions"
mode=
"bottom"
@
change=
"changeDistrict"
>
:border-radius=
"40"
<!--
<view
class=
"slot-content"
style=
"background-color: #FFFFFF;"
>
:safe-area-inset-bottom=
"true"
<scroll-view
scroll-y=
"true"
style=
"height: 200rpx;"
>
>
<view
v-for=
"(item.in)"
class=
"u-text-center u-content-color u-m-t-20 u-m-b-20"
>
无言独上西楼
</view>
<Address
@
confirm=
"confirmCity"
:list=
"cityList"
/>
<view
class=
"u-text-center u-content-color u-m-t-20 u-m-b-20"
>
月如钩
</view>
</u-popup>
<view
class=
"u-text-center u-content-color u-m-t-20 u-m-b-20"
>
寂寞梧桐深院锁清秋
</view>
<view>
<view
class=
"u-text-center u-content-color u-m-t-20 u-m-b-20"
>
剪不断
</view>
<u-dropdown
<view
class=
"u-text-center u-content-color u-m-t-20 u-m-b-20"
>
理还乱
</view>
ref=
"uDropdown"
<view
class=
"u-text-center u-content-color u-m-t-20 u-m-b-20"
>
是离愁
</view>
@
open=
"open"
<view
class=
"u-text-center u-content-color u-m-t-20 u-m-b-20"
>
别是一般滋味在心头
</view>
@
close=
"close"
</scroll-view>
active-color=
"#000"
inactive-color=
"#444"
</view>
-->
>
</u-dropdown-item>
<u-dropdown-item
<!--
<u-dropdown-item
v-model=
"searchObj.enclosure"
:title=
"optionsTitle[1]"
:options=
"options2"
@
change=
"change2"
></u-dropdown-item>
-->
v-model=
"searchObj.OrderByType"
<!--
<u-dropdown-item
:title=
"optionsTitle[2]"
>
:title=
"optionsTitle[0]"
:options=
"options1"
@
change=
"change"
>
</u-dropdown-item>
<u-dropdown-item
v-model=
"searchObj.District"
:title=
"optionsTitle[1]"
:options=
"DistrictOptions"
@
change=
"changeDistrict"
>
</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]"
>
<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"
<canlendar
@
finish=
"chosenDateResult"
></canlendar>
mode=
"bottom"
</u-popup>
border-radius=
"20"
<!--
<view
class=
"morewhere"
>
length=
"95%"
:safe-area-inset-bottom=
"true"
>
<canlendar
@
finish=
"chosenDateResult"
></canlendar>
</u-popup>
<view
class=
"morewhere"
>
<view
<view
v-for=
"(x, i) in searchObj.TagList"
v-for=
"(x, i) in searchObj.TagList"
class=
"item"
class=
"item"
...
@@ -167,596 +142,584 @@
...
@@ -167,596 +142,584 @@
: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"
<view
class=
"zhanwu"
>
暂无数据
</view>
class=
"no-data-img"
</view>
></image>
<scroll-view
:scroll-y=
"true"
@
scrolltolower=
"lower"
:enable-back-to-top=
"true"
:enable-flex=
"true"
<view
class=
"zhanwu"
>
暂无数据
</view>
:scroll-top=
"scrollTop"
@
scroll=
"scroll"
style=
"height: calc(100% - 224rpx); padding-bottom: 0px"
</view>
v-if=
"HotelList.length > 0"
>
<scroll-view
<hotel-good
:HotelList=
"HotelList"
:dayObj=
"dayObj"
:searchObj=
"searchObj"
></hotel-good>
:scroll-y=
"true"
<u-loadmore
v-if=
"showLoading"
:status=
"status"
:load-text=
"loadText"
:font-size=
"24"
:margin-top=
"20"
@
scrolltolower=
"lower"
:margin-bottom=
"20"
bg-color=
"#F5F5F5"
color=
"#111"
/>
:enable-back-to-top=
"true"
</scroll-view>
:enable-flex=
"true"
</view>
:scroll-top=
"scrollTop"
@
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>
</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
:
"成都"
,
cityList
:
[],
cityList
:
[],
showCityList
:
false
,
showCityList
:
false
,
showTimePopup
:
false
,
showTimePopup
:
false
,
searchObj
:
{
searchObj
:
{
pageIndex
:
1
,
pageIndex
:
1
,
pageSize
:
15
,
pageSize
:
15
,
Name
:
""
,
//关键字
Name
:
""
,
//关键字
StartPrice
:
0
,
StartPrice
:
0
,
EndPrice
:
1000
,
EndPrice
:
1000
,
QStartDate
:
""
,
QStartDate
:
""
,
QEndDate
:
""
,
QEndDate
:
""
,
OrderByType
:
"1"
,
//排序类型
OrderByType
:
"1"
,
//排序类型
QStars
:
""
,
//星级
QStars
:
""
,
//星级
TagList
:
[],
//查询标签
TagList
:
[],
//查询标签
City
:
262
,
//市
City
:
262
,
//市
District
:
0
,
//区
District
:
0
,
//区
},
},
day
:
0
,
day
:
0
,
startDay
:
""
,
startDay
:
""
,
endDay
:
""
,
endDay
:
""
,
HotelList
:
[],
//酒店数据
HotelList
:
[],
//酒店数据
tempRateAndPrice
:
{
tempRateAndPrice
:
{
price
:
{},
price
:
{},
priceText
:
"不限"
,
priceText
:
"不限"
,
rate
:
[],
rate
:
[],
},
},
optionsTitle
:
[
"推荐排序"
,
"区域"
,
"价格/星级"
,
"筛选"
],
optionsTitle
:
[
"推荐排序"
,
"区域"
,
"价格/星级"
,
"筛选"
],
rates
:
[],
rates
:
[],
options1
:
[],
//推荐排序数据
options1
:
[],
//推荐排序数据
options2
:
[
options2
:
[{
{
label
:
"不限"
,
label
:
"不限"
,
value
:
-
1
,
value
:
-
1
,
},
},
{
{
label
:
"宝镜岩"
,
label
:
"宝镜岩"
,
value
:
1
,
value
:
1
,
},
},
{
{
label
:
"盆景滩"
,
label
:
"盆景滩"
,
value
:
2
,
value
:
2
,
},
},
{
{
label
:
"芦苇海"
,
label
:
"芦苇海"
,
value
:
3
,
value
:
3
,
},
},
{
{
label
:
"五彩池"
,
label
:
"五彩池"
,
value
:
4
,
value
:
4
,
},
},
{
{
label
:
"镜海"
,
label
:
"镜海"
,
value
:
5
,
value
:
5
,
},
},
{
{
label
:
"犀牛海"
,
label
:
"犀牛海"
,
value
:
6
,
value
:
6
,
},
},
{
{
label
:
"诺日朗瀑布"
,
label
:
"诺日朗瀑布"
,
value
:
7
,
value
:
7
,
},
},
{
{
label
:
"火花海"
,
label
:
"火花海"
,
value
:
8
,
value
:
8
,
},
},
],
],
btnStyle
:
{
btnStyle
:
{
borderRadius
:
"16rpx"
,
borderRadius
:
"16rpx"
,
color
:
"#111"
,
color
:
"#111"
,
fontSize
:
"30rpx"
,
fontSize
:
"30rpx"
,
width
:
"100%"
,
width
:
"100%"
,
border
:
"1px solid #111"
,
border
:
"1px solid #111"
,
background
:
"#FFF"
,
background
:
"#FFF"
,
},
},
btnStyle2
:
{
btnStyle2
:
{
borderRadius
:
"16rpx"
,
borderRadius
:
"16rpx"
,
color
:
"#fff"
,
color
:
"#fff"
,
fontSize
:
"30rpx"
,
fontSize
:
"30rpx"
,
width
:
"100%"
,
width
:
"100%"
,
background
:
"#111"
,
background
:
"#111"
,
},
},
loadText
:
{
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多商品了"
,
nomore
:
"没有更多商品了"
,
},
},
scrollTop
:
0
,
scrollTop
:
0
,
old
:
{
old
:
{
scrollTop
:
0
,
scrollTop
:
0
,
},
},
showLoading
:
false
,
showLoading
:
false
,
status
:
"loadmore"
,
status
:
"loadmore"
,
page_count
:
0
,
page_count
:
0
,
dayObj
:
{},
dayObj
:
{},
DistrictOptions
:
[{
DistrictOptions
:
[{
label
:
"不限"
,
value
:
0
}],
label
:
"不限"
,
};
value
:
0
},
}],
components
:
{
};
rangeSlider
,
},
canlendar
,
components
:
{
hotelGood
,
rangeSlider
,
Address
,
canlendar
,
},
hotelGood
,
onLoad
(
options
)
{
Address
,
if
(
options
&&
options
.
Name
)
{
},
this
.
searchObj
.
Name
=
options
.
Name
;
onLoad
(
options
)
{
}
if
(
options
&&
options
.
Name
)
{
},
this
.
searchObj
.
Name
=
options
.
Name
;
created
()
{
}
uni
.
setNavigationBarTitle
({
},
title
:
"酒店"
,
created
()
{
});
uni
.
setNavigationBarTitle
({
let
d1
=
new
Date
();
title
:
"酒店"
,
let
d
=
new
Date
();
});
let
d2
=
new
Date
(
d
.
setDate
(
d
.
getDate
()
+
1
));
let
d1
=
new
Date
();
let
startWeek
=
"周"
+
"日一二三四五六"
.
charAt
(
new
Date
().
getDay
());
let
d
=
new
Date
();
let
endWeek
=
"周"
+
"日一二三四五六"
.
charAt
(
new
Date
().
getDay
()
+
1
);
let
d2
=
new
Date
(
d
.
setDate
(
d
.
getDate
()
+
1
));
var
obj
=
{
let
startWeek
=
"周"
+
"日一二三四五六"
.
charAt
(
new
Date
().
getDay
());
start
:
`
${
d1
.
getFullYear
()}
-
${
d1
.
getMonth
()
+
1
}
-
${
d1
.
getDate
()}
`
,
let
endWeek
=
"周"
+
"日一二三四五六"
.
charAt
(
new
Date
().
getDay
()
+
1
);
end
:
`
${
d2
.
getFullYear
()}
-
${
d2
.
getMonth
()
+
1
}
-
${
d2
.
getDate
()}
`
,
var
obj
=
{
startDay
:
`
${
d1
.
getMonth
()
+
1
}
-
${
d1
.
getDate
()}
`
,
start
:
`
${
d1
.
getFullYear
()}
-
${
d1
.
getMonth
()
+
1
}
-
${
d1
.
getDate
()}
`
,
endDay
:
`
${
d2
.
getMonth
()
+
1
}
-
${
d2
.
getDate
()}
`
,
end
:
`
${
d2
.
getFullYear
()}
-
${
d2
.
getMonth
()
+
1
}
-
${
d2
.
getDate
()}
`
,
day
:
1
,
startDay
:
`
${
d1
.
getMonth
()
+
1
}
-
${
d1
.
getDate
()}
`
,
startWeek
:
startWeek
,
endDay
:
`
${
d2
.
getMonth
()
+
1
}
-
${
d2
.
getDate
()}
`
,
endWeek
:
endWeek
,
day
:
1
,
};
startWeek
:
startWeek
,
this
.
dayObj
=
obj
;
endWeek
:
endWeek
,
uni
.
setStorage
({
};
key
:
"Time"
,
this
.
dayObj
=
obj
;
data
:
JSON
.
stringify
(
obj
),
uni
.
setStorage
({
});
key
:
"Time"
,
this
.
searchObj
.
QStartDate
=
obj
.
start
;
data
:
JSON
.
stringify
(
obj
),
this
.
searchObj
.
QEndDate
=
obj
.
end
;
});
this
.
startDay
=
obj
.
startDay
;
this
.
searchObj
.
QStartDate
=
obj
.
start
;
this
.
endDay
=
obj
.
endDay
;
this
.
searchObj
.
QEndDate
=
obj
.
end
;
this
.
day
=
obj
.
day
;
this
.
startDay
=
obj
.
startDay
;
this
.
getSearchCondition
();
this
.
endDay
=
obj
.
endDay
;
this
.
getList
();
this
.
day
=
obj
.
day
;
this
.
getCity
();
this
.
getSearchCondition
();
this
.
getDistrict
(
262
);
this
.
getList
();
},
this
.
getCity
();
methods
:
{
this
.
getDistrict
(
262
);
showCity
()
{
},
this
.
showCityList
=
true
;
methods
:
{
},
showCity
()
{
confirmCity
(
val
)
{
this
.
showCityList
=
true
;
this
.
searchObj
.
City
=
val
.
ID
;
},
this
.
showCityList
=
false
;
confirmCity
(
val
)
{
this
.
city
=
val
.
Name
;
this
.
searchObj
.
City
=
val
.
ID
;
this
.
getDistrict
(
val
.
ID
);
this
.
showCityList
=
false
;
this
.
searchObj
.
District
=
0
;
this
.
city
=
val
.
Name
;
this
.
searchObj
.
pageIndex
=
1
;
this
.
getDistrict
(
val
.
ID
);
this
.
optionsTitle
[
1
]
=
"区域"
;
this
.
searchObj
.
District
=
0
;
this
.
getList
();
this
.
searchObj
.
pageIndex
=
1
;
},
this
.
optionsTitle
[
1
]
=
"区域"
;
scroll
:
function
(
e
)
{
this
.
getList
();
this
.
old
.
scrollTop
=
e
.
detail
.
scrollTop
;
},
},
scroll
:
function
(
e
)
{
goTop
:
function
(
e
)
{
this
.
old
.
scrollTop
=
e
.
detail
.
scrollTop
;
this
.
scrollTop
=
this
.
old
.
scrollTop
;
},
this
.
$nextTick
(
function
()
{
goTop
:
function
(
e
)
{
this
.
scrollTop
=
0
;
this
.
scrollTop
=
this
.
old
.
scrollTop
;
});
this
.
$nextTick
(
function
()
{
},
this
.
scrollTop
=
0
;
research
()
{
});
this
.
searchObj
.
pageIndex
=
1
;
},
this
.
getList
(
1
);
research
()
{
},
this
.
searchObj
.
pageIndex
=
1
;
lower
(
e
)
{
this
.
getList
(
1
);
// TODO: 滚动到了底部,实现翻页加载
},
if
(
this
.
searchObj
.
pageIndex
<
this
.
page_count
)
{
lower
(
e
)
{
this
.
status
=
"loading"
;
// TODO: 滚动到了底部,实现翻页加载
this
.
searchObj
.
pageIndex
++
;
if
(
this
.
searchObj
.
pageIndex
<
this
.
page_count
)
{
this
.
getList
();
this
.
status
=
"loading"
;
}
else
{
this
.
searchObj
.
pageIndex
++
;
this
.
status
=
"nomore"
;
this
.
getList
();
}
}
else
{
},
this
.
status
=
"nomore"
;
chosenMorewhere
(
obj
)
{
}
if
(
obj
.
IsCheck
==
0
)
{
},
obj
.
IsCheck
=
1
;
chosenMorewhere
(
obj
)
{
}
else
{
if
(
obj
.
IsCheck
==
0
)
{
obj
.
IsCheck
=
0
;
obj
.
IsCheck
=
1
;
}
}
else
{
this
.
research
();
obj
.
IsCheck
=
0
;
},
}
chosenDateResult
(
obj
)
{
this
.
research
();
this
.
searchObj
.
QStartDate
=
obj
.
start
;
},
this
.
searchObj
.
QEndDate
=
obj
.
end
;
chosenDateResult
(
obj
)
{
this
.
startDay
=
obj
.
startDay
;
this
.
searchObj
.
QStartDate
=
obj
.
start
;
this
.
endDay
=
obj
.
endDay
;
this
.
searchObj
.
QEndDate
=
obj
.
end
;
this
.
day
=
obj
.
day
;
this
.
startDay
=
obj
.
startDay
;
this
.
dayObj
=
obj
;
this
.
endDay
=
obj
.
endDay
;
this
.
research
();
this
.
day
=
obj
.
day
;
this
.
showTimePopup
=
false
;
this
.
dayObj
=
obj
;
},
this
.
research
();
chosenDate
()
{
this
.
showTimePopup
=
false
;
this
.
showTimePopup
=
true
;
},
},
chosenDate
()
{
setHotelRate
(
rateId
)
{
this
.
showTimePopup
=
true
;
let
temp
=
this
.
tempRateAndPrice
.
rate
.
indexOf
(
rateId
);
},
if
(
temp
==
-
1
)
{
setHotelRate
(
rateId
)
{
this
.
tempRateAndPrice
.
rate
.
push
(
rateId
);
let
temp
=
this
.
tempRateAndPrice
.
rate
.
indexOf
(
rateId
);
}
else
{
if
(
temp
==
-
1
)
{
this
.
tempRateAndPrice
.
rate
.
splice
(
temp
,
1
);
this
.
tempRateAndPrice
.
rate
.
push
(
rateId
);
}
}
else
{
},
this
.
tempRateAndPrice
.
rate
.
splice
(
temp
,
1
);
resetPrice
()
{
}
this
.
optionsTitle
[
2
]
=
"价格/星级"
;
},
var
obj
=
this
.
$refs
.
rangeslider
;
resetPrice
()
{
obj
.
progressBarLeft
=
0
;
this
.
optionsTitle
[
2
]
=
"价格/星级"
;
obj
.
progressBarWidth
=
obj
.
_getMaxLength
();
var
obj
=
this
.
$refs
.
rangeslider
;
obj
.
minBlockLeft
=
0
;
obj
.
progressBarLeft
=
0
;
obj
.
maxBlockLeft
=
obj
.
_getMaxLength
();
obj
.
progressBarWidth
=
obj
.
_getMaxLength
();
this
.
tempRateAndPrice
=
{
obj
.
minBlockLeft
=
0
;
price
:
{
obj
.
maxBlockLeft
=
obj
.
_getMaxLength
();
minValue
:
0
,
this
.
tempRateAndPrice
=
{
maxValue
:
1000
,
price
:
{
},
minValue
:
0
,
priceText
:
"不限"
,
maxValue
:
1000
,
rate
:
[],
},
};
priceText
:
"不限"
,
this
.
closeDropdown
();
rate
:
[],
this
.
searchObj
.
StartPrice
=
0
;
};
this
.
searchObj
.
EndPrice
=
1000
;
this
.
closeDropdown
();
this
.
research
();
this
.
searchObj
.
StartPrice
=
0
;
},
this
.
searchObj
.
EndPrice
=
1000
;
surePrice
()
{
this
.
research
();
let
result
=
""
;
},
if
(
this
.
tempRateAndPrice
.
rate
.
length
>
0
)
{
surePrice
()
{
this
.
rates
.
forEach
((
x
)
=>
{
let
result
=
""
;
if
(
this
.
tempRateAndPrice
.
rate
.
indexOf
(
x
.
value
)
!=
-
1
)
{
if
(
this
.
tempRateAndPrice
.
rate
.
length
>
0
)
{
result
+=
x
.
label
+
","
;
this
.
rates
.
forEach
((
x
)
=>
{
}
if
(
this
.
tempRateAndPrice
.
rate
.
indexOf
(
x
.
value
)
!=
-
1
)
{
});
result
+=
x
.
label
+
","
;
}
}
if
(
this
.
tempRateAndPrice
.
priceText
!=
"不限"
)
{
});
result
+=
this
.
tempRateAndPrice
.
priceText
;
}
}
if
(
this
.
tempRateAndPrice
.
priceText
!=
"不限"
)
{
result
=
result
==
""
?
"价格/星级"
:
result
;
result
+=
this
.
tempRateAndPrice
.
priceText
;
this
.
optionsTitle
[
2
]
=
result
;
}
this
.
$forceUpdate
();
result
=
result
==
""
?
"价格/星级"
:
result
;
this
.
closeDropdown
();
this
.
optionsTitle
[
2
]
=
result
;
this
.
research
();
this
.
$forceUpdate
();
},
this
.
closeDropdown
();
rangechange4
(
e
)
{
this
.
research
();
this
.
searchObj
.
StartPrice
=
e
.
minValue
;
},
this
.
searchObj
.
EndPrice
=
e
.
maxValue
;
rangechange4
(
e
)
{
if
(
e
.
minValue
==
0
)
{
this
.
searchObj
.
StartPrice
=
e
.
minValue
;
if
(
e
.
maxValue
==
1000
)
{
this
.
searchObj
.
EndPrice
=
e
.
maxValue
;
this
.
tempRateAndPrice
.
priceText
=
"不限"
;
if
(
e
.
minValue
==
0
)
{
}
else
{
if
(
e
.
maxValue
==
1000
)
{
this
.
tempRateAndPrice
.
priceText
=
`¥
${
e
.
maxValue
}
以下`
;
this
.
tempRateAndPrice
.
priceText
=
"不限"
;
}
}
else
{
}
else
if
(
e
.
maxValue
==
1000
)
{
this
.
tempRateAndPrice
.
priceText
=
`¥
${
e
.
maxValue
}
以下`
;
this
.
tempRateAndPrice
.
priceText
=
`¥
${
e
.
minValue
}
以上`
;
}
}
else
{
}
else
if
(
e
.
maxValue
==
1000
)
{
this
.
tempRateAndPrice
.
priceText
=
`¥
${
e
.
minValue
}
- ¥
${
e
.
maxValue
}
之间`
;
this
.
tempRateAndPrice
.
priceText
=
`¥
${
e
.
minValue
}
以上`
;
}
}
else
{
},
this
.
tempRateAndPrice
.
priceText
=
`¥
${
e
.
minValue
}
- ¥
${
e
.
maxValue
}
之间`
;
closeDropdown
()
{
}
this
.
$refs
.
uDropdown
.
close
();
},
},
closeDropdown
()
{
open
(
index
)
{
this
.
$refs
.
uDropdown
.
close
();
// 展开某个下来菜单时,先关闭原来的其他菜单的高亮
},
// 同时内部会自动给当前展开项进行高亮
open
(
index
)
{
this
.
$refs
.
uDropdown
.
highlight
();
// 展开某个下来菜单时,先关闭原来的其他菜单的高亮
if
(
index
==
2
)
{
// 同时内部会自动给当前展开项进行高亮
// this.tempRateAndPrice = this.searchObj.rateAndPrice
this
.
$refs
.
uDropdown
.
highlight
();
}
if
(
index
==
2
)
{
},
// this.tempRateAndPrice = this.searchObj.rateAndPrice
close
(
index
)
{
}
// 关闭的时候,给当前项加上高亮
},
// 当然,您也可以通过监听dropdown-item的@change事件进行处理
close
(
index
)
{
this
.
$refs
.
uDropdown
.
highlight
(
index
);
// 关闭的时候,给当前项加上高亮
},
// 当然,您也可以通过监听dropdown-item的@change事件进行处理
change
(
index
)
{
this
.
$refs
.
uDropdown
.
highlight
(
index
);
let
temp
=
this
.
options1
.
find
((
x
)
=>
{
},
if
(
x
.
value
==
index
)
{
change
(
index
)
{
return
x
;
let
temp
=
this
.
options1
.
find
((
x
)
=>
{
}
else
{
if
(
x
.
value
==
index
)
{
return
false
;
return
x
;
}
}
else
{
});
return
false
;
this
.
optionsTitle
[
0
]
=
temp
.
label
;
}
this
.
research
();
});
},
this
.
optionsTitle
[
0
]
=
temp
.
label
;
change2
(
index
)
{
this
.
research
();
if
(
index
!=
-
1
)
{
},
let
temp
=
this
.
options2
.
find
((
x
)
=>
{
change2
(
index
)
{
if
(
x
.
value
==
index
)
{
if
(
index
!=
-
1
)
{
return
x
;
let
temp
=
this
.
options2
.
find
((
x
)
=>
{
}
else
{
if
(
x
.
value
==
index
)
{
return
false
;
return
x
;
}
}
else
{
});
return
false
;
this
.
optionsTitle
[
1
]
=
temp
.
label
;
}
}
else
{
});
this
.
optionsTitle
[
1
]
=
"附近"
;
this
.
optionsTitle
[
1
]
=
temp
.
label
;
}
}
else
{
},
this
.
optionsTitle
[
1
]
=
"附近"
;
//获取查询条件
}
getSearchCondition
()
{
},
this
.
request2
(
//获取查询条件
{
getSearchCondition
()
{
url
:
"/api/Hotel/GetHotelQuery"
,
this
.
request2
({
data
:
{},
url
:
"/api/Hotel/GetHotelQuery"
,
},
data
:
{},
(
res
)
=>
{
},
if
(
res
.
resultCode
==
1
)
{
(
res
)
=>
{
let
tempObj
=
res
.
data
;
if
(
res
.
resultCode
==
1
)
{
this
.
options1
=
[];
let
tempObj
=
res
.
data
;
this
.
rates
=
[];
this
.
options1
=
[];
if
(
tempObj
&&
tempObj
.
OrderByList
.
length
>
0
)
{
this
.
rates
=
[];
tempObj
.
OrderByList
.
forEach
((
x
)
=>
{
if
(
tempObj
&&
tempObj
.
OrderByList
.
length
>
0
)
{
let
obj
=
{
tempObj
.
OrderByList
.
forEach
((
x
)
=>
{
label
:
x
.
Name
,
let
obj
=
{
value
:
x
.
Id
,
label
:
x
.
Name
,
};
value
:
x
.
Id
,
this
.
options1
.
push
(
obj
);
};
});
this
.
options1
.
push
(
obj
);
}
});
if
(
tempObj
&&
tempObj
.
TagList
)
{
}
this
.
searchObj
.
TagList
=
tempObj
.
TagList
;
if
(
tempObj
&&
tempObj
.
TagList
)
{
}
this
.
searchObj
.
TagList
=
tempObj
.
TagList
;
if
(
tempObj
&&
tempObj
.
StarList
)
{
}
this
.
rates
=
tempObj
.
StarList
;
if
(
tempObj
&&
tempObj
.
StarList
)
{
}
this
.
rates
=
tempObj
.
StarList
;
}
}
},
}
(
err
)
=>
{}
},
);
(
err
)
=>
{}
},
);
//获取列表数据
},
getList
(
type
)
{
//获取列表数据
this
.
searchObj
.
QStars
=
this
.
tempRateAndPrice
.
rate
.
toString
();
getList
(
type
)
{
if
(
type
==
1
)
{
this
.
searchObj
.
QStars
=
this
.
tempRateAndPrice
.
rate
.
toString
();
this
.
HotelList
=
[];
if
(
type
==
1
)
{
}
this
.
HotelList
=
[];
this
.
request2
(
}
{
this
.
request2
({
url
:
"/api/Hotel/AppGetHotelPage"
,
url
:
"/api/Hotel/AppGetHotelPage"
,
data
:
this
.
searchObj
,
data
:
this
.
searchObj
,
},
},
(
res
)
=>
{
(
res
)
=>
{
if
(
res
.
resultCode
==
1
)
{
if
(
res
.
resultCode
==
1
)
{
if
(
this
.
searchObj
.
pageIndex
===
1
)
{
if
(
this
.
searchObj
.
pageIndex
===
1
)
{
this
.
HotelList
=
res
.
data
.
pageData
;
this
.
HotelList
=
res
.
data
.
pageData
;
}
else
{
}
else
{
this
.
HotelList
=
this
.
HotelList
.
concat
(
res
.
data
.
pageData
);
this
.
HotelList
=
this
.
HotelList
.
concat
(
res
.
data
.
pageData
);
}
}
this
.
page_count
=
res
.
data
.
pageCount
;
this
.
page_count
=
res
.
data
.
pageCount
;
}
}
}
}
);
);
},
},
getCity
()
{
getCity
()
{
this
.
request2
(
this
.
request2
({
{
url
:
"/api/Hotel/GetHotelDestination"
,
url
:
"/api/Hotel/GetHotelDestination"
,
data
:
{
data
:
{
ID
:
0
},
ID
:
0
},
},
(
res
)
=>
{
},
if
(
res
.
resultCode
==
1
)
{
(
res
)
=>
{
this
.
cityList
=
[];
if
(
res
.
resultCode
==
1
)
{
res
.
data
.
map
((
i
)
=>
{
this
.
cityList
=
[];
let
initial
=
i
.
PinYin
.
slice
(
0
,
1
);
res
.
data
.
map
((
i
)
=>
{
let
initial
=
i
.
PinYin
.
slice
(
0
,
1
);
let
find
=
this
.
cityList
.
filter
((
e
)
=>
{
let
find
=
this
.
cityList
.
filter
((
e
)
=>
{
return
e
.
letter
==
initial
;
return
e
.
letter
==
initial
;
});
});
if
(
find
.
length
>
0
)
{
if
(
find
.
length
>
0
)
{
find
[
0
].
citylist
.
push
(
i
);
find
[
0
].
citylist
.
push
(
i
);
}
else
{
}
else
{
let
obj
=
{
let
obj
=
{
letter
:
initial
,
letter
:
initial
,
citylist
:
[
i
],
citylist
:
[
i
],
};
};
// obj.citylist[0]=i
// obj.citylist[0]=i
this
.
cityList
.
push
(
obj
);
this
.
cityList
.
push
(
obj
);
}
}
});
});
}
}
},
},
(
err
)
=>
{}
(
err
)
=>
{}
);
);
},
},
getDistrict
(
id
)
{
getDistrict
(
id
)
{
this
.
request2
(
this
.
request2
({
{
url
:
"/api/Hotel/GetHotelDestination"
,
url
:
"/api/Hotel/GetHotelDestination"
,
data
:
{
data
:
{
ID
:
id
},
ID
:
id
},
},
(
res
)
=>
{
},
if
(
res
.
resultCode
==
1
)
{
(
res
)
=>
{
this
.
DistrictOptions
=
[{
label
:
"不限"
,
value
:
0
}];
if
(
res
.
resultCode
==
1
)
{
res
.
data
.
map
((
i
)
=>
{
this
.
DistrictOptions
=
[{
let
obj
=
{
label
:
"不限"
,
label
:
i
.
Name
,
value
:
0
value
:
i
.
ID
,
}];
};
res
.
data
.
map
((
i
)
=>
{
this
.
DistrictOptions
.
push
(
obj
);
let
obj
=
{
});
label
:
i
.
Name
,
}
value
:
i
.
ID
,
},
};
(
err
)
=>
{}
this
.
DistrictOptions
.
push
(
obj
);
);
});
},
}
changeDistrict
(
val
)
{
},
this
.
searchObj
.
pageIndex
=
1
;
(
err
)
=>
{}
this
.
getList
();
);
let
res
=
this
.
DistrictOptions
.
filter
((
i
)
=>
{
},
return
i
.
value
==
val
;
changeDistrict
(
val
)
{
});
this
.
searchObj
.
pageIndex
=
1
;
this
.
optionsTitle
[
1
]
=
res
[
0
].
label
;
this
.
getList
();
},
let
res
=
this
.
DistrictOptions
.
filter
((
i
)
=>
{
},
return
i
.
value
==
val
;
};
});
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
{
justify-content
:
center
;
height
:
100vh
!
important
;
}
}
.hotel-list
{
/
deep
/
.u-flex
{
height
:
100vh
;
justify-content
:
center
;
}
}
.hotel-list
.hotel-city
{
width
:
105rpx
;
.hotel-list
{
height
:
40rpx
;
height
:
100vh
;
padding
:
0rpx
10rpx
8rpx
0rpx
;
}
margin-right
:
20rpx
;
text-align
:
center
;
.hotel-list
.hotel-city
{
/* color: #DFBE6E; */
width
:
105rpx
;
border-right
:
1px
solid
#e2e2e2
;
height
:
40rpx
;
font-size
:
28rpx
;
padding
:
0rpx
10rpx
8rpx
0rpx
;
white-space
:
nowrap
;
margin-right
:
20rpx
;
overflow
:
hidden
;
text-align
:
center
;
text-overflow
:
ellipsis
;
/* color: #DFBE6E; */
display
:
flex
;
border-right
:
1px
solid
#e2e2e2
;
align-items
:
center
;
font-size
:
28rpx
;
}
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
flex
;
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
;
display
:
flex
;
display
:
flex
;
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
;
font-weight
:
500
;
font-weight
:
500
;
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
;
border-radius
:
10rpx
;
border-radius
:
10rpx
;
font-size
:
26rpx
;
font-size
:
26rpx
;
color
:
#999999
;
color
:
#999999
;
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
;
background
:
#ecf1f4
;
background
:
#ecf1f4
;
border-radius
:
8rpx
;
border-radius
:
8rpx
;
margin-right
:
26rpx
;
margin-right
:
26rpx
;
font-size
:
22rpx
;
font-size
:
22rpx
;
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
;
margin-left
:
50%
;
margin-left
:
50%
;
transform
:
translateX
(
-50%
);
transform
:
translateX
(
-50%
);
}
}
.zhanwu
{
.zhanwu
{
text-align
:
center
;
text-align
:
center
;
font-size
:
28rpx
;
font-size
:
28rpx
;
font-family
:
PingFang
SC
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
font-weight
:
500
;
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