Files
xdd-uniapp-new/pkg_product/components/ThemePageTemplate2.vue
T

175 lines
3.8 KiB
Vue

<template>
<view>
<image
:src="topImage"
class="top-img"
mode="widthFix"
/>
<view class="page-wrap">
<view class="page-2">
<!-- <swiper
class="swiper"
circular
autoplay
:interval="5000"
>
<swiper-item
v-for="(swiperItem, swiperIndex) in templateProperties.page2Links"
:key="swiperIndex"
>
<image
:src="swiperItem.image"
mode="scaleToFill"
class="swiper-img"
@click="itemClick(swiperItem)"
/>
</swiper-item>
</swiper> -->
<carousel
:img-list="templateProperties.page2Links"
:bg-img="templateProperties.page2BackgroundImage"
url-key="image"
@selected="itemClick"
/>
</view>
</view>
<!-- 第三页 -->
<view class="page-wrap">
<view class="page-3">
<image
:src="templateProperties.page3BackgroundImage"
class="section-bg"
mode="widthFix"
/>
<view class="list flex flex-wrap">
<image
v-for="(item, index) in templateProperties.page3Links"
:key="index"
:src="item.image"
class="item"
mode="scaleToFill"
@click="itemClick(item)"
/>
</view>
</view>
</view>
<!-- 第四页 -->
<view class="page-wrap">
<view class="page-4">
<image
:src="templateProperties.page4BackgroundImage"
class="section-bg"
mode="widthFix"
/>
<view class="list flex flex-wrap">
<image
v-for="(item, index) in templateProperties.page4Links"
:key="index"
:src="item.image"
class="item"
mode="scaleToFill"
@click="itemClick(item)"
/>
</view>
</view>
</view>
<!-- 第五页 -->
<view class="page-wrap">
<view class="page-4">
<image
:src="templateProperties.page5BackgroundImage"
class="section-bg"
mode="widthFix"
/>
<view class="list flex flex-wrap">
<image
v-for="(item, index) in templateProperties.page5Links"
:key="index"
:src="item.image"
class="item"
mode="scaleToFill"
@click="itemClick(item)"
/>
</view>
</view>
</view>
</view>
</template>
<script>
/**
* 模板2
*/
import { themeTemplateMixins } from '../mixins/themeTemplateMixins'
import carousel from './vear-carousel/vear-carousel'
export default {
name: 'ThemePageTemplate2',
components: {
carousel
},
mixins: [themeTemplateMixins]
}
</script>
<style scoped lang="less">
.top-img {
display: block;
width: 100%;
}
.page-wrap {
position: relative;
.page-2 {
width: 100%;
height: 840rpx;
.swiper {
width: 100%;
height: 100%;
.swiper-img {
display: block;
width: 100%;
height: 100%;
}
}
}
.page-3 {
.section-bg {
display: block;
width: 100%;
height: auto;
}
.list {
position: absolute;
top: 400rpx;
left: 35rpx;
right: 35rpx;
.item {
display: block;
width: 680rpx;
height: 500rpx;
margin: 0 0 35rpx 0;
}
}
}
.page-4 {
.section-bg {
display: block;
width: 100%;
height: auto;
}
.list {
position: absolute;
top: 400rpx;
left: 35rpx;
right: 0;
.item {
display: block;
width: 330rpx;
height: 540rpx;
margin: 0 30rpx 25rpx 0;
&:nth-child(2n) {
margin-right: 0;
}
}
}
}
}
</style>