Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 7c9bc515
authored
Jun 21, 2024
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
93e1f267
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
207 additions
and
11 deletions
pages/equity/detail/components/Guarantee.vue
pages/equity/detail/components/Guarantee.vue
View file @
7c9bc51
...
...
@@ -5,13 +5,36 @@
<view
class=
"title"
>
{{
title
}}
</view>
<view
class=
"container"
>
<view
class=
"container-left"
>
<view
v-for=
"item in list"
:key=
"item.name"
class=
"item"
:class=
"item.class"
:style=
"item.style"
>
<image
:src=
"item.detailUrl"
mode=
"widthFix"
class=
"item-image"
/>
<view
class=
"item-text"
>
{{
item
.
name
}}
</view>
</view>
<view
v-for=
"(item, index) in views"
:key=
"item.name"
class=
"item"
@
click=
"showSection(index)"
:class=
"item.class"
:style=
"item.style"
>
<view
class=
"image-container"
>
<image
:src=
"item.detailUrl"
mode=
"widthFix"
class=
"item-image"
/>
<view
class=
"item-text"
>
{{
item
.
name
}}
</view>
</view>
<view
class=
"details-container"
>
<view
class=
"details-section"
:class=
"showIndex == index ? 'show' : 'hide'"
>
<view
class=
"section-title"
>
{{
item
.
name
}}
</view>
<view
class=
"section-description"
>
冷却风扇电机、散热器、冷却液水壶盖、冷却液水壶、冷却液循环泵
</view>
</view>
</view>
</view>
</view>
<view
class=
"container-right"
>
<image
src=
"https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-15.webp"
mode=
"widthFix"
class=
"serice-image"
/>
<view
class=
"ul"
>
<view
class=
"ul-title"
>
高价值零部件
</view>
<view
class=
"li-item"
v-for=
"i in ulList"
:key=
"i.index"
@
click=
"open(i.flagName)"
>
<view
class=
"li-content"
>
<view
class=
"li-item-content"
><view
class=
"li-number"
>
{{
i
.
index
}}
</view>
{{
i
.
name
}}
</view>
<image
v-if=
"i.hasArrow"
src=
"https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/icon-arrow.webp"
mode=
"scaleToFill"
class=
"icon-arrow"
/>
</view>
<view
class=
"li-value"
>
{{
i
.
value
}}
</view>
</view>
</view>
</view>
</view>
</
template
>
...
...
@@ -25,7 +48,8 @@ const list = [
detailUrl
:
"https://img02.glsx.com.cn/weapp/resource/app-tape/media/guarantee/6-1.webp"
,
style
:
'width: 284rpx;height: 498rpx;float: left;'
,
class
:
'm-r-b'
class
:
'm-r-b'
,
sectionStyle
:
'top: -498rpx'
},
{
name
:
"悬挂系统"
,
...
...
@@ -118,6 +142,44 @@ const list = [
style
:
'width: 286rpx;height: 332rpx;float: left;'
},
];
const
ulList
=
[
{
index
:
'01'
,
name
:
'元宝梁'
,
value
:
'价值4千-1万元'
},
{
index
:
'02'
,
name
:
'转向节'
,
value
:
'价值2千-5千元'
},
{
index
:
'03'
,
name
:
'减震器上座'
,
value
:
'价值1千-3千元'
},
{
index
:
'04'
,
name
:
'智能中控屏'
,
value
:
'价值5千-3万元'
,
hasArrow
:
true
,
flagName
:
'control'
},
{
index
:
'05'
,
name
:
'空调压缩机'
,
value
:
'价值4千-1.6万元'
,
hasArrow
:
true
,
flagName
:
'compressor'
},
{
index
:
'06'
,
name
:
'空气悬挂'
,
value
:
'价值1万-1.3万元'
,
hasArrow
:
true
,
flagName
:
'airSuspension'
}
]
export
default
{
name
:
"Guarantee"
,
props
:
{
...
...
@@ -129,12 +191,29 @@ export default {
data
()
{
return
{
viewIndex
:
6
,
list
list
,
ulList
,
showIndex
:
-
1
};
},
mounted
()
{
console
.
log
(
this
.
views
);
},
methods
:
{
open
(
name
)
{
console
.
log
(
name
)
},
showSection
(
index
)
{
console
.
log
(
index
)
if
(
this
.
showIndex
===
index
)
{
// 如果当前点击的项已经是翻转状态,则关闭它
this
.
showIndex
=
-
1
;
}
else
{
// 否则,打开新点击的项
this
.
showIndex
=
index
;
}
}
},
};
</
script
>
...
...
@@ -164,18 +243,14 @@ export default {
column-gap
:
64
rpx
;
&-left
{
position
:
relative
;
//
display
:
flex
;
//
flex-direction
:
row
;
//
flex-wrap
:
wrap
;
//
column-count
:
auto
;
column-gap
:
16
rpx
;
border-radius
:
24
rpx
;
&::after{
content
:
""
;
display
:
block
;
clear
:
both
;
}
flex
:
1
;
//
width
:
1786rpx
;
.item
{
position
:
relative
;
}
...
...
@@ -190,6 +265,46 @@ export default {
color
:
#FFFFFF
;
line-height
:
44
rpx
;
}
.details-container
{
position
:
absolute
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
border-radius
:
24
rpx
;
}
.details-section
{
//
position
:
absolute
;
//
top
:
0
;
//
left
:
0
;
width
:
100%
;
height
:
100%
;
color
:
#FFFFFF
;
padding
:
24
rpx
;
border-radius
:
24
rpx
;
background-image
:
linear-gradient
(
180deg
,
#21425c
b3
0%
,
#4A84F9
68%
);
display
:
none
;
flex-direction
:
column
;
justify-content
:
flex-end
;
animation
:
show-gradient
.2s
linear
;
//
overflow
:
hidden
;
//
animation
:
slide-top
2s
linear
;
.section-title
{
font-size
:
30
rpx
;
}
.section-description
{
font-size
:
24
rpx
;
margin-top
:
12
rpx
;
}
}
.show
{
display
:
flex
;
}
.hide
{
//
display
:
none
;
animation
:
hidden-gradient
2s
linear
;
}
}
&
-right
{
width
:
336
rpx
;
...
...
@@ -197,6 +312,67 @@ export default {
width
:
336
rpx
;
height
:
280
rpx
;
}
.ul
{
width
:
100%
;
border
:
4
rpx
solid
#FDFDFF
;
border-radius
:
24
rpx
;
margin-top
:
36
rpx
;
box-sizing
:
border-box
;
&-title
{
background-color
:
#4A84F9
;
box-shadow
:
inset
0
0
16
rpx
0
#FFFFFF
;
border-radius
:
24
rpx
24
rpx
0
0
;
height
:
88
rpx
;
font-weight
:
500
;
font-size
:
28
rpx
;
color
:
#FFFFFF
;
line-height
:
88
rpx
;
text-align
:
center
;
}
.li-item
{
width
:
100%
;
height
:
128
rpx
;
box-sizing
:
border-box
;
display
:
flex
;
justify-content
:
center
;
flex-direction
:
column
;
padding-left
:
40
rpx
;
//
margin-bottom
:
4
rpx
;
border
:
2
rpx
solid
#FDFDFF
;
.li-number
{
font-size
:
32
rpx
;
margin-right
:
12
rpx
;
}
.li-content
{
display
:
flex
;
align-items
:
center
;
.li-item-content
{
display
:
flex
;
align-items
:
baseline
;
}
.icon-arrow
{
width
:
28
rpx
;
height
:
28
rpx
;
margin-left
:
12
rpx
;
}
}
.li-value
{
margin-top
:
8
rpx
;
font-size
:
22
rpx
;
color
:
#1462FF
;
}
&
:nth-child
(
odd
)
{
background-color
:
#E5EDFF
;
}
&
:nth-child
(
even
)
{
background-color
:
rgba
(
255
,
255
,
255
,
0.35
);
}
&
:last-child
{
border-radius
:
0
0
24
rpx
24
rpx
;
height
:
140
rpx
;
}
}
}
}
}
}
...
...
@@ -210,4 +386,24 @@ export default {
.m-r
{
margin-right
:
16
rpx
;
}
//
动画效果
@keyframes
show-gradient
{
0
%
{
transform
:
translateY
(
100%
);
}
100
%
{
transform
:
translateY
(
0
);
}
}
@keyframes
hidden-gradient
{
0
%
{
transform
:
translateY
(
0
);
}
100
%
{
transform
:
translateY
(
100%
);
}
}
</
style
>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment