56 lines
902 B
Vue
56 lines
902 B
Vue
<template>
|
|
<swiper
|
|
class="swiper"
|
|
circular
|
|
:indicator-dots="true"
|
|
autoplay
|
|
:interval="interval * 1000"
|
|
:duration="500"
|
|
>
|
|
<block v-for="(v, i) in list" :key="i">
|
|
<swiper-item>
|
|
<image :src="v.imgUrl" mode="aspectFill" @tap="toH5(v.linkUrl)" />
|
|
</swiper-item>
|
|
</block>
|
|
</swiper>
|
|
</template>
|
|
|
|
<script setup>
|
|
const props = defineProps({
|
|
list: { type: Array, default: [] },
|
|
interval: { type: [String, Number] },
|
|
});
|
|
const toH5 = (url) => {
|
|
if (!url) return;
|
|
uni.navigateTo({
|
|
url: '/pages/adH5/adH5?url=' + url,
|
|
});
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.uni-margin-wrap {
|
|
width: 690rpx;
|
|
width: 100%;
|
|
}
|
|
|
|
.swiper {
|
|
margin: 40rpx;
|
|
height: 300rpx;
|
|
border-radius: 30rpx;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.swiper-item {
|
|
display: block;
|
|
|
|
height: 300rpx;
|
|
line-height: 300rpx;
|
|
text-align: center;
|
|
}
|
|
|
|
image {
|
|
width: 100%;
|
|
}
|
|
</style>
|