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
70a06bdb
Commit
70a06bdb
authored
May 31, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
4ed981d2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
259 additions
and
293 deletions
+259
-293
hotel-good.vue
pages/hotel/components/hotel-good.vue
+6
-1
room-good.vue
pages/hotel/components/room-good.vue
+63
-40
detail.vue
pages/hotel/detail.vue
+162
-134
list.vue
pages/hotel/list.vue
+6
-7
picture.vue
pages/hotel/picture.vue
+22
-111
No files found.
pages/hotel/components/hotel-good.vue
View file @
70a06bdb
...
...
@@ -42,6 +42,10 @@
HotelList
:
{
type
:
Array
,
default
:
null
},
dayObj
:{
type
:
Object
,
default
:
null
}
},
data
()
{
...
...
@@ -54,8 +58,9 @@
},
methods
:{
goHotelDetail
(
id
){
let
myDayObj
=
JSON
.
stringify
(
this
.
dayObj
);
uni
.
navigateTo
({
url
:
"/pages/hotel/detail?id="
+
id
url
:
"/pages/hotel/detail?id="
+
id
+
'&dayObj='
+
myDayObj
});
}
}
...
...
pages/hotel/components/room-good.vue
View file @
70a06bdb
<
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>
<view
class=
"room-good"
v-for=
"(item,index) in RoomList"
>
<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>
<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
class=
"rm-right"
>
<view
class=
"room-name"
>
{{
item
.
RoomName
}}
</view>
<view
class=
"f11"
>
<text
class=
"king"
style=
"margin-right: 14rpx;"
>
{{
item
.
BreakfastTypeStr
}}
</text>
<text>
{{
item
.
BedTypeStr
}}
{{
item
.
ServiceNumber
}}
人入住
{{
item
.
RoomSize
}}
㎡
{{
item
.
HasWindowStr
}}
</text>
</view>
<viwe
class=
"give f11"
v-if=
"item.Description"
>
{{
item
.
Description
}}
</viwe>
<view
class=
"f11 king"
style=
"margin-top:15rpx;"
>
{{
item
.
IsCancelStr
}}
</view>
<view
class=
"price"
>
<text
class=
"f11"
style=
"margin-right: 10rpx;"
>
¥
</text>
<text>
{{
item
.
B2BPrice
}}
</text>
</view>
</view>
</view>
<view
class=
"rm-opera"
>
<!-- 如果库存少于5显示 -->
<view
class=
"warm-count"
>
剩2间
</view>
<view
class=
"buy"
@
click=
"previewOrder"
>
<view
class=
"buy-content"
>
抢
</view>
<view
class=
"buy-tips"
>
在线订
</view>
<view
class=
"rm-opera"
v-if=
"item.Inventory>0&&item.Inventory
<5
"
>
<!-- 如果库存少于5显示 -->
<view
class=
"warm-count"
>
剩
{{
item
.
Inventory
}}
间
</view>
<view
class=
"buy"
@
click=
"previewOrder"
>
<view
class=
"buy-content"
>
抢
</view>
<view
class=
"buy-tips"
>
在线订
</view>
</view>
</view>
<view
class=
"rm-opera"
v-if=
"item.Inventory==0"
>
<view
class=
"buy disabled"
>
<view
class=
"buy-content"
>
抢
</view>
<view
class=
"buy-tips"
>
已抢完
</view>
</view>
</view>
</view>
</view>
...
...
@@ -33,10 +41,16 @@
<
script
>
export
default
{
props
:
{
RoomList
:
{
type
:
Array
,
default
:
null
}
},
methods
:
{
previewOrder
(){
previewOrder
()
{
uni
.
navigateTo
({
url
:
"/pages/hotel/order"
url
:
"/pages/hotel/order"
})
},
},
...
...
@@ -63,7 +77,8 @@
width
:
1px
;
flex
:
1
;
}
.room-good
.rm-opera
{
.room-good
.rm-opera
{
margin-left
:
10
rpx
;
display
:
flex
;
flex-direction
:
column
;
...
...
@@ -71,14 +86,16 @@
justify-items
:
center
;
align-items
:
center
;
}
.room-good
.rm-opera
.warm-count
{
.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
{
.room-good
.rm-opera
.buy
{
width
:
70
rpx
;
height
:
81
rpx
;
background
:
#FFFFFF
;
...
...
@@ -87,26 +104,31 @@
display
:
flex
;
flex-direction
:
column
;
}
.room-good
.rm-opera
.buy.disabled
{
.room-good
.rm-opera
.buy.disabled
{
background
:
#EBEBEB
;
border
:
2
rpx
solid
#DCDCDC
;
}
.room-good
.rm-opera
.buy.disabled
.buy-tips
{
.room-good
.rm-opera
.buy.disabled
.buy-tips
{
background
:
#A09E9E
;
color
:
#fff
;
}
.room-good
.rm-opera
.buy.disabled
.buy-content
{
.room-good
.rm-opera
.buy.disabled
.buy-content
{
color
:
#A09E9E
;
}
.room-good
.rm-opera
.buy
.buy-tips
{
.room-good
.rm-opera
.buy
.buy-tips
{
height
:
27
rpx
;
background
:
#000000
;
text-align
:
center
;
color
:
#DFBE6E
;
color
:
#DFBE6E
;
font-size
:
18
rpx
;
line-height
:
27
rpx
;
}
.room-good
.rm-opera
.buy
.buy-content
{
.room-good
.rm-opera
.buy
.buy-content
{
height
:
1px
;
flex
:
1
;
text-align
:
center
;
...
...
@@ -117,6 +139,7 @@
font-weight
:
800
;
color
:
#111111
;
}
.room-good
.rm-right
.room-name
{
font-size
:
30
rpx
;
font-weight
:
800
;
...
...
@@ -139,13 +162,13 @@
-webkit-line-clamp
:
2
;
line-clamp
:
2
;
-webkit-box-orient
:
vertical
;
margin-top
:
15
rpx
;
margin-top
:
15
rpx
;
}
.room-good
.rm-right
.price
{
.room-good
.rm-right
.price
{
font-weight
:
800
;
font-size
:
40
rpx
;
color
:
#111
;
color
:
#111
;
}
.room-good
.rm-left
{
...
...
pages/hotel/detail.vue
View file @
70a06bdb
...
...
@@ -2,17 +2,15 @@
<view
class=
"hotel-detail"
>
<scroll-view
scroll-y=
"true"
style=
"width: 100%;height: 100%;"
@
scroll=
"scroll"
>
<view
class=
"media"
:style=
"
{'opacity':(100-boxOption)+'%'}">
<u-swiper
:list=
"
imgsList"
:effect3d=
"false"
:height=
"545"
:interval=
"5000"
:border-radius=
"0
"
@
click=
"previewImage"
name=
"picUrl
"
v-if=
"active==1"
></u-swiper>
<u-swiper
:list=
"
dataList.HotelImg"
:effect3d=
"false"
:height=
"545"
:interval=
"5000"
:border-radius=
"0"
@
click=
"previewImage
"
name=
"Path
"
v-if=
"active==1"
></u-swiper>
<view
class=
"video-box"
v-if=
"active==0"
>
<video
id=
"myVideo"
:src=
"detailData.VideoUrl"
style=
"width: 100%;height: 100%;"
:controls=
'controls'
:show-center-play-btn=
'false'
:show-fullscreen-btn=
'false'
@
fullscreenchange=
'videoControl'
object-fit=
'fill'
></video>
<video
id=
"myVideo"
:src=
"detailData.VideoUrl"
style=
"width: 100%;height: 100%;"
:controls=
'controls'
:show-center-play-btn=
'false'
:show-fullscreen-btn=
'false'
@
fullscreenchange=
'videoControl'
object-fit=
'fill'
></video>
<view
@
click=
"enlarge"
class=
"play-btn"
>
<!-- 播放按钮 -->
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616471847000_345.png"
style=
"width: 37rpx;height: 44rpx;"
mode=
""
></image>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616471847000_345.png"
style=
"width: 37rpx;height: 44rpx;"
mode=
""
></image>
</view>
</view>
<!--
<view
class=
"type-box"
v-if=
"videoUrl!=''"
>
...
...
@@ -24,16 +22,16 @@
<view
class=
"media-info"
>
<view
class=
"flex"
>
<view
class=
"mi-left"
>
<view
v-if=
"
imgsList
.length>0"
class=
"type-img-box"
@
click=
"openPicture"
>
<image
:src=
"
imgsList[0].picUrl
"
mode=
"aspectFill"
></image>
<view
v-if=
"
dataList.HotelImg
.length>0"
class=
"type-img-box"
@
click=
"openPicture"
>
<image
:src=
"
dataList.HotelImg[0].Path
"
mode=
"aspectFill"
></image>
<view
class=
"content"
>
<!--
<u-icon
name=
"photo"
size=
"26"
color=
"#FFF"
></u-icon>
-->
<text>
{{
imgsList
.
length
}}
</text>
<text>
{{
dataList
.
HotelImg
.
length
}}
</text>
</view>
</view>
</view>
<view
class=
"mi-right"
>
<view
style=
"font-size: 40rpx;font-weight: 600;text-align: right;margin-bottom: 6rpx;"
class=
"king"
>
5星
</view>
<view
style=
"font-size: 40rpx;font-weight: 600;text-align: right;margin-bottom: 6rpx;"
class=
"king"
>
{{
dataList
.
StarName
}}
</view>
<view
style=
"font-weight: 500;color:#dfbe6e99;text-align: right;"
class=
"f12"
>
658人下单入住
</view>
<!--
<view
class=
"flex"
>
<text
style=
"color:white;margin-right: 14rpx;"
class=
"f12"
>
星级
</text>
...
...
@@ -42,9 +40,8 @@
</view>
</view>
</view>
<view
@
click=
"goback"
:style=
"[titleStyle,
{opacity:'100% !important'}]"
style="position: fixed;top: 0;left: 0;padding-left: 6rpx;">
<view
@
click=
"goback"
:style=
"[titleStyle,
{opacity:'100% !important'}]" style="position: fixed;top: 0;left: 0;padding-left: 6rpx;">
<u-icon
name=
"arrow-left"
size=
"44"
color=
"#FFF"
style=
"margin-top: 22rpx;"
></u-icon>
</view>
</view>
...
...
@@ -52,33 +49,31 @@
<view
@
click=
"goback"
>
<u-icon
name=
"arrow-left"
size=
"44"
></u-icon>
</view>
<view
style=
"flex: 1;margin-left: 30rpx; text-align: left;"
>
眉山黑龙滩长岛天堂洲际酒店
</view>
<view
style=
"flex: 1;margin-left: 30rpx; text-align: left;"
>
{{
dataList
.
HotelName
}}
</view>
</view>
<view
class=
"hotel-content"
>
<view
class=
"hotel-base"
>
<view
class=
"head"
>
<view
style=
"flex:1;"
>
<view
class=
"hotel-name"
>
九寨沟星宇国际大酒店
</view>
<view
class=
"hotel-tag"
>
亲子设施 | 江河景房 | 环境安静 | 全家出游
</view>
<view
class=
"hotel-name"
>
{{
dataList
.
HotelName
}}
</view>
<view
class=
"hotel-tag"
>
<text
v-for=
"(subItem,subIndex) in dataList.TagList"
:key=
"subIndex"
>
{{
subItem
}}
<text
style=
"margin:0 10rpx;"
v-if=
"subIndex!=dataList.TagList.length-1"
>
|
</text>
</text>
</view>
</view>
<!-- 关注 -->
<view
class=
"op-box"
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1621940804000_709.png"
style=
"margin-right: 17rpx;"
></image>
<image
v-if=
"!islike"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1621940804000_61.png"
@
click=
"changeLike"
></image>
<image
v-if=
"islike"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1621940804000_953.png"
@
click=
"changeLike"
></image>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1621940804000_709.png"
style=
"margin-right: 17rpx;"
></image>
<image
v-if=
"!islike"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1621940804000_61.png"
@
click=
"changeLike"
></image>
<image
v-if=
"islike"
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1621940804000_953.png"
@
click=
"changeLike"
></image>
</view>
</view>
<view
class=
"shebei"
>
<view
class=
"sb-left"
>
<view
class=
"sb-item"
>
2014年开业
</view>
<view
class=
"sb-item"
>
2017年装修
</view>
<view
class=
"sb-item"
>
免费停车场
</view>
<view
class=
"sb-item"
v-for=
"(subItem,sIndex) in dataList.PublicFacilities"
>
{{
subItem
}}
</view>
</view>
<view
class=
"sb-right"
>
<text
style=
"margin-right: 20rpx;"
>
设施/详情
</text>
...
...
@@ -89,11 +84,10 @@
<view
class=
"loc-left"
>
<view
class=
"loc-name"
>
<u-icon
name=
"location"
size=
"28"
/>
<text
style=
"margin-left: 14rpx;"
>
沟口 | 九寨沟风景区沟口
</text>
<text
style=
"margin-left: 14rpx;"
>
{{
dataList
.
Address
}}
</text>
</view>
<view
class=
"loc-remark"
>
<view>
距浦东国际机场14.5km,驾车约19min
</view>
<view>
距车站约1km,驾车约5min
</view>
<view>
{{
dataList
.
AddressDes
}}
</view>
</view>
</view>
<view
class=
"loc-right"
>
...
...
@@ -103,27 +97,27 @@
</view>
<view
class=
"date-box flex"
@
click=
"showTimePopup=true"
>
<view
class=
"date"
>
<text>
{{
searchObj
.
date
.
startDay
}}
</text>
<text>
{{
roomMsg
.
StartDate
}}
</text>
<text
class=
"date-week"
>
{{
searchObj
.
date
.
startWeek
}}
</text>
</view>
<view
class=
"hr-line"
></view>
<view
class=
"date"
>
<text>
{{
searchObj
.
date
.
endDay
}}
</text>
<text>
{{
roomMsg
.
EndDate
}}
</text>
<text
class=
"date-week"
>
{{
searchObj
.
date
.
endWeek
}}
</text>
</view>
<view
class=
"ver-line"
></view>
<view
class=
"date"
>
共 ·
{{
searchObj
.
date
.
day
}}
晚
共 ·
{{
day
}}
晚
</view>
</view>
<view
class=
"hotel-room"
>
<view
class=
"room-type"
>
<view
v-for=
"(x,i) in threeLevelList"
class=
"item"
@
click=
"changeRoomType(i)"
:class=
"
{'active':currentRoomType==i
}">
{{
x
.
name
}}
</view>
<view
class=
"item"
:class=
"
{'active':isShowAll}" @click="getAllRoom()">全部
</view>
<view
v-for=
"(x,i) in threeLevelList"
class=
"item"
@
click=
"changeRoomType(x)"
:class=
"
{'active':x.isCheck==1
}">
{{
x
.
name
}}
</view>
</view>
<view
class=
"room-list"
>
<room-good></room-good>
<
room-good-test></room-good-test
>
<room-good
:RoomList=
"RoomList"
></room-good>
<
!--
<room-good-test></room-good-test>
--
>
</view>
</view>
</view>
...
...
@@ -133,44 +127,19 @@
<text>
订房须知
</text>
</view>
<ul
class=
"title-style-one"
>
<li>
<view
class=
"item-title"
>
酒店提示
</view>
<view
class=
"item-content"
>
疫情期间,酒店不提供早餐,请佩戴好口罩。
</view>
</li>
<li>
<view
class=
"item-title"
>
儿童政策
</view>
<view
class=
"item-content"
>
不接受18岁以下客人单独入住。不含儿童早餐。
加床政策、儿童人数请参见您所选定的客房政策,若超过房型限定人数,可能需收取额外费用。提出的任何要求均需获得酒店的确认,所有服务详情以酒店告知为准。
</view>
</li>
<li>
<view
class=
"item-title"
>
宠物政策
</view>
<view
class=
"item-content"
>
不可携带宠物。
</view>
</li>
</ul>
<view
class=
"big-title"
>
<text>
入离规则
</text>
</view>
<ul
class=
"title-style-one"
>
<li>
<view
class=
"item-title king regular"
>
入住时间:14:00以后
</view>
<view
class=
"item-title king regular"
>
退房时间:13:00以前
</view>
<li
v-for=
"(sItem,sIndex) in dataList.Booking"
:key=
"sIndex"
>
<view
class=
"item-title"
>
{{
sItem
.
Name
}}
</view>
<view
class=
"item-content"
>
{{
sItem
.
Content
}}
</view>
</li>
</ul>
<view
class=
"big-title"
>
<text>
设施服务
</text>
</view>
<ul
class=
"title-style-one hr"
>
<li>
<view
class=
"item-title regular"
>
接机服务
</view>
</li>
<li>
<view
class=
"item-title regular"
>
叫醒服务
</view>
</li>
<li>
<view
class=
"item-title regular"
>
洗衣服务
</view>
</li>
<li>
<view
class=
"item-title regular"
>
健身房
</view>
<li
v-for=
"(vItem,vIndex) in dataList.ServiceItems"
:key=
"vIndex"
>
<view
class=
"item-title regular"
>
{{
vItem
}}
</view>
</li>
</ul>
<view
class=
"hotel-more-info"
@
click=
"openDescription"
>
酒店详情
</view>
...
...
@@ -226,19 +195,7 @@
export
default
{
data
()
{
return
{
imgsList
:
[{
picUrl
:
"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg"
},
{
picUrl
:
"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg"
},
{
picUrl
:
"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg"
},
{
picUrl
:
"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg"
}
],
imgsList
:
[],
id
:
0
,
typeList
:
[{
Id
:
0
,
...
...
@@ -255,36 +212,45 @@
videoUrl
:
"https://video.c-ctrip.com/videos/230i1r000001hxb2mEEE4.mp4"
,
active
:
1
,
islike
:
false
,
currentRoomType
:
0
,
nearbyType
:
0
,
searchObj
:
{
date
:
{}
},
roomMsg
:{
HotelId
:
0
,
StartDate
:
''
,
EndDate
:
''
},
day
:
0
,
threeLevelList
:
[{
name
:
"全部"
,
id
:
0
name
:
"单人床"
,
id
:
1
,
isCheck
:
0
},
{
name
:
"大床房"
,
id
:
1
id
:
2
,
isCheck
:
0
},
{
name
:
"双床房"
,
id
:
2
id
:
3
,
isCheck
:
0
},
{
name
:
"含早餐"
,
id
:
3
id
:
4
,
isCheck
:
0
},
{
name
:
"可取消"
,
id
:
4
},
{
name
:
"优惠活动"
,
id
:
5
id
:
5
,
isCheck
:
0
}
]
],
RoomList
:
[],
//可过滤房间
dataList
:
{},
//数据
isShowAll
:
false
,
//显示全部
}
},
components
:
{
...
...
@@ -295,26 +261,10 @@
canlendar
},
created
()
{
let
d1
=
new
Date
();
let
d
=
new
Date
();
let
d2
=
new
Date
(
d
.
setDate
(
d
.
getDate
()
+
1
))
var
obj
=
{
start
:
`
${
d1
.
getFullYear
()}
-
${
d1
.
getMonth
()
+
1
}
-
${
d1
.
getDate
()}
`
,
end
:
`
${
d2
.
getFullYear
()}
-
${
d2
.
getMonth
()
+
1
}
-
${
d2
.
getDate
()}
`
,
startDay
:
`
${
this
.
getMonth
(
d1
)}
月
${
d1
.
getDate
()}
日`
,
endDay
:
`
${
this
.
getMonth
(
d1
)}
月
${
d1
.
getDate
()}
日`
,
startWeek
:
this
.
getWeek
(
d1
),
endWeek
:
this
.
getWeek
(
d2
),
day
:
1
}
uni
.
setStorage
({
key
:
'Time'
,
data
:
JSON
.
stringify
(
obj
)
})
this
.
searchObj
.
date
=
obj
},
onLoad
(
options
)
{
// this.id=
options.id
this
.
id
=
options
.
id
// this.ProjectType=options.type
let
that
=
this
uni
.
getSystemInfo
({
...
...
@@ -327,34 +277,45 @@
},
});
this
.
mainColor
=
this
.
$uiConfig
.
mainColor
;
if
(
this
.
id
>
0
)
{
this
.
getHotelDetail
(
this
.
id
);
}
if
(
options
.
dayObj
){
var
tempDay
=
JSON
.
parse
(
options
.
dayObj
);
this
.
roomMsg
.
StartDate
=
tempDay
.
StartDate
;
this
.
roomMsg
.
EndDate
=
tempDay
.
EndDate
;
this
.
day
=
tempDay
.
day
;
console
.
log
(
options
.
dayObj
);
}
},
methods
:
{
goMap
(
name
,
lon
,
lat
)
{
wx
.
openLocation
({
latitude
:
lat
,
longitude
:
lon
,
scale
:
18
,
name
,
address
:
"武侯区科华中路 2 号"
,
success
:(
res
)
=>
{
// console.log(res)
},
fail
:
(
err
)
=>
{
// console.log(err)
}
latitude
:
lat
,
longitude
:
lon
,
scale
:
18
,
name
,
address
:
"武侯区科华中路 2 号"
,
success
:
(
res
)
=>
{
// console.log(res)
},
fail
:
(
err
)
=>
{
// console.log(err)
}
})
},
openPicture
(){
openPicture
()
{
let
imgObj
=
JSON
.
stringify
(
this
.
dataList
.
HotelImg
);
uni
.
navigateTo
({
url
:
"/pages/hotel/picture"
url
:
"/pages/hotel/picture?imgObj="
+
imgObj
})
},
openDescription
(){
openDescription
()
{
uni
.
navigateTo
({
url
:
"/pages/hotel/description"
url
:
"/pages/hotel/description"
})
},
chosenDateResult
(
obj
)
{
obj
.
startDay
=
this
.
formatMonthDay
(
obj
.
startDay
)
obj
.
endDay
=
this
.
formatMonthDay
(
obj
.
endDay
)
...
...
@@ -397,8 +358,56 @@
changeNearbyType
(
t
)
{
this
.
nearbyType
=
t
},
changeRoomType
(
i
)
{
this
.
currentRoomType
=
i
//显示全部
getAllRoom
()
{
this
.
isShowAll
=
!
this
.
isShowAll
;
if
(
this
.
isShowAll
)
{
this
.
threeLevelList
.
forEach
(
x
=>
{
x
.
isCheck
=
1
;
})
this
.
RoomList
=
this
.
dataList
.
RoomList
;
}
else
{
this
.
threeLevelList
.
forEach
(
x
=>
{
x
.
isCheck
=
0
;
})
}
},
//点击过滤房间
changeRoomType
(
obj
)
{
if
(
obj
.
isCheck
==
0
)
{
obj
.
isCheck
=
1
}
else
{
obj
.
isCheck
=
0
;
}
this
.
RoomList
=
[];
let
num
=
0
;
this
.
threeLevelList
.
forEach
(
x
=>
{
if
(
x
.
isCheck
==
1
)
{
num
++
;
this
.
dataList
.
RoomList
.
forEach
(
y
=>
{
if
(
x
.
id
==
1
&&
y
.
BedType
==
1
)
{
this
.
RoomList
.
push
(
y
)
}
if
(
x
.
id
==
2
&&
y
.
BedType
==
2
)
{
this
.
RoomList
.
push
(
y
)
}
if
(
x
.
id
==
3
&&
y
.
BedType
==
3
)
{
this
.
RoomList
.
push
(
y
)
}
if
(
x
.
id
==
3
&&
y
.
BedType
==
4
)
{
this
.
RoomList
.
push
(
y
)
}
if
(
x
.
id
==
4
&&
y
.
IsCancel
==
5
)
{
this
.
RoomList
.
push
(
y
)
}
})
}
})
if
(
num
==
this
.
threeLevelList
.
length
)
{
this
.
isShowAll
=
true
;
}
else
{
this
.
isShowAll
=
false
;
}
},
changeLike
()
{
this
.
islike
=
!
this
.
islike
...
...
@@ -445,6 +454,25 @@
changeHandler
(
i
)
{
this
.
active
=
i
;
},
//获取酒店详情
getHotelDetail
(
id
)
{
let
msg
=
{
HotelId
:
id
}
this
.
request2
({
url
:
'/api/Hotel/GetHotelInfo'
,
data
:
msg
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
console
.
log
(
res
,
'详情数据'
);
this
.
dataList
=
res
.
data
;
this
.
RoomList
=
this
.
dataList
.
RoomList
;
}
}
);
}
},
}
</
script
>
...
...
@@ -873,7 +901,7 @@
bottom
:
0
;
left
:
0
;
right
:
0
;
padding
:
30
rpx
50
rpx
;
padding
:
30
rpx
50
rpx
;
}
.hotel-detail
.media
.media-info
.mi-left
{
...
...
pages/hotel/list.vue
View file @
70a06bdb
...
...
@@ -56,7 +56,7 @@
</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;"
>
<hotel-good
:HotelList=
"HotelList"
></hotel-good>
<hotel-good
:HotelList=
"HotelList"
:dayObj=
"dayObj"
></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>
...
...
@@ -167,7 +167,8 @@
},
showLoading
:
false
,
status
:
"loadmore"
,
page_count
:
0
page_count
:
0
,
dayObj
:{}
}
},
components
:
{
...
...
@@ -348,7 +349,6 @@
},
//获取查询条件
getSearchCondition
(){
console
.
log
(
'进入了111'
);
this
.
request2
({
url
:
'/api/Hotel/GetHotelQuery'
,
data
:
{}
...
...
@@ -372,9 +372,7 @@
}
if
(
tempObj
&&
tempObj
.
StarList
){
this
.
rates
=
tempObj
.
StarList
;
console
.
log
(
this
.
rates
,
'this.rates'
);
}
console
.
log
(
res
,
'查询条件'
);
}
},
err
=>
{
...
...
@@ -385,7 +383,9 @@
//获取列表数据
getList
(
type
){
this
.
searchObj
.
QStars
=
this
.
tempRateAndPrice
.
rate
.
toString
();
console
.
log
(
this
.
searchObj
);
this
.
dayObj
.
StartDate
=
this
.
searchObj
.
QStartDate
;
this
.
dayObj
.
EndDate
=
this
.
searchObj
.
QEndDate
;
this
.
dayObj
.
day
=
this
.
day
;
if
(
type
==
1
){
this
.
HotelList
=
[];
}
...
...
@@ -395,7 +395,6 @@
},
res
=>
{
if
(
res
.
resultCode
==
1
)
{
console
.
log
(
res
,
'查询列表数据'
);
this
.
HotelList
=
this
.
HotelList
.
concat
(
res
.
data
.
pageData
);
this
.
page_count
=
res
.
data
.
pageCount
;
}
...
...
pages/hotel/picture.vue
View file @
70a06bdb
...
...
@@ -3,13 +3,13 @@
<scroll-view
scroll-y=
"true"
class=
"hotel-pic"
>
<view
class=
"content"
>
<view
class=
"left"
>
<view
v-for=
"(x,i) in jiList"
:key=
"i"
class=
"image-box"
@
click=
"previewImage(x.
picUrl
)"
>
<image
:src=
"x.
picUrl
"
mode=
"widthFix"
></image>
<view
v-for=
"(x,i) in jiList"
:key=
"i"
class=
"image-box"
@
click=
"previewImage(x.
Path
)"
>
<image
:src=
"x.
Path
"
mode=
"widthFix"
></image>
</view>
</view>
<view
class=
"right"
>
<view
v-for=
"(x,i) in ouList"
:key=
"i"
class=
"image-box"
@
click=
"previewImage(x.
picUrl
)"
>
<image
:src=
"x.
picUrl
"
mode=
"widthFix"
></image>
<view
v-for=
"(x,i) in ouList"
:key=
"i"
class=
"image-box"
@
click=
"previewImage(x.
Path
)"
>
<image
:src=
"x.
Path
"
mode=
"widthFix"
></image>
</view>
</view>
</view>
...
...
@@ -21,126 +21,37 @@
export
default
{
data
()
{
return
{
imageList
:[
{
picUrl
:
"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg"
,
type
:
"酒店"
},
{
picUrl
:
"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg"
,
type
:
"酒店"
},
{
picUrl
:
"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg"
,
type
:
"酒店"
},
{
picUrl
:
"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg"
,
type
:
"酒店"
},
{
picUrl
:
"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png"
,
type
:
"酒店"
},
{
picUrl
:
"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg"
,
type
:
"酒店"
},
{
picUrl
:
"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg"
,
type
:
"酒店"
},
{
picUrl
:
"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg"
,
type
:
"酒店"
},
{
picUrl
:
"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg"
,
type
:
"酒店"
},
{
picUrl
:
"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg"
,
type
:
"酒店"
},
{
picUrl
:
"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png"
,
type
:
"酒店"
},
{
picUrl
:
"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg"
,
type
:
"酒店"
},
{
picUrl
:
"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg"
,
type
:
"酒店"
},
{
picUrl
:
"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg"
,
type
:
"酒店"
},
{
picUrl
:
"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg"
,
type
:
"酒店"
},
{
picUrl
:
"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg"
,
type
:
"酒店"
},
{
picUrl
:
"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png"
,
type
:
"酒店"
},
{
picUrl
:
"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg"
,
type
:
"酒店"
},{
picUrl
:
"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg"
,
type
:
"酒店"
},
{
picUrl
:
"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg"
,
type
:
"酒店"
},
{
picUrl
:
"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg"
,
type
:
"酒店"
},
{
picUrl
:
"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg"
,
type
:
"酒店"
},
{
picUrl
:
"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png"
,
type
:
"酒店"
},
{
picUrl
:
"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg"
,
type
:
"酒店"
}
],
imageList
:[],
jiList
:[],
ouList
:[],
allImageSrc
:[]
}
},
onLoad
(
options
)
{
if
(
options
.
imgObj
){
this
.
imageList
=
JSON
.
parse
(
options
.
imgObj
);
this
.
getSeperate
();
}
},
created
()
{
uni
.
setNavigationBarTitle
({
title
:
"酒店图片"
,
});
this
.
imageList
.
forEach
((
x
,
i
)
=>
{
this
.
allImageSrc
.
push
(
x
.
picUrl
)
if
(
i
%
2
==
0
){
this
.
jiList
.
push
(
x
)
}
else
{
this
.
ouList
.
push
(
x
)
}
})
console
.
log
(
this
.
jiList
,
this
.
ouList
)
});
},
mounted
()
{
},
methods
:
{
getSeperate
(){
this
.
imageList
.
forEach
((
x
,
i
)
=>
{
this
.
allImageSrc
.
push
(
x
.
Path
)
if
(
i
%
2
==
0
){
this
.
jiList
.
push
(
x
)
}
else
{
this
.
ouList
.
push
(
x
)
}
})
},
previewImage
(
src
)
{
uni
.
previewImage
({
urls
:
this
.
allImageSrc
,
...
...
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