宜兴数字资产-善卷洞
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

119 lines
2.2 KiB

5 months ago
<template>
<view class="bg">
4 months ago
<image class="bg-image" src="/static/2/bg.png" mode="widthFix"></image>
<view class="bg-content">
<image style="display: block;" class="back-icon" src="/static/back.png" @click="goBack()"></image>
5 months ago
<image :src="`/static/2/${current + 1}s.png`" class="text-img"></image>
4 months ago
<view class="line"></view>
5 months ago
4 months ago
<swiper class="swiper-box" :circular="false" previous-margin="210rpx" next-margin="210rpx"
:duration="800"
5 months ago
:current="current" circular="true" @change="swiperChange">
5 months ago
<swiper-item v-for="(item, index) in 3" :key="index" class="flex-center"
@click="goShanJuan(item,index)">
5 months ago
<view :class="['swiper-item', {'swiper-items': index != current}]">
<image :src="`/static/2/${item}.png`" mode="aspectFill"></image>
</view>
</swiper-item>
</swiper>
4 months ago
</view>
5 months ago
</view>
</template>
<script>
export default {
data() {
return {
current: 0
}
},
methods: {
//轮播图左右滑动
swiperChange(e) {
let {
current,
source
} = e.detail;
//在自动或手动的时候才赋予current值
if (source === 'autoplay' || source === 'touch') {
this.current = current;
}
},
5 months ago
goShanJuan (item, index) {
if (index==0) {
uni.navigateTo({
url:"/pages/index/shanJuan"
})
}
}
5 months ago
}
}
</script>
<style lang="scss" scoped>
.bg {
width: 100vw;
4 months ago
min-height: 100vh;
5 months ago
position: relative;
box-sizing: border-box;
4 months ago
font-size: 0;
background: black;
.bg-image{
width: 100%;
height: auto;
}
.bg-content{
width: 100%;
height: 100%;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
5 months ago
}
.text-img {
width: 656rpx;
height: 546rpx;
4 months ago
margin: 0 auto;
display: block;
}
.line{
width: 654rpx;
height: 2rpx;
background: #FCF1E6;
margin: 32rpx auto 100rpx;
5 months ago
}
.swiper-box {
height: 746rpx;
}
.swiper-item {
width: 337rpx;
height: 746rpx;
image {
width: 337rpx;
height: 746rpx;
}
}
.swiper-items {
transform: scale(.8);
4 months ago
transform-origin : 50% 100%;
position: relative;
&:before{
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.5);
z-index: 2;
}
// filter: blur(2px)
5 months ago
}
</style>