index.vue 1.48 KB

<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>