fuliqi
2024-01-24 29c1e7eb5ac16e90d8991a86c1c071bc312ec8d9
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
81
82
83
84
85
86
<template>
    <div class="integralProdBox">
       <div class="topContent">
           <el-carousel :interval="5000" arrow="always">
              <el-carousel-item v-for="item in form.imgIdUrls" :key="item">
                  <video v-show='getFileType(item.imgUrl) === "video"' controls :src="item.imgUrl"/>
                  <img v-show='getFileType(item.imgUrl) !== "video"' :src="item.imgUrl"/>
              </el-carousel-item>
          </el-carousel>
          <div class="spuName">{{form.spuName}}</div>
          <div class="couponTag">可售数量:{{form.surplus === -1 ?'不限制':form.surplus+' (单瓶)'}}</div>
       </div>
       <div class="infoContent">
          <div class="infoTop">介绍 </div>
          <div class="introduce" v-html="form.productDesc"></div>
       </div>
    </div>
</template>
<script>
import { getFileType } from '@/utils/getFileType'
export default {
  props: ['form'],
  methods: {
    // 获取文件类型
    getFileType (file) {
      return getFileType(file)
    }
  }
}
</script>
<style lang="scss">
.integralProdBox{
     font-size: 16px;
     width: 100%;
    .topContent{
        img, video{
         width: 100%;
         height: 100%;
        }
        div{
            margin-bottom: 8px;
        }
        .couponTag{
          color: #f56c6c;
        }
    }
    .infoContent{
      margin-top: 20px;
      margin-bottom: 15px;
      max-width: 455px;
      .infoTop{
        width: 100%;
        height: 20px;
        line-height: 20px;
        text-align: center;
        font-size: 14px;
        font-weight: 400;
        color: #333;
        position: relative;
        margin-bottom: 12px;
      }
     .infoTop::after{
          right: 8%;
      }
     .infoTop::before{
          left: 8%;
       }
      .infoTop::after,  .infoTop::before{
        content: '';
        width: 25%;
        height: 1px;
        position: absolute;
        top: 50%;
        background-color: #bdbdbd;
      }
      }
      .introduce{
        width: 95%;
        padding-left: 13px;
        img, video{width: 100%;height: auto}
        div,p{
          width: 100% !important;
        }
      }
    }
</style>