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
2acf50ba
Commit
2acf50ba
authored
May 26, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
酒店详情
parent
3e7ebd05
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1366 additions
and
3 deletions
+1366
-3
pages.json
pages.json
+6
-0
near-good.vue
pages/hotel/components/near-good.vue
+30
-0
recommed-hotel.vue
pages/hotel/components/recommed-hotel.vue
+136
-0
room-good.vue
pages/hotel/components/room-good.vue
+167
-0
room-good2.vue
pages/hotel/components/room-good2.vue
+163
-0
index.vue
pages/hotel/components/time/index.vue
+5
-3
detail.vue
pages/hotel/detail.vue
+856
-0
list.vue
pages/hotel/list.vue
+3
-0
No files found.
pages.json
View file @
2acf50ba
...
...
@@ -711,6 +711,12 @@
"path"
:
"list"
},{
"path"
:
"components/time/index"
},{
"path"
:
"detail"
,
"enablePullDownRefresh"
:
true
,
"style"
:
{
"navigationStyle"
:
"custom"
}
}]
}
],
...
...
pages/hotel/components/near-good.vue
0 → 100644
View file @
2acf50ba
<
template
>
<view
class=
"near-good"
>
<image
src=
"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg"
mode=
"aspectFill"
></image>
<view
class=
"good-name"
>
上海宋城
</view>
</view>
</
template
>
<
script
>
</
script
>
<
style
>
.near-good
{
margin-right
:
20
rpx
;
flex-shrink
:
0
;
}
.near-good
image
{
width
:
200
rpx
;
height
:
200
rpx
;
border-radius
:
20
rpx
;
margin-bottom
:
29
rpx
;
}
.near-good
.good-name
{
font-weight
:
bold
;
color
:
#1F1F1F
;
font-size
:
28
rpx
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
white-space
:
nowrap
;
}
</
style
>
pages/hotel/components/recommed-hotel.vue
0 → 100644
View file @
2acf50ba
<
template
>
<view
class=
"hotel-list-item"
>
<view
class=
"img-box"
>
<image
src=
"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png"
mode=
"aspectFill"
></image>
</view>
<view
class=
"hotel-info"
>
<view
class=
"hotel-name"
>
乐山禅驿·嘉定院子酒店
</view>
<view
class=
"hotel-start"
>
<!-- TODO:判定是否为星级酒店,如果是显示星级,不是,显示另外一种方式 -->
<view
class=
"rate"
v-if=
"hotelType==0"
>
<u-rate
active-color=
"#FEB969"
inactive-color=
"#FFF"
current=
"4"
active-icon=
"star"
inactive-icon=
"star"
disabled
></u-rate>
<text
style=
"margin-left: 20rpx;vertical-align: top;"
>
四星
</text>
</view>
<view
class=
"other-rate"
v-if=
"hotelType==1"
>
<text>
温泉酒店
</text>
<span
class=
"line"
></span>
</view>
<view
class=
"other-rate"
v-if=
"hotelType==2"
>
<text>
精选民宿
</text>
<span
class=
"line"
></span>
</view>
</view>
<view
class=
"localtion"
>
距该酒店直线4.1公里·近九寨千古情景区·沟口
</view>
<view>
<u-tag
text=
"亲子设施"
bg-color=
"#FFF"
border-color=
"#DFBE6E"
color=
"#DFBE6E"
size=
"mini"
></u-tag>
</view>
<view
class=
"price"
>
<text>
¥
</text>
<text
class=
"money"
>
599
</text>
<text>
起
</text>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
props
:{
hotelType
:{
type
:
Number
,
default
:
0
}
},
data
()
{
return
{
key
:
value
}
},
}
</
script
>
<
style
>
.hotel-list-item
{
margin
:
30
rpx
0
;
padding-bottom
:
30
rpx
;
/* border-bottom: 1rpx solid #E2E2E2; */
display
:
flex
;
align-items
:
center
;
}
.hotel-list-item
.img-box
{
width
:
220
rpx
;
height
:
280
rpx
;
border-radius
:
20
rpx
;
overflow
:
hidden
;
margin-right
:
30
rpx
;
}
.hotel-list-item
.img-box
image
{
width
:
100%
;
}
.hotel-list-item
.hotel-info
{
width
:
1px
;
flex
:
1
;
}
.hotel-list-item
.hotel-info
.hotel-name
{
font-weight
:
500
;
color
:
#111111
;
line-height
:
30
rpx
;
font-size
:
30
rpx
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.hotel-list-item
.hotel-info
.hotel-start
{
margin
:
10
rpx
0
;
}
.hotel-list-item
.hotel-info
.hotel-start
.rate
{
font-size
:
30
rpx
;
font-weight
:
500
;
color
:
#999999
;
line-height
:
30
rpx
;
}
.hotel-list-item
.hotel-info
.hotel-start
.other-rate
{
display
:
inline-block
;
position
:
relative
;
}
.hotel-list-item
.hotel-info
.hotel-start
.other-rate
text
{
position
:
relative
;
z-index
:
2
;
font-size
:
30
rpx
;
line-height
:
30
rpx
;
font-weight
:
500
;
color
:
#111
;
}
.hotel-list-item
.hotel-info
.hotel-start
.other-rate
.line
{
background-color
:
#DFBE6E
;
height
:
6px
;
bottom
:
2px
;
left
:
0
;
right
:
0
;
position
:
absolute
;
z-index
:
1
;
}
.hotel-list-item
.hotel-info
.localtion
{
font-size
:
24
rpx
;
font-weight
:
400
;
color
:
#999999
;
line-height
:
30
rpx
;
text-overflow
:
-o-ellipsis-lastline
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
margin-bottom
:
10
rpx
;
}
.hotel-list-item
.hotel-info
.price
{
margin-top
:
10
rpx
;
font-weight
:
500
;
color
:
#000
;
font-size
:
20
rpx
;
text-align
:
right
;
}
.hotel-list-item
.hotel-info
.price
.money
{
font-size
:
36
rpx
;
}
</
style
>
pages/hotel/components/room-good.vue
0 → 100644
View file @
2acf50ba
<
template
>
<view
class=
"room-good"
>
<view
class=
"rm-left"
>
<image
src=
"https://ak-d.tripcdn.com/images/0206l120008hti7x86A59_R_1080_808_R5_D.jpg"
mode=
"aspectFill"
>
</image>
<view
class=
"mark"
>
12
</view>
</view>
<view
class=
"rm-right"
>
<view
class=
"room-name"
>
藏韵高级双床房
</view>
<view
class=
"f11"
>
<text
class=
"king"
style=
"margin-right: 14rpx;"
>
含早餐
</text>
<text>
1.5m大床 2人入住 24㎡ 有窗
</text>
</view>
<viwe
class=
"give f11"
>
免费专辑接机 + 送沟口 + 1张情景演出票
</viwe>
<view
class=
"f11 king"
style=
"margin-top:15rpx;"
>
入住当天18:00前可免费取消
</view>
<view
class=
"price"
>
<text
class=
"f11"
style=
"margin-right: 10rpx;"
>
¥
</text>
<text>
889
</text>
</view>
</view>
<view
class=
"rm-opera"
>
<!-- 如果库存少于5显示 -->
<view
class=
"warm-count"
>
剩2间
</view>
<view
class=
"buy"
>
<view
class=
"buy-content"
>
抢
</view>
<view
class=
"buy-tips"
>
在线订
</view>
</view>
</view>
</view>
</
template
>
<
script
>
</
script
>
<
style
>
.room-good
{
margin-bottom
:
30
rpx
;
display
:
flex
;
align-items
:
center
;
}
.room-good
.king
{
color
:
#DFBE6E
!important
;
}
.room-good
.f11
{
font-size
:
22
rpx
;
font-weight
:
500
;
}
.room-good
.rm-right
{
width
:
1px
;
flex
:
1
;
}
.room-good
.rm-opera
{
margin-left
:
10
rpx
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
justify-items
:
center
;
align-items
:
center
;
}
.room-good
.rm-opera
.warm-count
{
text-align
:
center
;
font-size
:
18
rpx
;
font-weight
:
500
;
color
:
#111111
;
margin-bottom
:
10
rpx
;
}
.room-good
.rm-opera
.buy
{
width
:
70
rpx
;
height
:
81
rpx
;
background
:
#FFFFFF
;
border
:
2
rpx
solid
#111111
;
border-radius
:
8
rpx
;
display
:
flex
;
flex-direction
:
column
;
}
.room-good
.rm-opera
.buy.disabled
{
background
:
#EBEBEB
;
border
:
2
rpx
solid
#DCDCDC
;
}
.room-good
.rm-opera
.buy.disabled
.buy-tips
{
background
:
#A09E9E
;
color
:
#fff
;
}
.room-good
.rm-opera
.buy.disabled
.buy-content
{
color
:
#A09E9E
;
}
.room-good
.rm-opera
.buy
.buy-tips
{
height
:
27
rpx
;
background
:
#000000
;
text-align
:
center
;
color
:
#DFBE6E
;
font-size
:
18
rpx
;
line-height
:
27
rpx
;
}
.room-good
.rm-opera
.buy
.buy-content
{
height
:
1px
;
flex
:
1
;
text-align
:
center
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
32
rpx
;
font-weight
:
800
;
color
:
#111111
;
}
.room-good
.rm-right
.room-name
{
font-size
:
30
rpx
;
font-weight
:
800
;
color
:
#111111
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.room-good
.rm-right
.give
{
width
:
278
rpx
;
background
:
#ECF1F4
;
border-radius
:
4
rpx
;
padding
:
10
rpx
;
text-overflow
:
-o-ellipsis-lastline
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
margin-top
:
15
rpx
;
}
.room-good
.rm-right
.price
{
font-weight
:
800
;
font-size
:
40
rpx
;
color
:
#111
;
}
.room-good
.rm-left
{
width
:
174
rpx
;
height
:
257
rpx
;
border-radius
:
20
rpx
;
margin-right
:
30
rpx
;
position
:
relative
;
overflow
:
hidden
;
}
.room-good
.rm-left
image
{
width
:
100%
;
height
:
100%
;
}
.room-good
.rm-left
.mark
{
padding
:
14
rpx
;
background
:
rgba
(
0
,
0
,
0
,
.4
);
color
:
#FFF
;
border-radius
:
20
rpx
0px
20
rpx
0px
;
font-size
:
24
rpx
;
font-weight
:
500
;
position
:
absolute
;
right
:
0
;
bottom
:
0
;
}
</
style
>
pages/hotel/components/room-good2.vue
0 → 100644
View file @
2acf50ba
<
template
>
<view
class=
"room-good"
>
<view
class=
"rm-left"
>
<image
src=
"https://ak-d.tripcdn.com/images/0205w120008nyuc6gA680_R_1080_808_R5_D.jpg"
mode=
"aspectFill"
>
</image>
<view
class=
"mark"
>
12
</view>
</view>
<view
class=
"rm-right"
>
<view
class=
"room-name"
>
藏韵高级双床房
</view>
<view
class=
"f11"
>
<text
class=
"king"
style=
"margin-right: 14rpx;"
>
不含早餐
</text>
<text>
1.5m大床 2人入住 24㎡ 无窗
</text>
</view>
<view
class=
"f11 king"
style=
"margin-top: 15px;"
>
不可取消
</view>
<view
class=
"price"
>
<text
class=
"f11"
style=
"margin-right: 10rpx;"
>
¥
</text>
<text>
500
</text>
</view>
</view>
<view
class=
"rm-opera"
>
<!-- 如果库存少于5显示 -->
<view
class=
"buy disabled"
>
<view
class=
"buy-content"
>
抢
</view>
<view
class=
"buy-tips"
>
已抢完
</view>
</view>
</view>
</view>
</
template
>
<
script
>
</
script
>
<
style
>
.room-good
{
margin-bottom
:
30
rpx
;
display
:
flex
;
align-items
:
center
;
}
.room-good
.king
{
color
:
#DFBE6E
!important
;
}
.room-good
.f11
{
font-size
:
22
rpx
;
font-weight
:
500
;
}
.room-good
.rm-right
{
width
:
1px
;
flex
:
1
;
}
.room-good
.rm-opera
{
margin-left
:
10
rpx
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
justify-items
:
center
;
align-items
:
center
;
}
.room-good
.rm-opera
.warm-count
{
text-align
:
center
;
font-size
:
18
rpx
;
font-weight
:
500
;
color
:
#111111
;
margin-bottom
:
10
rpx
;
}
.room-good
.rm-opera
.buy
{
width
:
70
rpx
;
height
:
81
rpx
;
background
:
#FFFFFF
;
border
:
2
rpx
solid
#111111
;
border-radius
:
8
rpx
;
display
:
flex
;
flex-direction
:
column
;
}
.room-good
.rm-opera
.buy.disabled
{
background
:
#EBEBEB
;
border
:
2
rpx
solid
#DCDCDC
;
}
.room-good
.rm-opera
.buy.disabled
.buy-tips
{
background
:
#A09E9E
;
color
:
#fff
;
}
.room-good
.rm-opera
.buy.disabled
.buy-content
{
color
:
#A09E9E
;
}
.room-good
.rm-opera
.buy
.buy-tips
{
height
:
27
rpx
;
background
:
#000000
;
text-align
:
center
;
color
:
#DFBE6E
;
font-size
:
18
rpx
;
line-height
:
27
rpx
;
}
.room-good
.rm-opera
.buy
.buy-content
{
height
:
1px
;
flex
:
1
;
text-align
:
center
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-size
:
32
rpx
;
font-weight
:
800
;
color
:
#111111
;
}
.room-good
.rm-right
.room-name
{
font-size
:
30
rpx
;
font-weight
:
800
;
color
:
#111111
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.room-good
.rm-right
.give
{
width
:
278
rpx
;
background
:
#ECF1F4
;
border-radius
:
4
rpx
;
padding
:
10
rpx
;
text-overflow
:
-o-ellipsis-lastline
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-line-clamp
:
2
;
line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
margin-top
:
15
rpx
;
}
.room-good
.rm-right
.price
{
font-weight
:
800
;
font-size
:
40
rpx
;
color
:
#111
;
}
.room-good
.rm-left
{
width
:
174
rpx
;
height
:
257
rpx
;
border-radius
:
20
rpx
;
margin-right
:
30
rpx
;
position
:
relative
;
overflow
:
hidden
;
}
.room-good
.rm-left
image
{
width
:
100%
;
height
:
100%
;
}
.room-good
.rm-left
.mark
{
padding
:
14
rpx
;
background
:
rgba
(
0
,
0
,
0
,
.4
);
color
:
#FFF
;
border-radius
:
20
rpx
0px
20
rpx
0px
;
font-size
:
24
rpx
;
font-weight
:
500
;
position
:
absolute
;
right
:
0
;
bottom
:
0
;
}
</
style
>
pages/hotel/components/time/index.vue
View file @
2acf50ba
...
...
@@ -354,7 +354,7 @@
},
//计算周几
getWeek
(
date
)
{
var
weekDay
=
[
'
星期天'
,
'星期一'
,
'星期二'
,
'星期三'
,
'星期四'
,
'星期五'
,
'星期
六'
];
var
weekDay
=
[
'
周日'
,
'周一'
,
'周二'
,
'周三'
,
'周四'
,
'周五'
,
'周
六'
];
var
myDate
=
new
Date
(
Date
.
parse
(
date
));
return
weekDay
[
myDate
.
getDay
()];
},
...
...
@@ -512,6 +512,8 @@
endDay: this.endDay,
endWeek: this.endWeek,
day: this.day */
startWeek
:
this
.
startWeek
,
endWeek
:
this
.
endWeek
,
start
:
this
.
date
[
this
.
start
[
0
]].
year
+
this
.
type
+
this
.
date
[
this
.
start
[
0
]].
month
+
this
.
type
+
this
.
isFestival
(
this
.
start
[
0
],
this
.
start
[
1
],
true
),
end
:
this
.
date
[
this
.
end
[
0
]].
year
+
this
.
type
+
this
.
date
[
this
.
end
[
0
]].
month
+
this
.
type
+
this
...
...
@@ -522,7 +524,7 @@
endDay
:
this
.
date
[
this
.
end
[
0
]].
month
+
'-'
+
this
.
isFestival
(
this
.
end
[
0
],
this
.
end
[
1
],
true
),
day
:
this
.
day
};
/*此处应把需要的数据进行保存,如入住离开日期...添加到vuex然后再进行跳转到上一页
*不推荐使用本地缓存,下面是缓存的示例
*/
...
...
@@ -598,7 +600,7 @@
// uni.navigateBack({
// delta: 1
// })
}
}
,
}
};
</
script
>
...
...
pages/hotel/detail.vue
0 → 100644
View file @
2acf50ba
This diff is collapsed.
Click to expand it.
pages/hotel/list.vue
View file @
2acf50ba
...
...
@@ -241,6 +241,9 @@
hotelGood
},
created
()
{
uni
.
navigateTo
({
url
:
"/pages/hotel/detail"
})
uni
.
setNavigationBarTitle
({
title
:
"酒店"
,
});
...
...
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