|
|
|
@ -7,66 +7,75 @@
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<div class="home-sckill flex" @click="onJumpSeckill">
|
|
|
|
|
<div class="home-sckill-bar" :style="{ backgroundImage: `url(${bkgUrl})` }">
|
|
|
|
|
<strong class="home-sckill-title">限时秒杀</strong>
|
|
|
|
|
<main class="main">
|
|
|
|
|
<div class="home-sckill-bar flex flex-middle">
|
|
|
|
|
<img
|
|
|
|
|
class="home-sckill-title"
|
|
|
|
|
src="~/assets/img/sckill/title.png"
|
|
|
|
|
alt=""
|
|
|
|
|
/>
|
|
|
|
|
<div class="home-sckill-wrap">
|
|
|
|
|
<div class="home-sckill-wrap__tip">
|
|
|
|
|
<strong>{{ data.activityTimeVO.timeName }}</strong>
|
|
|
|
|
<span>{{ seckillText }}</span>
|
|
|
|
|
{{ data.activityTimeVO.timeName }} {{ seckillText }}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="home-sckill-wrap__countdown flex flex-middle flex-center">
|
|
|
|
|
<div class="sckill-wrap-countdown__time">{{ countdown.hour }}</div>
|
|
|
|
|
<span class="sckill-wrap-countdown--mark">:</span>
|
|
|
|
|
<div class="sckill-wrap-countdown__time">{{ countdown.minute }}</div>
|
|
|
|
|
<span class="sckill-wrap-countdown--mark">:</span>
|
|
|
|
|
<div class="sckill-wrap-countdown__time">{{ countdown.second }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="home-sckill-wrap__countdown flex flex-middle flex-center">
|
|
|
|
|
<div class="sckill-wrap-countdown__time">{{ countdown.hour }}</div>
|
|
|
|
|
<span class="sckill-wrap-countdown--mark">:</span>
|
|
|
|
|
<div class="sckill-wrap-countdown__time">
|
|
|
|
|
{{ countdown.minute }}
|
|
|
|
|
</div>
|
|
|
|
|
<span class="sckill-wrap-countdown--mark">:</span>
|
|
|
|
|
<div class="sckill-wrap-countdown__time">
|
|
|
|
|
{{ countdown.second }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="home-sckill-carousel">
|
|
|
|
|
<el-carousel
|
|
|
|
|
height="260px"
|
|
|
|
|
arrow="always"
|
|
|
|
|
:autoplay="false"
|
|
|
|
|
:loop="false"
|
|
|
|
|
>
|
|
|
|
|
<el-carousel-item v-for="(item, index) in goodsList" :key="index">
|
|
|
|
|
<div class="carousel-goods flex">
|
|
|
|
|
<div
|
|
|
|
|
v-for="(itemChild, indexChild) in item"
|
|
|
|
|
:key="itemChild.productId"
|
|
|
|
|
class="carousel-goods-box flex flex-middle"
|
|
|
|
|
>
|
|
|
|
|
<div class="home-sckill flex" @click="onJumpSeckill">
|
|
|
|
|
<div class="home-sckill-carousel">
|
|
|
|
|
<el-carousel
|
|
|
|
|
height="260px"
|
|
|
|
|
arrow="always"
|
|
|
|
|
:autoplay="false"
|
|
|
|
|
:loop="false"
|
|
|
|
|
>
|
|
|
|
|
<el-carousel-item v-for="(item, index) in goodsList" :key="index">
|
|
|
|
|
<div class="carousel-goods flex">
|
|
|
|
|
<div
|
|
|
|
|
v-if="indexChild !== 0"
|
|
|
|
|
class="carousel-goods-box--line"
|
|
|
|
|
></div>
|
|
|
|
|
<div class="carousel-goods-box__item">
|
|
|
|
|
<img
|
|
|
|
|
class="goods-box-item__cover"
|
|
|
|
|
:src="itemChild.productMainPicture"
|
|
|
|
|
/>
|
|
|
|
|
<div class="goods-box-item__wrap">
|
|
|
|
|
<p class="box-item-wrap__title">
|
|
|
|
|
{{ itemChild.productName }}
|
|
|
|
|
</p>
|
|
|
|
|
<strong class="box-item-wrap__price"
|
|
|
|
|
>¥{{ itemChild.activityPrice }}</strong
|
|
|
|
|
>
|
|
|
|
|
v-for="(itemChild, indexChild) in item"
|
|
|
|
|
:key="itemChild.productId"
|
|
|
|
|
class="carousel-goods-box flex flex-middle"
|
|
|
|
|
>
|
|
|
|
|
<div
|
|
|
|
|
v-if="indexChild !== 0"
|
|
|
|
|
class="carousel-goods-box--line"
|
|
|
|
|
></div>
|
|
|
|
|
<div class="carousel-goods-box__item">
|
|
|
|
|
<img
|
|
|
|
|
class="goods-box-item__cover"
|
|
|
|
|
:src="itemChild.productMainPicture"
|
|
|
|
|
/>
|
|
|
|
|
<div class="goods-box-item__wrap">
|
|
|
|
|
<p class="box-item-wrap__title">
|
|
|
|
|
{{ itemChild.productName }}
|
|
|
|
|
</p>
|
|
|
|
|
<strong class="box-item-wrap__price"
|
|
|
|
|
>¥{{ itemChild.activityPrice }}</strong
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</el-carousel-item>
|
|
|
|
|
</el-carousel>
|
|
|
|
|
</el-carousel-item>
|
|
|
|
|
</el-carousel>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</main>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import _ from "lodash";
|
|
|
|
|
|
|
|
|
|
const CAROUSEL_COUNT = 5; // 走马灯每页展示商品数
|
|
|
|
|
const CAROUSEL_COUNT = 6; // 走马灯每页展示商品数
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "HomeSeckill",
|
|
|
|
@ -179,57 +188,48 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.home-sckill {
|
|
|
|
|
height: 260px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
.home-sckill-bar {
|
|
|
|
|
width: 190px;
|
|
|
|
|
height: 100%;
|
|
|
|
|
padding: 45px 0 28px 0;
|
|
|
|
|
text-align: center;
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
border-radius: 4px 0 0 4px;
|
|
|
|
|
.home-sckill-title {
|
|
|
|
|
display: block;
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
margin-bottom: 90px;
|
|
|
|
|
.home-sckill-bar {
|
|
|
|
|
width: 100%;
|
|
|
|
|
padding-bottom: 28px;
|
|
|
|
|
.home-sckill-title {
|
|
|
|
|
width: 110px;
|
|
|
|
|
height: 26px;
|
|
|
|
|
margin-right: 20px;
|
|
|
|
|
}
|
|
|
|
|
.home-sckill-wrap {
|
|
|
|
|
.home-sckill-wrap__tip {
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
font-family: Microsoft YaHei-Regular, Microsoft YaHei;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
color: #999999;
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
}
|
|
|
|
|
.home-sckill-wrap {
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
.home-sckill-wrap__tip {
|
|
|
|
|
font-size: 0;
|
|
|
|
|
strong {
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
margin-right: 4px;
|
|
|
|
|
}
|
|
|
|
|
span {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.home-sckill-wrap__countdown {
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
.sckill-wrap-countdown__time {
|
|
|
|
|
width: 30px;
|
|
|
|
|
height: 30px;
|
|
|
|
|
line-height: 30px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
background: #2f3430;
|
|
|
|
|
}
|
|
|
|
|
.sckill-wrap-countdown--mark {
|
|
|
|
|
display: block;
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
margin: 0 8px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.home-sckill-wrap__countdown {
|
|
|
|
|
.sckill-wrap-countdown__time {
|
|
|
|
|
width: 30px;
|
|
|
|
|
height: 30px;
|
|
|
|
|
line-height: 30px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
background: #2f3430;
|
|
|
|
|
}
|
|
|
|
|
.sckill-wrap-countdown--mark {
|
|
|
|
|
display: block;
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
margin: 0 8px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.home-sckill {
|
|
|
|
|
height: 260px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
.home-sckill-carousel {
|
|
|
|
|
/deep/.el-carousel {
|
|
|
|
|
width: 1010px;
|
|
|
|
|
width: 1200px;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
.el-carousel__container {
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|