index.vue
1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<template>
<div class="page cPageBottom page-index">
<div class="app__bgc bgc"></div>
<div class="app__bg bg"></div>
<div class="app__content main">
<div class="top-space"></div>
<!-- 轮播banner -->
<div class="banner">
<van-swipe indicator-color="#ffcc00" class="swiper" :autoplay="3000">
<van-swipe-item v-for="(image, index) in bannerList" :key="index">
<img class="img" v-lazy="image" />
</van-swipe-item>
</van-swipe>
</div>
<!-- 类别选择 -->
<div class="sel">
<div v-for="(item,index) in typeList" :key="item.id" class="sel-item " :class="'sel-item-'+(index+1)">
{{ item.typeName }}
</div>
<div class="sel-item sel-item-my" @click="toMyFavorite">
我的<br>收藏
</div>
</div>
<div class="content">
<!-- 产品推荐 -->
<div class="product">
<div class="product-title">-- 产品推荐 --</div>
<div class="product-list">
<div @click="toProduct(item)" v-for="(item,index) in productList" :key="index" class="item">
<div class="image-wrap">
<img class="image" :src="item.imageUrl" alt="">
</div>
<div class="desc">{{item.productName}}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script src="./index.js"></script>
<style lang="scss" scoped>
@import "./index.scss";
</style>