swiper问题
parent
94719d58cd
commit
d822c3c809
|
@ -30,10 +30,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</template>
|
</template>
|
||||||
<!-- 限时秒杀 待完善 -->
|
<!-- 限时秒杀 待完善 -->
|
||||||
<!-- <template v-if="element.type == 'seckill' && element.options.list.length">
|
<template v-if="element.type == 'seckill' && element.options.list.length">
|
||||||
<seckill :data="element" class="mb_20"></seckill>
|
|
||||||
</template> -->
|
|
||||||
<template v-if="element.type == 'discountAdvert'">
|
|
||||||
<seckill :data="element" class="mb_20"></seckill>
|
<seckill :data="element" class="mb_20"></seckill>
|
||||||
</template>
|
</template>
|
||||||
<!-- 折扣广告 -->
|
<!-- 折扣广告 -->
|
||||||
|
|
|
@ -30,10 +30,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</template>
|
</template>
|
||||||
<!-- 限时秒杀 待完善 -->
|
<!-- 限时秒杀 待完善 -->
|
||||||
<!-- <template v-if="element.type == 'seckill' && element.options.list.length">
|
<template v-if="element.type == 'seckill' && element.options.list.length">
|
||||||
<seckill :data="element" class="mb_20"></seckill>
|
|
||||||
</template> -->
|
|
||||||
<template v-if="element.type == 'discountAdvert'">
|
|
||||||
<seckill :data="element" class="mb_20"></seckill>
|
<seckill :data="element" class="mb_20"></seckill>
|
||||||
</template>
|
</template>
|
||||||
<!-- 折扣广告 -->
|
<!-- 折扣广告 -->
|
||||||
|
|
|
@ -142,21 +142,20 @@ export default {
|
||||||
}, 1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
getListByDay () { // 当天秒杀活动
|
getListByDay () { // 当天秒杀活动
|
||||||
const list = [
|
// const list = [
|
||||||
{
|
// {
|
||||||
timeLine: 18,
|
// timeLine: 18,
|
||||||
seckillGoodsList: [
|
// seckillGoodsList: [
|
||||||
{goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
||||||
{goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
||||||
{goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
||||||
{goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
||||||
{goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
||||||
{goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12}
|
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12}
|
||||||
]
|
// ]
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
this.list = list
|
this.list = this.data.options.list
|
||||||
// this.list = this.data.options.list
|
|
||||||
this.goodsList = this.list[0].seckillGoodsList
|
this.goodsList = this.list[0].seckillGoodsList
|
||||||
this.countDown(this.currIndex)
|
this.countDown(this.currIndex)
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,21 +142,20 @@ export default {
|
||||||
}, 1000)
|
}, 1000)
|
||||||
},
|
},
|
||||||
getListByDay () { // 当天秒杀活动
|
getListByDay () { // 当天秒杀活动
|
||||||
const list = [
|
// const list = [
|
||||||
{
|
// {
|
||||||
timeLine: 18,
|
// timeLine: 18,
|
||||||
seckillGoodsList: [
|
// seckillGoodsList: [
|
||||||
{goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
||||||
{goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
||||||
{goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
||||||
{goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
||||||
{goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12},
|
||||||
{goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12}
|
// {goodsImage: 'https://lilishop-oss.oss-cn-beijing.aliyuncs.com/a9593607de404546953055f279fd5d54.png', goodsName: 'dfsdgsdf', originalPrice: 39, price: 12}
|
||||||
]
|
// ]
|
||||||
}
|
// }
|
||||||
]
|
// ]
|
||||||
this.list = list
|
this.list = this.data.options.list
|
||||||
// this.list = this.data.options.list
|
|
||||||
this.goodsList = this.list[0].seckillGoodsList
|
this.goodsList = this.list[0].seckillGoodsList
|
||||||
this.countDown(this.currIndex)
|
this.countDown(this.currIndex)
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ export default {
|
||||||
this.modelForm = dataJson;
|
this.modelForm = dataJson;
|
||||||
// 秒杀活动不是装修的数据,需要调用接口判断是否有秒杀商品
|
// 秒杀活动不是装修的数据,需要调用接口判断是否有秒杀商品
|
||||||
for (let i = 0; i < dataJson.list.length; i++) {
|
for (let i = 0; i < dataJson.list.length; i++) {
|
||||||
if (dataJson.list[i].type === 'discountAdvert') {
|
if (dataJson.list[i].type === 'seckill') {
|
||||||
let seckill = this.getListByDay()
|
let seckill = this.getListByDay()
|
||||||
dataJson.list[i].options.list = seckill
|
dataJson.list[i].options.list = seckill
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue