product-detail.vue 2.92 KB

<template>
  <div class="page cPageBottom page-product-detail">
    <div class="app__bgc bgc"></div>
    <div class="app__bg bg"></div>
    <div class="app__content main" id="scroll0">
      <div class="top-space"></div>
      <!-- 分页导航 -->
      <div class="nav">
        <van-sticky>
          <van-tabs class="tabs" v-model="active" sticky @click="onNavHandler">
            <van-tab title="商品"></van-tab>
            <van-tab title="详情"></van-tab>
            <van-tab title="参数"></van-tab>
          </van-tabs>
        </van-sticky>
      </div>
      <!-- banner -->
      <div class="banner">
        <van-swipe indicator-color="#ffcc00" class="swiper" :autoplay="3000">
          <van-swipe-item v-for="(image, index) in imageUrls" :key="index">
            <img class="img" v-lazy="image" />
          </van-swipe-item>
        </van-swipe>
      </div>
      <div class="content">
        <!-- 功能导航 -->
        <div class="func">
          <div class="desc">
            <div class="cTitle desc-title">{{product.productName}}</div>
            <div class="cFontGray desc-desc">{{product.productBrief}}</div>
          </div>
          <div class="fav">
            <div class="fav-icon">
              <span class="iconfont iconfavoriteborder"></span>
            </div>
            <div class="cFontGray fav-btn">收藏</div>
          </div>
        </div>
        <!-- 店铺信息 -->
        <div class="shop">
          <img class="shop-icon" :src="store.logoImage" alt="">
          <div class="shop-detail">
            <div class="cTitle shop-detail-title">{{store.storeName || "-"}}</div>
            <div class="shop-detail-phone">{{store.storeMobile || "-"}}</div>
          </div>
          <div @click="toShopDetail" class="shop-btn">进入店铺</div>
        </div>
        <!-- 商铺详情 -->
        <div class="detail" id="scroll1">
          <div class="cTitle detail-title">商品详情</div>
          <div class="cFontGray detail-desc">{{product.description}}</div>
        </div>
        <!-- 商品参数 -->
        <div class="parameter" id="scroll2">
          <div class="cTitle parameter-title">商品参数 </div>
          <div v-if="params.length>0" class="cFontGray parameter-table">
            <div v-for="item in params" :key="item.id" class="parameter-table-item">
              <div class="label">{{item.paramName}}</div>
              <div class="val">{{item.value}}</div>
            </div>
            <!-- <div class="parameter-table-item">
              <div class="label">label1</div>
              <div class="val">val1</div>
            </div> -->
          </div>
          <div v-else class="cFontGray detail-desc"></div>
        </div>

      </div>
      <!-- 返回顶部 -->
      <!-- <div class="top-btn" @click="toTop">返回顶部</div> -->
    </div>
  </div>
</template>

<script src="./product-detail.js"></script>
<style lang="scss" scoped>
@import "./product-detail.scss";
</style>