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