Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
pingan-life-index-pro
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
5cd0a576
authored
2019-10-29 18:49:23 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
no message
1 parent
6a3e36f8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
150 additions
and
160 deletions
src/pages/product/product.js
src/pages/product/product.scss
src/pages/product/product.vue
src/pages/product/product.js
View file @
5cd0a57
import
api
from
'@/api/api'
import
{
httpGet
,
...
...
@@ -14,7 +13,7 @@ export default {
},
components
:
{},
methods
:
{
initData
()
{
},
initData
()
{},
checkBtnGroupFixed
()
{
let
top
=
this
.
$refs
.
ruleBtnGroup
.
getBoundingClientRect
().
top
;
this
.
isFixTop
=
top
<
0
;
...
...
@@ -30,5 +29,5 @@ export default {
this
.
checkBtnGroupFixed
();
});
},
created
()
{
}
created
()
{}
}
...
...
src/pages/product/product.scss
View file @
5cd0a57
.content
{
background-color
:
#f5f5f5
;
background-color
:
#f5f5f5
;
}
.fix
{
position
:
fixed
;
max-width
:
950px
;
width
:
100%
;
top
:
0
;
position
:
fixed
;
max-width
:
950px
;
width
:
100%
;
top
:
0
;
}
.banner
{
margin-bottom
:
3
.333333rem
;
position
:
relative
;
.btn-position
{
position
:
absolute
;
top
:
23
.333333rem
;
left
:
2
.833333rem
;
}
.btn
{
background
:
#FF5700
;
border
:
0
;
color
:
#fff
;
margin-left
:
0
;
width
:
160px
;
height
:
4
.166667rem
;
display
:
inline-block
;
line-height
:
4
.166667rem
;
text-align
:
center
;
border-radius
:
.416667rem
;
font-size
:
1
.666667rem
;
}
margin-bottom
:
3
.333333rem
;
position
:
relative
;
.btn-position
{
position
:
absolute
;
top
:
23
.333333rem
;
left
:
2
.833333rem
;
}
.btn
{
background
:
#FF5700
;
border
:
0
;
color
:
#fff
;
margin-left
:
0
;
width
:
160px
;
height
:
4
.166667rem
;
display
:
inline-block
;
line-height
:
4
.166667rem
;
text-align
:
center
;
border-radius
:
.416667rem
;
font-size
:
1
.666667rem
;
}
}
.fix
.rule-btn
{
width
:
33
.33333%
!
important
;
width
:
33
.33333%
!
important
;
}
.blank-pannel
{
height
:
2
.5rem
;
height
:
2
.5rem
;
}
.rule-btn-out-group
{
height
:
3rem
;
height
:
3rem
;
}
.rule-btn-group
{
display
:
flex
;
width
:
100%
;
justify-content
:
space-around
;
.rule-btn
{
width
:
33%
;
height
:
3rem
;
line-height
:
3rem
;
text-align
:
center
;
font-size
:
1
.166667rem
;
color
:
#666666
;
background
:
#ffffff
;
cursor
:
pointer
;
}
.rule-btn.activity
{
background
:
#FF5700
;
color
:
#ffffff
;
.triangle
{
width
:
0
;
height
:
0
;
margin
:
auto
;
border
:
.833333rem
solid
#FF5700
;
border-bottom-color
:
transparent
;
border-left-color
:
transparent
;
border-right-color
:
transparent
;
}
}
i
{
display
:
inline-block
;
width
:
1
.666667rem
;
height
:
1
.666667rem
;
margin-right
:
.666667rem
;
vertical-align
:
middle
;
}
.icon-product
{
background
:
url("~@/assets/images/product/icon-product-unselect.png")
no-repeat
center
center
;
background-size
:
75%
60%
;
}
display
:
flex
;
width
:
100%
;
justify-content
:
space-around
;
.activity
.icon-product
{
background
:
url("~@/assets/images/product/icon-product.png")
no-repeat
center
center
;
background-size
:
75%
60%
;
}
.icon-process
{
background
:
url("~@/assets/images/product/icon-process-unselect.png")
no-repeat
center
center
;
background-size
:
75%
60%
;
}
.activity
.icon-process
{
background
:
url("~@/assets/images/product/icon-process.png")
no-repeat
center
center
;
background-size
:
75%
60%
;
}
.
icon-problem
{
background
:
url("~@/assets/images/product/icon-problem-unselect.png")
no-repeat
center
center
;
background-size
:
75%
60%
;
}
.activity
.icon-problem
{
background
:
url("~@/assets/images/product/icon-problem.png")
no-repeat
center
center
;
background-size
:
75%
60%
;
.rule-btn
{
width
:
33%
;
height
:
3rem
;
line-height
:
3rem
;
text-align
:
center
;
font-size
:
1
.166667rem
;
color
:
#666666
;
background
:
#ffffff
;
cursor
:
pointer
;
}
.rule-btn.activity
{
background
:
#FF5700
;
color
:
#ffffff
;
.
triangle
{
width
:
0
;
height
:
0
;
margin
:
auto
;
border
:
.833333rem
solid
#FF5700
;
border-bottom-color
:
transparent
;
border-left-color
:
transparent
;
border-right-color
:
transparent
;
}
}
i
{
display
:
inline-block
;
width
:
1
.666667rem
;
height
:
1
.666667rem
;
margin-right
:
.666667rem
;
vertical-align
:
middle
;
}
.icon-product
{
background
:
url("~@/assets/images/product/icon-product-unselect.png")
no-repeat
center
center
;
background-size
:
75%
60%
;
}
.activity
.icon-product
{
background
:
url("~@/assets/images/product/icon-product.png")
no-repeat
center
center
;
background-size
:
75%
60%
;
}
.icon-process
{
background
:
url("~@/assets/images/product/icon-process-unselect.png")
no-repeat
center
center
;
background-size
:
75%
60%
;
}
.activity
.icon-process
{
background
:
url("~@/assets/images/product/icon-process.png")
no-repeat
center
center
;
background-size
:
75%
60%
;
}
.icon-problem
{
background
:
url("~@/assets/images/product/icon-problem-unselect.png")
no-repeat
center
center
;
background-size
:
75%
60%
;
}
.activity
.icon-problem
{
background
:
url("~@/assets/images/product/icon-problem.png")
no-repeat
center
center
;
background-size
:
75%
60%
;
}
}
.rule-container
{
display
:
none
;
display
:
none
;
}
.rule-container.activity
{
display
:
block
;
img
{
width
:
100%
;
display
:
block
;
img
{
width
:
100%
;
display
:
block
;
height
:
auto
;
margin
:
0
auto
;
}
height
:
auto
;
margin
:
0
auto
;
}
}
.bottom-space
{
padding-bottom
:
5rem
;
}
\ No newline at end of file
padding-bottom
:
5rem
;
}
...
...
src/pages/product/product.vue
View file @
5cd0a57
<
template
>
<div
class=
"content"
>
<div
class=
"banner"
>
<div
class=
"btn btn-position"
>
{{
$t
(
'product.btnPosition'
)
}}
</div>
<img
src=
"@/assets/images/product/banner.jpg"
/>
</div>
<div
class=
"content"
>
<div
class=
"banner"
>
<div
class=
"btn btn-position"
>
{{
$t
(
'product.btnPosition'
)
}}
</div>
<img
src=
"@/assets/images/product/banner.jpg"
/>
</div>
<div
class=
"box bottom-space"
>
<div
class=
"rule-btn-out-group"
ref=
"ruleBtnGroup"
>
<div
class=
"rule-btn-group"
:class=
"
{fix : fixTop}">
<div
class=
"rule-btn"
:class=
"
{activity : activity == 'product'}"
@click="activity = 'product'"
>
<div>
<i
class=
"icon-product"
></i>
{{
$t
(
'product.iconProduct'
)
}}
</div>
<div
class=
"triangle"
></div>
</div>
<div
class=
"rule-btn"
:class=
"
{activity : activity == 'process'}"
@click="activity = 'process'"
>
<div>
<i
class=
"icon-process"
></i>
{{
$t
(
'product.iconProcess'
)
}}
</div>
<div
class=
"triangle"
></div>
</div>
<div
class=
"rule-btn"
:class=
"
{activity : activity == 'problem'}"
@click="activity = 'problem'"
>
<div>
<i
class=
"icon-problem"
></i>
{{
$t
(
'product.iconProblem'
)
}}
</div>
<div
class=
"triangle"
></div>
</div>
</div>
</div>
<div
class=
"blank-pannel"
></div>
<div
class=
"rule-container"
:class=
"
{activity : activity == 'product'}">
<img
src=
"@/assets/images/product/product1.jpg"
/>
<img
src=
"@/assets/images/product/product2.jpg"
/>
<img
src=
"@/assets/images/product/product3.jpg"
/>
</div>
<div
class=
"rule-container"
:class=
"
{activity : activity == 'process'}">
<img
src=
"@/assets/images/product/process.jpg"
/>
</div>
<div
class=
"rule-container"
:class=
"
{activity : activity == 'problem'}">
<img
src=
"@/assets/images/product/question.jpg"
/>
</div>
</div>
</div>
<div
class=
"box bottom-space"
>
<div
class=
"rule-btn-out-group"
ref=
"ruleBtnGroup"
>
<div
class=
"rule-btn-group"
:class=
"
{fix : fixTop}">
<div
class=
"rule-btn"
:class=
"
{activity : activity == 'product'}" @click="activity = 'product'">
<div>
<i
class=
"icon-product"
></i>
{{
$t
(
'product.iconProduct'
)
}}
</div>
<div
class=
"triangle"
></div>
</div>
<div
class=
"rule-btn"
:class=
"
{activity : activity == 'process'}" @click="activity = 'process'">
<div>
<i
class=
"icon-process"
></i>
{{
$t
(
'product.iconProcess'
)
}}
</div>
<div
class=
"triangle"
></div>
</div>
<div
class=
"rule-btn"
:class=
"
{activity : activity == 'problem'}" @click="activity = 'problem'">
<div>
<i
class=
"icon-problem"
></i>
{{
$t
(
'product.iconProblem'
)
}}
</div>
<div
class=
"triangle"
></div>
</div>
</div>
</div>
<div
class=
"blank-pannel"
></div>
<div
class=
"rule-container"
:class=
"
{activity : activity == 'product'}">
<img
src=
"@/assets/images/product/product1.jpg"
/>
<img
src=
"@/assets/images/product/product2.jpg"
/>
<img
src=
"@/assets/images/product/product3.jpg"
/>
</div>
<div
class=
"rule-container"
:class=
"
{activity : activity == 'process'}">
<img
src=
"@/assets/images/product/process.jpg"
/>
</div>
<div
class=
"rule-container"
:class=
"
{activity : activity == 'problem'}">
<img
src=
"@/assets/images/product/question.jpg"
/>
</div>
</div>
</div>
</
template
>
<
script
src=
"./product.js"
></
script
>
...
...
Please
register
or
sign in
to post a comment