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
88690202
Commit
88690202
authored
Apr 24, 2025
by
youjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
5ca46b78
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
38 deletions
+54
-38
search.vue
pages/hotel/components/search.vue
+1
-1
date.vue
pages/hotel/components/time/date.vue
+20
-3
index.vue
pages/hotel/components/time/index.vue
+30
-31
detail.vue
pages/hotel/detail.vue
+1
-1
order.vue
pages/hotel/order.vue
+2
-2
No files found.
pages/hotel/components/search.vue
View file @
88690202
...
...
@@ -173,7 +173,7 @@
border-radius=
"20"
length=
"89%"
:safe-area-inset-bottom=
"true"
:mask-close-able=
"false"
>
<CheckDate
:msg=
"parameters"
@
chosenDateResult=
"chosenDateResult"
></CheckDate>
<CheckDate
:
showTimePopup=
"showTimePopup"
:
msg=
"parameters"
@
chosenDateResult=
"chosenDateResult"
></CheckDate>
</u-popup>
<u-popup
v-model=
"showSearchCity"
mode=
"Right"
length=
"100%"
>
...
...
pages/hotel/components/time/date.vue
View file @
88690202
...
...
@@ -5,7 +5,9 @@
display: flex;
flex-direction: column;"
>
<view
style=
"width: 100%; height: 740rpx"
>
<canlendar
@
finish=
"chosenDateResult"
title=
"日期和人数"
></canlendar>
<canlendar
v-if=
"showTimePopup"
:defaultDate=
"dayObj.start"
@
finish=
"chosenDateResult"
title=
"日期和人数"
></canlendar>
</view>
<view
class=
"column"
style=
"background: #ecf1f4; padding: 20rpx 0 50rpx 0;height: 1rpx;flex: 1;"
>
<view
class=
"row line-flexBoxRoom"
>
...
...
@@ -110,7 +112,7 @@
<
script
>
import
canlendar
from
"./index"
;
export
default
{
props
:[
'msg'
],
props
:[
'msg'
,
'showTimePopup'
],
components
:
{
canlendar
},
...
...
@@ -125,6 +127,7 @@ export default {
},
TypeList
:
[],
current
:
-
1
,
dayObj
:
{},
}
},
watch
:{
...
...
@@ -136,6 +139,12 @@ export default {
},
deep
:
true
,
},
showTimePopup
:
{
handler
(
val
,
oldval
)
{
},
deep
:
false
,
immediate
:
true
},
},
created
(){
for
(
let
i
=
1
;
i
<=
18
;
i
++
){
...
...
@@ -145,6 +154,15 @@ export default {
})
}
},
mounted
()
{
uni
.
getStorage
({
key
:
"Time"
,
success
:
(
res
)
=>
{
let
obj
=
JSON
.
parse
(
res
.
data
);
this
.
dayObj
=
obj
},
});
},
methods
:
{
getRooms
(
e
){
if
(
e
.
value
>
this
.
parameters
.
rooms
||
e
.
value
<
this
.
parameters
.
rooms
){
...
...
@@ -224,7 +242,6 @@ export default {
})
}
}
this
.
showTimePopup
=
false
;
this
.
$emit
(
'chosenDateResult'
,
this
.
parameters
,
obj
)
},
}
...
...
pages/hotel/components/time/index.vue
View file @
88690202
...
...
@@ -2,37 +2,12 @@
<view
class=
"content"
>
<scroll-view
:scroll-y=
"true"
class=
"hotelSign-scroll"
scroll-with-animation=
"true"
style=
"height: 100%; flex: 1; box-sizing: border-box"
:scroll-top=
"scrollTop"
>
<view
class=
"header"
>
<!--
<view
class=
"bar"
></view>
<view
class=
"set text-gray"
>
<text
@
click=
"close"
style=
"font-size:40upx;"
>
返回
</text>
<text
@
click=
"reset"
style=
"font-size:35upx;color:#DDDDDD"
>
清空
</text>
</view>
-->
<!--
<view
class=
"in-and-out"
>
<view
class=
"item"
v-if=
"start.length > 0"
>
<view
style=
"font-size:30upx;color:#C0C0C0"
>
入住日期
</view>
<view
style=
"font-weight: bold;margin-top:10upx;font-size:36upx"
>
{{
startDay
}}
</view>
<view
style=
"font-size:24upx;margin-top:10upx"
>
{{
startWeek
}}
</view>
</view>
<view
class=
"item text"
v-if=
"start.length == 0"
>
<view>
入住日期
</view>
</view>
<view
class=
"item"
>
<view
class=
"count-border"
:class=
"day == 0 ? 'gray' : 'orange'"
>
<view
class=
"count"
style=
"font-size:26upx;line-height:26upx;"
>
共
{{
day
}}
晚
</view>
</view>
</view>
<view
class=
"item text"
v-if=
"end.length == 0"
>
<view>
离店日期
</view>
</view>
<view
class=
"item"
v-if=
"end.length > 0"
>
<view
style=
"font-size:30upx;color:#C0C0C0"
>
离店日期
</view>
<view
style=
"font-weight: bold;margin-top:10upx;font-size:36upx"
>
{{
endDay
}}
</view>
<view
style=
"font-size:24upx;margin-top:10upx"
>
{{
endWeek
}}
</view>
</view>
</view>
-->
<view
style=
"
font-size: 32rpx;
...
...
@@ -154,8 +129,7 @@
import
json
from
"./day.js"
;
export
default
{
props
:[
'title'
],
computed
:
{},
props
:[
'title'
,
'defaultDate'
],
computed
:
{
//房间是否能预订
isSub
()
{
...
...
@@ -226,10 +200,14 @@ export default {
day
:
0
,
//多少晚
priceStauts
:
[],
//价格状态
lastNot
:
[
0
,
10
],
//前置的无房操作
userDefaultDate
:
""
,
scrollTop
:
0
,
scrollHeight
:
0
};
},
mounted
()
{
console
.
log
(
"进入了...."
);
this
.
userDefaultDate
=
this
.
defaultDate
;
uni
.
getSystemInfo
({
success
:
(
res
)
=>
{
this
.
dayWidth
=
res
.
windowWidth
;
...
...
@@ -287,9 +265,22 @@ export default {
// }
// });
// }
setTimeout
(()
=>
{
const
that
=
this
const
query
=
uni
.
createSelectorQuery
().
in
(
this
);
query
.
selectAll
(
'.hotelSign-scroll'
).
boundingClientRect
((
rects
)
=>
{
that
.
scrollHeight
=
rects
[
0
].
height
that
.
calcDefautlOffset
()
}).
exec
();
},
500
)
},
onShow
(){
},
watch
:
{
defaultDate
(
newVal
)
{
this
.
userDefaultDate
=
newVal
;
},
//离店日期
end
(
newVal
)
{
if
(
this
.
end
.
length
!=
0
)
{
...
...
@@ -366,6 +357,14 @@ export default {
},
},
methods
:
{
calcDefautlOffset
(){
const
that
=
this
const
query
=
uni
.
createSelectorQuery
().
in
(
this
);
query
.
selectAll
(
'.select-style'
).
boundingClientRect
((
rects
)
=>
{
const
top
=
rects
[
0
].
top
-
(
that
.
scrollHeight
)
-
20
that
.
scrollTop
=
top
>
0
?
top
:
0
}).
exec
();
},
//月份补零
setMonth
(
dateIndex
)
{
let
month
=
this
.
date
[
dateIndex
].
month
;
...
...
pages/hotel/detail.vue
View file @
88690202
...
...
@@ -240,7 +240,7 @@
border-radius=
"20"
length=
"89%"
:safe-area-inset-bottom=
"true"
:mask-close-able=
"false"
>
<CheckDate
:msg=
"searchObj"
@
chosenDateResult=
"chosenDateResult"
></CheckDate>
<CheckDate
:
showTimePopup=
"showTimePopup"
:
msg=
"searchObj"
@
chosenDateResult=
"chosenDateResult"
></CheckDate>
</u-popup>
<auth
v-if=
"showAuth&&is_show_auth"
@
changeuserinfo=
"reloadUserinfo"
@
gbAuth=
"gbAuth"
></auth>
</view>
...
...
pages/hotel/order.vue
View file @
88690202
...
...
@@ -74,8 +74,8 @@
<
/view
>
<
view
class
=
"LastNameBox column val"
style
=
"width: 1px;flex: 1;"
>
<
view
class
=
"row items-center"
v
-
for
=
"(sItem,i) in item.GuestInfo"
:
key
=
"i"
>
<
input
type
=
"text"
v
-
model
=
"sItem.LastName"
:
placeholder
=
"`${sItem.IsAdult?'住客':
'
儿童'
}
${i+1
}
姓`"
/>
<
input
type
=
"text"
v
-
model
=
"sItem.FirstName"
:
placeholder
=
"`${sItem.IsAdult?'住客':
'
儿童'
}
${i+1
}
名`"
/>
<
input
type
=
"text"
v
-
model
=
"sItem.LastName"
:
placeholder
=
"`${sItem.IsAdult?'住客':
sItem.Age+'岁
儿童'
}
${i+1
}
姓`"
/>
<
input
type
=
"text"
v
-
model
=
"sItem.FirstName"
:
placeholder
=
"`${sItem.IsAdult?'住客':
sItem.Age+'岁
儿童'
}
${i+1
}
名`"
/>
<!--
<
view
class
=
"row"
style
=
"margin-left:20rpx;"
>
<
image
v
-
if
=
"item.GuestInfo.length>1"
style
=
"width: 27rpx;height: 27rpx;display: block;"
...
...
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