<template>
|
<div class="proActivityPre">
|
<div class="topContent">
|
<el-carousel :interval="5000" arrow="always">
|
<el-carousel-item v-for="item in form.fileList" :key="item.id">
|
<img :src="item.url" />
|
</el-carousel-item>
|
</el-carousel>
|
</div>
|
<div class="topContent" v-show="form.promotionRuleFile.length">
|
<el-carousel :interval="5000" arrow="always">
|
<el-carousel-item v-for="item in form.promotionRuleFile" :key="item.id">
|
<img :src="item.url" />
|
</el-carousel-item>
|
</el-carousel>
|
</div>
|
<div v-show="form.promotionRuledesc" class="promotionRuledesc">活动规则<br/>{{form.promotionRuledesc}}</div>
|
<div class="activityProd">
|
<div v-for="item in form.productList" :key="item.skuId" class="prodBox">
|
<img :src="item.imageUrl" />
|
<div class="prodName" :title="item.spuName">{{ item.spuName }}</div>
|
<div class="price">
|
¥
|
{{
|
item.saleMaxPrice === item.saleMinPrice
|
? item.saleMaxPrice.toFixed(2)
|
: item.saleMinPrice.toFixed(2) +
|
' ~ ' +
|
item.saleMaxPrice.toFixed(2)
|
}}
|
</div>
|
</div>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import { getFileType } from '@/utils/getFileType'
|
export default {
|
props: ['form'],
|
methods: {
|
// 获取文件类型
|
getFileType (file) {
|
return getFileType(file)
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss">
|
.proActivityPre {
|
font-size: 16px;
|
width: 100%;
|
.topContent {
|
img {
|
width: 100%;
|
height: 300px;
|
}
|
}
|
.promotionRuledesc{
|
margin-top: 10px;
|
font-size: 14px;
|
}
|
.activityProd{
|
margin-top: 20px;
|
.prodBox{
|
width: 198px;
|
display: inline-block;
|
vertical-align: top;
|
margin-left: 10px;
|
margin-bottom: 10px;
|
.prodName{
|
white-space:nowrap;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
-o-text-overflow:ellipsis;
|
margin-bottom: 10px;
|
}
|
img{
|
width: 100%;
|
height: 100px;
|
}
|
}
|
}
|
}
|
</style>
|