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
57d3b819
Commit
57d3b819
authored
Jun 01, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
b63ed354
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
242 additions
and
92 deletions
+242
-92
recommed-hotel.vue
pages/hotel/components/recommed-hotel.vue
+3
-2
room-good.vue
pages/hotel/components/room-good.vue
+1
-2
detail.vue
pages/hotel/detail.vue
+18
-34
list.vue
pages/hotel/list.vue
+2
-5
order.vue
pages/hotel/order.vue
+218
-49
No files found.
pages/hotel/components/recommed-hotel.vue
View file @
57d3b819
...
...
@@ -57,8 +57,9 @@
}
},
mounted
(){
console
.
log
(
this
.
dayObj
,
'dayObj'
);
console
.
log
(
this
.
searchObj
,
'searchObj'
);
},
created
(){
},
methods
:{
goHotelDetail
(
id
){
...
...
pages/hotel/components/room-good.vue
View file @
57d3b819
...
...
@@ -10,7 +10,6 @@
<
template
v-else
>
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/default_room.jpg"
mode=
"aspectFill"
>
</image>
<view
class=
"mark"
></view>
</
template
>
</view>
<view
class=
"rm-right"
>
...
...
@@ -64,7 +63,6 @@
},
methods
:
{
previewOrder
(
item
)
{
console
.
log
(
item
,
'数据'
);
uni
.
navigateTo
({
url
:
"/pages/hotel/order?RoomInfo="
+
JSON
.
stringify
(
item
)
+
'&dayObj='
+
JSON
.
stringify
(
this
.
dayObj
)
+
'&HotelInfo='
+
JSON
.
stringify
(
this
.
hotelData
)
})
...
...
@@ -87,6 +85,7 @@
.room-good
.f11
{
font-size
:
22
rpx
;
font-weight
:
500
;
margin-top
:
10
rpx
;
}
.room-good
.rm-right
{
...
...
pages/hotel/detail.vue
View file @
57d3b819
...
...
@@ -97,13 +97,13 @@
</view>
<view
class=
"date-box flex"
@
click=
"showTimePopup=true"
>
<view
class=
"date"
>
<text>
{{
roomMsg
.
StartDate
}}
</text>
<text
class=
"date-week"
>
{{
startWeek
}}
</text>
<text>
{{
startDay
}}
</text>
<text
class=
"date-week"
>
{{
getWeek
(
roomMsg
.
StartDate
)
}}
</text>
</view>
<view
class=
"hr-line"
></view>
<view
class=
"date"
>
<text>
{{
roomMsg
.
EndDate
}}
</text>
<text
class=
"date-week"
>
{{
endWeek
}}
</text>
<text>
{{
endDay
}}
</text>
<text
class=
"date-week"
>
{{
getWeek
(
roomMsg
.
EndDate
)
}}
</text>
</view>
<view
class=
"ver-line"
></view>
<view
class=
"date"
>
...
...
@@ -234,8 +234,6 @@
StartDate
:
''
,
EndDate
:
''
},
startWeek
:
''
,
endWeek
:
''
,
day
:
0
,
threeLevelList
:
[{
name
:
"单人床"
,
...
...
@@ -269,7 +267,9 @@
HotelArr
:[]
,
//推荐酒店
searchObj
:{},
dayObj
:{},
hotelData
:{}
//传递到房间预订组件
hotelData
:{}
,
//传递到房间预订组件
startDay
:
''
,
endDay
:
''
}
},
components
:
{
...
...
@@ -301,11 +301,12 @@
if
(
options
.
dayObj
)
{
console
.
log
(
options
.
dayObj
,
'options.dayObj'
);
var
tempDay
=
JSON
.
parse
(
options
.
dayObj
);
this
.
roomMsg
.
StartDate
=
tempDay
.
StartDate
;
this
.
roomMsg
.
EndDate
=
tempDay
.
EndDate
;
this
.
roomMsg
.
StartDate
=
tempDay
.
start
;
this
.
roomMsg
.
EndDate
=
tempDay
.
end
;
this
.
startDay
=
tempDay
.
startDay
;
this
.
endDay
=
tempDay
.
endDay
;
this
.
day
=
tempDay
.
day
;
this
.
startWeek
=
tempDay
.
startWeek
;
this
.
endWeek
=
tempDay
.
endWeek
;
this
.
dayObj
=
tempDay
;
}
if
(
options
.
searchObj
){
this
.
searchObj
=
JSON
.
parse
(
options
.
searchObj
);
...
...
@@ -364,13 +365,11 @@
chosenDateResult
(
obj
)
{
this
.
roomMsg
.
StartDate
=
obj
.
start
;
this
.
roomMsg
.
EndDate
=
obj
.
end
;
this
.
start
Week
=
obj
.
startWeek
;
this
.
end
Week
=
obj
.
endWeek
;
this
.
start
Day
=
obj
.
startDay
;
this
.
end
Day
=
obj
.
endDay
;
this
.
day
=
obj
.
day
;
this
.
getRoomType
();
this
.
dayObj
.
StartDate
=
obj
.
start
;
this
.
dayObj
.
EndDate
=
obj
.
end
;
this
.
dayObj
.
day
=
obj
.
day
;
this
.
dayObj
=
obj
;
this
.
showTimePopup
=
false
},
//切换日期获取房型
...
...
@@ -402,24 +401,9 @@
return
d
>
9
?
d
:
"0"
+
d
},
getWeek
(
date
)
{
console
.
log
(
date
,
'date'
);
let
day
=
date
.
getDay
();
if
(
day
===
1
)
{
var
week
=
"一"
;
}
else
if
(
day
===
2
)
{
week
=
"二"
;
}
else
if
(
day
===
3
)
{
week
=
"三"
;
}
else
if
(
day
===
4
)
{
week
=
"四"
;
}
else
if
(
day
===
5
)
{
week
=
"五"
;
}
else
if
(
day
===
6
)
{
week
=
"六"
;
}
else
if
(
day
===
7
)
{
week
=
"日"
;
}
return
"周"
+
week
var
weekArray
=
new
Array
(
"日"
,
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
);
var
week
=
weekArray
[
new
Date
(
date
).
getDay
()];
//注意此处必须是先new一个Date
return
'周'
+
week
;
},
changeNearbyType
(
t
)
{
this
.
nearbyType
=
t
...
...
pages/hotel/list.vue
View file @
57d3b819
...
...
@@ -185,6 +185,7 @@
endDay
:
`
${
d2
.
getMonth
()
+
1
}
-
${
d2
.
getDate
()}
`
,
day
:
1
}
this
.
dayObj
=
obj
;
uni
.
setStorage
({
key
:
'Time'
,
data
:
JSON
.
stringify
(
obj
)
...
...
@@ -232,8 +233,7 @@
this
.
startDay
=
obj
.
startDay
;
this
.
endDay
=
obj
.
endDay
;
this
.
day
=
obj
.
day
;
this
.
dayObj
.
startWeek
=
obj
.
startWeek
;
this
.
dayObj
.
endWeek
=
obj
.
endWeek
;
this
.
dayObj
=
obj
;
this
.
getList
(
1
);
this
.
showTimePopup
=
false
},
...
...
@@ -378,9 +378,6 @@
//获取列表数据
getList
(
type
)
{
this
.
searchObj
.
QStars
=
this
.
tempRateAndPrice
.
rate
.
toString
();
this
.
dayObj
.
StartDate
=
this
.
searchObj
.
QStartDate
;
this
.
dayObj
.
EndDate
=
this
.
searchObj
.
QEndDate
;
this
.
dayObj
.
day
=
this
.
day
;
if
(
type
==
1
){
this
.
HotelList
=
[];
...
...
pages/hotel/order.vue
View file @
57d3b819
This diff is collapsed.
Click to expand it.
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