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
8ccd26d9
Commit
8ccd26d9
authored
May 25, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善酒店列表信息
parent
4c5be41b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
117 additions
and
6 deletions
+117
-6
u-dropdown.vue
node_modules/uview-ui/components/u-dropdown/u-dropdown.vue
+1
-1
hotel-good.vue
pages/hotel/components/hotel-good.vue
+8
-0
list.vue
pages/hotel/list.vue
+106
-3
api.js
plugin/api.js
+2
-2
No files found.
node_modules/uview-ui/components/u-dropdown/u-dropdown.vue
View file @
8ccd26d9
<
template
>
<view
class=
"u-dropdown"
style=
"padding: 0
15
px;"
>
<view
class=
"u-dropdown"
style=
"padding: 0
30r
px;"
>
<view
class=
"u-dropdown__menu"
:style=
"
{
height: $u.addUnit(height)
}" :class="{
...
...
pages/hotel/components/hotel-good.vue
0 → 100644
View file @
8ccd26d9
<
template
>
</
template
>
<
script
>
</
script
>
<
style
>
</
style
>
pages/hotel/list.vue
View file @
8ccd26d9
...
...
@@ -51,12 +51,22 @@
<u-popup
v-model=
"showTimePopup"
mode=
"bottom"
border-radius=
"20"
length=
"95%"
:safe-area-inset-bottom=
"true"
>
<canlendar
@
finish=
"chosenDateResult"
></canlendar>
</u-popup>
<view
class=
"morewhere"
>
<view
v-for=
"(x,i) in threeLevelList"
class=
"item"
@
click=
"chosenMorewhere(x.id)"
:class=
"
{'active':searchObj.moreSearch.indexOf(x.id)!=-1}">
{{
x
.
name
}}
</view>
</view>
<scroll-view
:scroll-y=
"true"
@
scrolltolower=
"lower"
:enable-back-to-top=
"true"
:enable-flex=
"true"
:scroll-top=
"scrollTop"
@
scroll=
"scroll"
style=
"height: calc(100% - 224rpx); padding-bottom: 0px;"
>
<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
>
<
script
>
import
rangeSlider
from
"./components/range-slider.vue"
import
canlendar
from
"./components/time/index.vue"
import
hotelGood
from
'./components/hotel-good.vue'
;
export
default
{
data
()
{
return
{
...
...
@@ -73,7 +83,8 @@
priceText
:
"不限"
,
rate
:[]
},
date
:{}
date
:{},
moreSearch
:[]
},
tempRateAndPrice
:{
price
:{},
...
...
@@ -174,12 +185,50 @@
fontSize
:
'30rpx'
,
width
:
'100%'
,
background
:
"#111"
}
},
threeLevelList
:[
{
name
:
"民宿"
,
id
:
0
},
{
name
:
"大床房"
,
id
:
1
},
{
name
:
"双床房"
,
id
:
2
},
{
name
:
"含早餐"
,
id
:
3
},
{
name
:
"免费取消"
,
id
:
4
},
{
name
:
"优惠活动"
,
id
:
5
}
],
loadText
:
{
loadmore
:
"轻轻上拉,加载更多"
,
loading
:
"努力加载中"
,
nomore
:
"没有更多商品了"
,
},
scrollTop
:
0
,
old
:
{
scrollTop
:
0
,
},
showLoading
:
false
,
status
:
"loadmore"
,
}
},
components
:
{
rangeSlider
,
canlendar
canlendar
,
hotelGood
},
created
()
{
uni
.
setNavigationBarTitle
({
...
...
@@ -202,6 +251,34 @@
this
.
searchObj
.
date
=
obj
},
methods
:
{
scroll
:
function
(
e
)
{
this
.
old
.
scrollTop
=
e
.
detail
.
scrollTop
;
},
goTop
:
function
(
e
)
{
this
.
scrollTop
=
this
.
old
.
scrollTop
;
this
.
$nextTick
(
function
()
{
this
.
scrollTop
=
0
;
});
},
lower
(
e
)
{
// TODO: 滚动到了底部,实现翻页加载
// if (this.msg.pageIndex
<
this
.
page_count
)
{
// this.status = "loading";
// this.msg.pageIndex++;
// this.init();
// } else {
// this.isover = true;
// this.status = "nomore";
// }
},
chosenMorewhere
(
id
){
let
i
=
this
.
searchObj
.
moreSearch
.
indexOf
(
id
)
if
(
i
==-
1
){
this
.
searchObj
.
moreSearch
.
push
(
id
)
}
else
{
this
.
searchObj
.
moreSearch
.
splice
(
i
,
1
)
}
},
chosenDateResult
(
obj
){
this
.
searchObj
.
date
=
obj
this
.
showTimePopup
=
false
...
...
@@ -362,4 +439,30 @@
background
:
#111111
;
color
:
#FFFFFF
;
}
.hotel-list
.morewhere
{
padding
:
10
rpx
30
rpx
;
display
:
flex
;
align-items
:
center
;
overflow-x
:
auto
;
flex-wrap
:
nowrap
;
}
.hotel-list
.morewhere
.item
{
padding
:
0
20
rpx
;
height
:
36
rpx
;
line-height
:
36
rpx
;
background
:
#ECF1F4
;
border-radius
:
8
rpx
;
margin-right
:
26
rpx
;
font-size
:
22
rpx
;
color
:
#999999
;
font-weight
:
400
;
flex-shrink
:
0
;
}
.hotel-list
.morewhere
.item.active
{
background
:
#111111
;
color
:
#FFFFFF
;
}
.hotel-list
.morewhere
.item
:last-child
{
margin-right
:
0
;
}
</
style
>
plugin/api.js
View file @
8ccd26d9
...
...
@@ -4,8 +4,8 @@ export default {
// Vue.prototype.host2 = "http://192.168.0.110:8200"
// Vue.prototype.host2 = "https://mallApi.oytour.com"
// Vue.prototype.host2 = "http://192.168.1.5:8088"
//
Vue.prototype.host2 = "http://192.168.20.17:8014"
Vue
.
prototype
.
host2
=
"http://192.168.20.13:8088"
Vue
.
prototype
.
host2
=
"http://192.168.20.17:8014"
//
Vue.prototype.host2 = "http://192.168.20.13:8088"
// Vue.prototype.host2 = "http://testmall.oytour.com/"
Vue
.
prototype
.
request
=
function
(
param
,
success
,
failed
)
{
...
...
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