GFRS-2591【前端】新增星路历程页面。提交人--张齐

This commit is contained in:
zhangqi1
2021-08-27 20:00:50 +08:00
parent 3a46d24d22
commit 1f254e18ec
3 changed files with 70 additions and 15 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

View File

@@ -1,26 +1,37 @@
<template> <template>
<v-touch <div class='starProcess-container'>
class='starProcess-container animate__animated' <van-swipe @change='onChange' :loop='false' :show-indicators='false' :touchable='true' vertical>
:class='animateCssIsActiveObj.background' <!-- 第一页 -->
:style="'background: url(' + backgroundImage + ') no-repeat'" <van-swipe-item>
id='my-node' <div class='first-page-background-img animate__animated animate__fadeIn' v-if='current==0'>
ref='starProcessContainer'> <img class='crown-group-img animate__animated animate__zoomIn'
src='../../../assets/images/starProcess/crown-group-img.png' alt=''>
<img class='company-name-img animate__animated animate__zoomIn'
src='../../../assets/images/starProcess/company-name-img.png' alt=''>
</v-touch>
<!-- <div class='starProcess-container animate__animated'-->
<!-- :class='[isActive ? animateClassObj.animateIn : ""]'>-->
<!-- </div>--> </div>
</van-swipe-item>
<van-swipe-item>2</van-swipe-item>
<van-swipe-item>3</van-swipe-item>
<van-swipe-item>4</van-swipe-item>
</van-swipe>
</div>
</template> </template>
<script> <script>
import backgroundImg1 from '@/assets/images/starProcess/background-img-1.png' import { Swipe, SwipeItem } from 'vant'
export default { export default {
name: 'starProcess', name: 'starProcess',
components: {
[Swipe.name]: Swipe,
[SwipeItem.name]: SwipeItem
},
data() { data() {
return { return {
backgroundImage: backgroundImg1, // 背景图 current: 0,
// 定义存储各模块动画是否开启的对象 // 定义存储各模块动画是否开启的对象
animateCssIsActiveObj: { animateCssIsActiveObj: {
background: '' // 页面背景图动画效果 background: '' // 页面背景图动画效果
@@ -33,7 +44,24 @@ export default {
mounted() { mounted() {
this.animateCssIsActiveObj.background = this.animateCssObj.fadeIn this.animateCssIsActiveObj.background = this.animateCssObj.fadeIn
}, },
methods: {} methods: {
onChange(index) {
switch (index) {
case 0 :
setTimeout(() => {
this.current = index
this.animateCssIsActiveObj.background = this.animateCssObj.fadeIn
}, 500)
break
case 1:
setTimeout(() => {
this.current = index
this.animateCssIsActiveObj.background = ''
}, 500)
break
}
}
}
} }
</script> </script>
@@ -41,8 +69,35 @@ export default {
.starProcess-container { .starProcess-container {
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;
background-size: 100% 100% !important; }
background-color: #181935 !important;
.van-swipe {
height: 100vh;
}
.first-page-background-img {
width: 100%;
min-height: 100vh;
background: url('../../../assets/images/starProcess/background-img-1.png') no-repeat;
background-size: contain;
background-color: #181935;
position: fixed;
.crown-group-img {
width: 207px;
height: 283px;
float: right;
}
.company-name-img {
width: 284px;
height: 20px;
position: fixed;
top: 238px;
left: 43px;
}
} }
</style> </style>