product-detail.vue
2.92 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<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>