|
|
|
@ -60,9 +60,9 @@
|
|
|
|
|
class="main__details-skill flex flex-right flex-middle"
|
|
|
|
|
>
|
|
|
|
|
距结束仅剩
|
|
|
|
|
<span>{{ getSurplus.lefth }}</span>
|
|
|
|
|
<span>{{ getSurplus.leftm }}</span>
|
|
|
|
|
<span>{{ getSurplus.lefts }}</span>
|
|
|
|
|
<span>{{ surplus.lefth }}</span>
|
|
|
|
|
<span>{{ surplus.leftm }}</span>
|
|
|
|
|
<span>{{ surplus.lefts }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="main__details-msg">
|
|
|
|
|
<div class="main__details-msg--price flex flex-middle">
|
|
|
|
@ -83,9 +83,9 @@
|
|
|
|
|
>
|
|
|
|
|
<span class="skill-txt">即将开始秒杀</span>
|
|
|
|
|
<div class="skill-2" v-if="isToday()">
|
|
|
|
|
<span>{{ getSurplus.lefth }}</span>
|
|
|
|
|
<span>{{ getSurplus.leftm }}</span>
|
|
|
|
|
<span>{{ getSurplus.lefts }}</span>
|
|
|
|
|
<span>{{ surplus.lefth }}</span>
|
|
|
|
|
<span>{{ surplus.leftm }}</span>
|
|
|
|
|
<span>{{ surplus.lefts }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<span class="skill-1" v-else>{{ getBeginTime() }}</span>
|
|
|
|
|
</div>
|
|
|
|
@ -195,6 +195,9 @@ export default {
|
|
|
|
|
productActivityVO: {},
|
|
|
|
|
},
|
|
|
|
|
surplus: {},
|
|
|
|
|
timer: null,
|
|
|
|
|
startTime: "",
|
|
|
|
|
endTime: "",
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
async created() {
|
|
|
|
@ -211,21 +214,21 @@ export default {
|
|
|
|
|
!vm.detailData.productActivityVO.isStartActivity &&
|
|
|
|
|
vm.isToday()
|
|
|
|
|
) {
|
|
|
|
|
let startTime = new Date(
|
|
|
|
|
vm.startTime = new Date(
|
|
|
|
|
vm.detailData.productActivityVO.currentTime
|
|
|
|
|
).getTime();
|
|
|
|
|
let endTime = new Date(
|
|
|
|
|
vm.endTime = new Date(
|
|
|
|
|
vm.detailData.productActivityVO.activityStartTime
|
|
|
|
|
).getTime();
|
|
|
|
|
vm.setSurplus(startTime, endTime);
|
|
|
|
|
vm.setSurplus();
|
|
|
|
|
} else if (vm.detailData.productActivityVO.isStartActivity) {
|
|
|
|
|
let startTime = new Date(
|
|
|
|
|
vm.startTime = new Date(
|
|
|
|
|
vm.detailData.productActivityVO.currentTime
|
|
|
|
|
).getTime();
|
|
|
|
|
let endTime = new Date(
|
|
|
|
|
vm.endTime = new Date(
|
|
|
|
|
vm.detailData.productActivityVO.activityEndTime
|
|
|
|
|
).getTime();
|
|
|
|
|
vm.setSurplus(startTime, endTime);
|
|
|
|
|
vm.setSurplus();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
@ -276,15 +279,15 @@ export default {
|
|
|
|
|
leftObj["lefts"] = Math.floor((leftObj["lefttime"] / 1000) % 60); //计算秒数
|
|
|
|
|
return leftObj;
|
|
|
|
|
},
|
|
|
|
|
setSurplus(startTime, endTime) {
|
|
|
|
|
setSurplus() {
|
|
|
|
|
let vm = this;
|
|
|
|
|
vm.surplus = getSurplus(startTime, endTime);
|
|
|
|
|
vm.surplus = vm.getSurplus(vm.startTime, vm.endTime);
|
|
|
|
|
if (vm.timer) {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
vm.timer = setInterval(() => {
|
|
|
|
|
vm.startTime += 1000;
|
|
|
|
|
vm.surplus = getSurplus(vm.startTime, vm.endTime);
|
|
|
|
|
vm.surplus = vm.getSurplus(vm.startTime, vm.endTime);
|
|
|
|
|
if (vm.surplus.lefttime <= 0) {
|
|
|
|
|
clearInterval(vm.timer);
|
|
|
|
|
location.reload();
|
|
|
|
@ -542,9 +545,9 @@ export default {
|
|
|
|
|
|
|
|
|
|
&-msg {
|
|
|
|
|
width: 714px;
|
|
|
|
|
height: 127px;
|
|
|
|
|
min-height: 127px;
|
|
|
|
|
background: #f8f8f8;
|
|
|
|
|
padding: 30px 20px 0;
|
|
|
|
|
padding: 30px 20px;
|
|
|
|
|
.msg-txt {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-family: Microsoft YaHei-Regular, Microsoft YaHei;
|
|
|
|
|