<template>
|
<view class="guide-page">
|
<swiper class="guide-page__swiper" :current="current" circular @change="handleSwiperChange">
|
<swiper-item v-for="(item, index) in guideList" :key="index">
|
<view class="guide-page__slide">
|
<image class="guide-page__image" :src="item.url" mode="heightFix"></image>
|
</view>
|
</swiper-item>
|
</swiper>
|
|
<view class="guide-page__dots">
|
<view
|
v-for="(item, index) in guideList"
|
:key="item.id"
|
class="guide-page__dot"
|
:class="{ 'guide-page__dot--active': current === index }"
|
></view>
|
</view>
|
|
<view class="guide-page__footer">
|
<view class="guide-page__action">
|
<button class="guide-page__button" hover-class="guide-page__button--hover" @click="jump">立即体验</button>
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
current: 0,
|
guideList: [
|
{ id: 1, background: '#d9d9d9', url: '/static/image/background.png' },
|
{ id: 2, background: '#d9d9d9', url: '/static/image/background.png' },
|
{ id: 3, background: '#d9d9d9', url: '/static/image/background.png' },
|
{ id: 4, background: '#d9d9d9', url: '/static/image/background.png' }
|
]
|
};
|
},
|
methods: {
|
handleSwiperChange(event) {
|
this.current = event.detail.current;
|
},
|
jump() {
|
uni.navigateTo({
|
url: '/pages/login/login'
|
})
|
}
|
}
|
};
|
</script>
|
|
<style lang="scss" scoped>
|
.guide-page {
|
position: relative;
|
min-height: 100vh;
|
background: #d9d9d9;
|
|
&__swiper {
|
height: 100vh;
|
}
|
|
&__slide {
|
height: 100vh;
|
}
|
|
&__image {
|
display: block;
|
width: 100%;
|
height: 100%;
|
}
|
|
&__footer {
|
position: absolute;
|
left: 0;
|
right: 0;
|
bottom: 0;
|
padding: 24rpx 0 calc(env(safe-area-inset-bottom) + 30rpx);
|
background: #ffffff;
|
}
|
|
&__dots {
|
position: absolute;
|
left: 0;
|
right: 0;
|
bottom: calc(env(safe-area-inset-bottom) + 154rpx);
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
gap: 18rpx;
|
}
|
|
&__dot {
|
width: 14rpx;
|
height: 14rpx;
|
border-radius: 50%;
|
background: rgba(255, 255, 255, 0.58);
|
transition: all 0.2s ease;
|
|
&--active {
|
width: 18rpx;
|
height: 18rpx;
|
background: #ffffff;
|
box-shadow: 0 0 0 4rpx rgba(255, 255, 255, 0.18);
|
}
|
}
|
|
&__action {
|
padding: 0 0 8rpx;
|
}
|
|
&__button {
|
width: 330rpx;
|
height: 74rpx;
|
line-height: 74rpx;
|
border: 0;
|
border-radius: 999rpx;
|
background: linear-gradient(180deg, #2d7fff 0%, #2369f3 100%);
|
box-shadow: 0 16rpx 32rpx rgba(35, 105, 243, 0.24);
|
font-size: 30rpx;
|
font-weight: 600;
|
color: #ffffff;
|
padding: 0;
|
|
&::after {
|
border: 0;
|
}
|
|
&--hover {
|
opacity: 0.92;
|
transform: translateY(2rpx);
|
}
|
}
|
}
|
</style>
|