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
e00f1c23
Commit
e00f1c23
authored
Jun 01, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
3ed0e1b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
6 deletions
+23
-6
room-good.vue
pages/hotel/components/room-good.vue
+12
-3
detail.vue
pages/hotel/detail.vue
+11
-3
No files found.
pages/hotel/components/room-good.vue
View file @
e00f1c23
...
...
@@ -24,7 +24,7 @@
<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"
@
click=
"previewOrder
(item)
"
>
<view
class=
"buy-content"
>
抢
</view>
<view
class=
"buy-tips"
>
在线订
</view>
</view>
...
...
@@ -45,12 +45,21 @@
RoomList
:
{
type
:
Array
,
default
:
null
},
dayObj
:
{
type
:
Object
,
default
:
null
},
hotelData
:
{
type
:
Object
,
default
:
null
}
},
methods
:
{
previewOrder
()
{
previewOrder
(
item
)
{
console
.
log
(
item
,
'数据'
);
uni
.
navigateTo
({
url
:
"/pages/hotel/order
"
url
:
"/pages/hotel/order
?RoomInfo="
+
JSON
.
stringify
(
item
)
+
'&dayObj='
+
JSON
.
stringify
(
this
.
dayObj
)
+
'&HotelInfo='
+
JSON
.
stringify
(
this
.
hotelData
)
})
},
},
...
...
pages/hotel/detail.vue
View file @
e00f1c23
...
...
@@ -116,7 +116,7 @@
<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
:RoomList=
"RoomList"
></room-good>
<room-good
:RoomList=
"RoomList"
:dayObj=
"dayObj"
:hotelData=
"hotelData"
></room-good>
<!--
<room-good-test></room-good-test>
-->
</view>
</view>
...
...
@@ -259,7 +259,8 @@
isShowAll
:
false
,
//显示全部
HotelArr
:[]
,
//推荐酒店
searchObj
:{},
dayObj
:{}
dayObj
:{},
hotelData
:{}
//传递到房间预订组件
}
},
components
:
{
...
...
@@ -290,13 +291,14 @@
this
.
getHotelDetail
(
this
.
id
);
}
if
(
options
.
dayObj
)
{
console
.
log
(
options
.
dayObj
,
'options.dayObj'
);
var
tempDay
=
JSON
.
parse
(
options
.
dayObj
);
this
.
dayObj
=
tempDay
;
this
.
roomMsg
.
StartDate
=
tempDay
.
StartDate
;
this
.
roomMsg
.
EndDate
=
tempDay
.
EndDate
;
this
.
day
=
tempDay
.
day
;
this
.
startWeek
=
tempDay
.
startWeek
;
this
.
endWeek
=
tempDay
.
endWeek
;
this
.
dayObj
=
tempDay
;
}
if
(
options
.
searchObj
){
this
.
searchObj
=
JSON
.
parse
(
options
.
searchObj
);
...
...
@@ -359,6 +361,9 @@
this
.
endWeek
=
obj
.
endWeek
;
this
.
day
=
obj
.
day
;
this
.
getRoomType
();
this
.
dayObj
.
StartDate
=
obj
.
start
;
this
.
dayObj
.
EndDate
=
obj
.
end
;
this
.
dayObj
.
day
=
obj
.
day
;
this
.
showTimePopup
=
false
},
//切换日期获取房型
...
...
@@ -525,6 +530,9 @@
console
.
log
(
res
,
'详情数据'
);
this
.
dataList
=
res
.
data
;
this
.
RoomList
=
this
.
dataList
.
RoomList
;
this
.
hotelData
.
HotelId
=
this
.
dataList
.
HotelId
;
this
.
hotelData
.
HotelName
=
this
.
dataList
.
HotelName
;
this
.
hotelData
.
Booking
=
this
.
dataList
.
Booking
;
}
}
);
...
...
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