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
87
88
<template>
    <div class="gift_prd_pre">
      <div class="topContent">
        <el-carousel :interval="5000" arrow="always">
          <el-carousel-item v-for="item in form.prodImgs" :key="item">
              <video v-show='getFileType(item.url) === "video"' controls :src="item.url"/>
              <img v-show='getFileType(item.url) !== "video"' :src="item.url"/>
          </el-carousel-item>
        </el-carousel>
        <div class="spuName">{{form.prodSpu ? form.prodSpu.spuName : null}}</div>
        <div class="price">暂无报价</div>
      </div>
      <div class="infoContent">
        <div class="infoTop">商品详情</div>
        <div class="introduce" v-html="form.articleContent"></div>
      </div>
    </div>
</template>
 
<script>
import { getFileType } from '@/utils/getFileType'
export default {
  props: ['form'],
  methods: {
    // 获取文件类型
    getFileType (file) {
      return getFileType(file)
    }
  }
}
</script>
 
<style lang="scss">
.gift_prd_pre {
  font-size: 16px;
  width: 100%;
  .topContent{
    img, video{
      width: 100%;
      height: 100%;
    }
    div{
        margin-bottom: 8px;
    }
    .price{
     color:#fe4646 ;
    }
  }
  .infoContent{
    margin-top: 40px;
    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>