Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_wechat
Overview
Overview
Details
Activity
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
pseer
gxpt_wechat
Commits
8f861dfe
Commit
8f861dfe
authored
May 10, 2024
by
zhangzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页优化
parent
b62b1b0c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
117 additions
and
36 deletions
+117
-36
index.vue
pages/index/index.vue
+117
-36
No files found.
pages/index/index.vue
View file @
8f861dfe
...
...
@@ -56,26 +56,37 @@
</view>
-->
<view
v-for=
"(item,index) in roomVoList"
:key=
"index"
class=
"list-item-box"
@
tap=
"onNavToOrder(item)"
>
<view
class=
"
itemRow
listStyle"
>
<view
class=
"listStyle"
>
<view
class=
"relative part-top"
>
<image
class=
"room-img"
:src=
"item.images[0]"
mode=
"aspectFill"
@
tap
.
stop=
"onPreview(item.images)"
></image>
<view
class=
"absolute"
>
<view
class=
'status-bg bg-gray'
v-if=
"item.roomStat >= 3"
>
维护
<view
class=
"stauts-tag"
>
<text>
维护
</text>
</view>
</view>
<view
class=
'status-bg bg-red'
v-else-if=
"item.isDirtyRoom >= 1"
>
未保洁
<view
class=
"stauts-tag"
>
<text>
未保洁
</text>
</view>
</view>
<view
v-else-if=
"item.recordsStatus>=0"
class=
"status-bg bg-red"
>
{{
recordsStatusEnum
[
item
.
recordsStatus
]
}}
<view
class=
"stauts-tag"
>
<text>
{{
recordsStatusEnum
[
item
.
recordsStatus
]
}}
</text>
</view>
</view>
<view
v-else
class=
'status-bg'
:class=
"item.status==0?'bg-green':item.status==1?'bg-pink':'bg-blue'"
>
{{
roomStatusEnum
[
item
.
status
]
}}
{{
item
.
recordsTime
?
'('
+
item
.
recordsTime
+
'结束)'
:
''
}}
<view
class=
"stauts-tag"
>
<text>
{{
roomStatusEnum
[
item
.
status
]
}}
</text>
</view>
<view
v-if=
"item.recordsTime"
class=
"room-use"
>
<text>
占用结束时间
</text>
<text>
{{
item
.
recordsTime
}}
</text>
</view>
</view>
</view>
</view>
...
...
@@ -120,17 +131,33 @@
<view
class=
"item-Go"
>
<view
class=
"flex-row room-type"
>
<view
class=
"flex-col flex-1"
>
<view
v-for=
"(val,i) in item.
pack
List"
:key=
"i"
v-if=
"i
<2
"
class=
"item"
>
<view
v-for=
"(val,i) in item.
roomLabel
List"
:key=
"i"
v-if=
"i
<2
"
class=
"item"
>
<view
class=
"part-2"
>
<text
class=
"text-sm"
>
{{
val
.
d
uration
}}
小时套餐:
</text>
<text
class=
"text-sm"
>
{{
val
.
labelD
uration
}}
小时套餐:
</text>
<text
class=
"text-red text-sm margin-left-sm"
>
¥
</text>
<text
class=
"text-red text-bold text-xl"
>
{{
val
.
price
}}
</text>
<text
class=
"text-red text-bold text-xl"
>
{{
val
.
p
ackP
rice
}}
</text>
</view>
</view>
</view>
<view
class=
"confirm"
>
<button
class=
"cu-btn"
>
预定
</button>
<view
class=
"confirm-text"
>
<text>
预定
</text>
</view>
<view
class=
"confirm-status"
>
<text
v-if=
"item.roomStat >= 3"
>
维护
</text>
<text
v-else-if=
"item.isDirtyRoom >= 1"
>
未保洁
</text>
<text
v-else-if=
"item.recordsStatus>=0"
>
{{
recordsStatusEnum
[
item
.
recordsStatus
]
}}
</text>
<text
v-else
>
{{
roomStatusEnum
[
item
.
status
]
}}
</text>
</view>
</view>
</view>
</view>
...
...
@@ -466,9 +493,11 @@
}
else
if
(
item
.
status
===
0
)
{
sortNum
=
1
}
return
{
...
item
,
sortNum
,
roomLabelList
:
item
.
roomLabelList
&&
item
.
roomLabelList
.
length
?
item
.
roomLabelList
.
filter
(
roomVal
=>
roomVal
.
openPack
==
1
):[],
recordsTime
:
item
.
recordsTime
?
moment
(
item
.
recordsTime
).
format
(
"HH:mm"
)
:
""
,
facilities
:
item
.
facilities
?
item
.
facilities
.
split
(
","
)
:
[],
...
...
@@ -1057,8 +1086,7 @@
justify-content
:
center
;
align-items
:
center
;
width
:
240
rpx
;
min-height
:
300
upx
;
border-radius
:
12
upx
;
min-height
:
260
upx
;
overflow
:
hidden
;
.room-img
{
...
...
@@ -1071,34 +1099,75 @@
left
:
0
;
bottom
:
0
;
width
:
100%
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
height
:
60
upx
;
height
:
100%
;
.status-bg
{
position
:
relative
;
width
:
100%
;
height
:
100%
;
border
:
2px
solid
#02F6FF
;
background-color
:
transparent
!important
;
.stauts-tag{
position
:
relative
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
90
upx
;
padding
:
2
upx
0
6
upx
;
background
:
#02F6FF
;
border-radius
:
0
0
12
upx
0
;
z-index
:
6
;
text{
color
:
#ffffff
;
font-size
:
24
rpx
;
}
}
.room-use
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
background
:
rgba
(
0
,
0
,
0
,
0.2
);
z-index
:
2
;
text{
color
:
#ffffff
;
font-size
:
24
upx
;
margin
:
4
upx
0
;
}
}
}
.bg-gray
{
background
:
rgba
(
136
,
136
,
136
,
0.96
);
color
:
#ffffff
;
border-color
:
#9999A3
;
.stauts-tag{
background
:
#9999A3
;
}
}
.bg-pink
{
background
:
rgba
(
230
,
58
,
159
,
0.8
);
border-color
:
#e51771
;
.stauts-tag{
background
:
#e51771
;
}
}
.bg-green
{
background
:
rgba
(
57
,
181
,
74
,
0.8
);
border-color
:
#02F6FF
;
.stauts-tag{
background
:
#02F6FF
;
}
}
.bg-red
{
background
:
rgba
(
229
,
77
,
66
,
0.8
);
border-color
:
#EE8A1A
;
.stauts-tag{
background
:
#EE8A1A
;
}
}
}
}
...
...
@@ -1279,24 +1348,36 @@
}
.confirm
{
.cu-btn
{
padding
:
8
upx
20
upx
;
height
:
52
rpx
;
background
:
linear-gradient
(
97deg
,
#E5268B
,
#FD5661
);
color
:
#ffffff
;
width
:
100
upx
;
.confirm-text
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
100%
;
height
:
60
upx
;
background
:
linear-gradient
(
180deg
,
#E03997
18%
,
#FF375D
99%
);
border-radius
:
8
upx
8
upx
18
upx
8
upx
;
text{
font-weight
:
600
;
font-size
:
30
rpx
;
color
:
#FFFFFF
;
letter-spacing
:
4
upx
;
font-size
:
30
upx
;
text-align
:
center
;
opacity
:
0.95
;
border-radius
:
12
rpx
;
margin-right
:
10
upx
;
}
.text-lg
{
}
.confirm-status
{
display
:
flex
;
justify-content
:
center
;
width
:
100%
;
border
:
4
upx
solid
#E40583
;
border-top-color
:
transparent
;
padding
:
27
upx
0
7
upx
;
border-radius
:
0
0
10
upx
10
upx
;
margin-top
:
-20
upx
;
text{
font-weight
:
500
;
font-size
:
24
rpx
;
font-weight
:
bolder
;
margin-bottom
:
4
upx
;
margin-right
:
4
upx
;
color
:
#F13A7A
;
}
}
}
...
...
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