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
d530c1da
Commit
d530c1da
authored
Jun 01, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
页面修改
parents
f70ead0e
47dd0b29
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
9 deletions
+25
-9
room-good.vue
pages/hotel/components/room-good.vue
+12
-3
detail.vue
pages/hotel/detail.vue
+13
-6
No files found.
pages/hotel/components/room-good.vue
View file @
d530c1da
...
...
@@ -31,7 +31,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>
...
...
@@ -52,12 +52,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 @
d530c1da
...
...
@@ -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>
</view>
</view>
</view>
...
...
@@ -266,9 +266,10 @@
RoomList
:
[],
//可过滤房间
dataList
:
{},
//数据
isShowAll
:
false
,
//显示全部
HotelArr
:
[],
//推荐酒店
searchObj
:
{},
dayObj
:
{}
HotelArr
:[]
,
//推荐酒店
searchObj
:{},
dayObj
:{},
hotelData
:{}
//传递到房间预订组件
}
},
components
:
{
...
...
@@ -298,15 +299,15 @@
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
;
}
if
(
options
.
searchObj
)
{
if
(
options
.
searchObj
)
{
this
.
searchObj
=
JSON
.
parse
(
options
.
searchObj
);
}
this
.
getRecomHotel
();
...
...
@@ -367,6 +368,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
},
//切换日期获取房型
...
...
@@ -533,6 +537,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