Commit 25bb4841 authored by Xuguangxing's avatar Xuguangxing

fix

parent 65690df2
......@@ -105,12 +105,12 @@
</script>
</head>
<body>
<script src="https://cdn.bootcdn.net/ajax/libs/vConsole/3.9.0/vconsole.min.js"></script>
<!-- <script src="https://cdn.bootcdn.net/ajax/libs/vConsole/3.9.0/vconsole.min.js"></script>
<script>
// init vConsole
var vConsole = new VConsole();
console.log('Hello world');
</script>
</script> -->
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
......
......@@ -28,10 +28,10 @@
<cr-image width="25px" src="@/assets/images/new-user.png" />
</div>
</div>
<div v-if="avators.length < 10" class="placeholder" :style="widthStyle">
<div v-for="n in placeholderNum" :key="n" class="placeholder" :style="widthStyle">
<div class="content">?</div>
</div>
<div v-if="avators.length > 9" class="more" :style="widthStyle" @click="showMoreAvator">
<div v-if="groupHC >= 10" class="more" :style="widthStyle" @click="showMoreAvator">
<div class="content" />
</div>
<cr-dialog v-model="showDialogSlot" confirm-button-text="知道了" confirm-button-color="#ec1500">
......@@ -81,20 +81,32 @@ export default {
return {
isLeader: true, // 标识是不是团长
showDialogSlot: false, // 查看参团人员
avators: [] // 头像列表
avators: [], // 头像列表
groupHC: 0 // 团型(5人团则为5)
};
},
computed: {
placeholderNum() {
// 问号头像展位数量
if (this.groupHC >= 10) {
// 用9去减是因为有个展示更多的按钮
return 9 - this.avators.length < 0 ? 0 : 9 - this.avators.length;
} else {
return this.groupHC - this.avators.length < 0 ? 0 : this.groupHC - this.avators.length;
}
},
widthStyle() {
// 用于单个头像不能占一排
return this.avators.length == 6 ? { width: '25%' } : { width: '20%' };
}
},
created() {
this.avators = this.groupInfo.groupBuyAllUserInfoList || [];
this.groupHC = this.groupInfo.groupBuyLimitUserCount || 0;
this.avators = this.groupInfo.groupBuyValidUserInfoList || [];
},
methods: {
showMoreAvator() {
if (this.avators.length == 0) return;
this.showDialogSlot = true;
}
}
......
......@@ -2,7 +2,7 @@
<cr-count-down :time="time">
<template #default="timeData">
<template v-if="timeData.d != 0">
<span :class="blockNoBg ? 'block-no-bg' : 'block'">{{ timeData.d }}</span>
<span :class="blockNoBg ? 'block-no-bg' : 'block'">{{ fillZero(timeData.d) }}</span>
<span class="colon">:</span>
</template>
<span :class="blockNoBg ? 'block-no-bg' : 'block'">{{ fillZero(timeData.h) }}</span>
......
......@@ -60,7 +60,10 @@
<!-- {{ detailInfo.groupBuyInfo }} -->
<template v-if="inProgress == 1">
<avatorGroup :group-info="detailInfo.groupBuyInfo || {}" />
<group-desc-info :group-info="detailInfo.groupBuyInfo || {}" :timestemp="timestemp" />
<group-desc-info
:group-info="detailInfo.groupBuyInfo || {}"
:timestemp="groupTimestemp"
/>
<successInfo :group-info="detailInfo.groupBuyInfo || {}" />
<cr-divider
hairline
......@@ -209,7 +212,8 @@ export default {
},
data() {
return {
timestemp: '',
timestemp: '', // 大活动结束时间
groupTimestemp: '', // 小团结束时间
showInfo: false,
inProgress: false, // 活动是否已经开始
countDownText: '',
......@@ -281,6 +285,9 @@ export default {
const currentTime = new Date(data.currentTime).getTime();
const activityStartTime = new Date(data.startTime).getTime();
const activityEndTime = new Date(data.endTime).getTime();
this.groupTimestemp = data.currentGroupEndTime
? new Date(data.currentGroupEndTime).getTime()
: -1;
if (currentTime <= activityStartTime) {
// 当前时间小于活动开始时间
this.timestemp = activityStartTime;
......
......@@ -45,7 +45,7 @@
.goods {
&-red-bg{ // 用于小图详情页
position: fixed;
position: absolute;
left: -5%;
top: 0;
z-index: -1;
......@@ -103,7 +103,7 @@
height: 18px;
line-height: 18px;
text-align: center;
background-color: linear-gradient(269deg, #ff5d00 12%, #ff1900 86%);
background: linear-gradient(269deg, #ff5d00 12%, #ff1900 86%);
border-radius: 6px 0 6px 0;
}
&-img{
......@@ -111,6 +111,7 @@
height: 108px;
margin-right: @padding-x;
flex-shrink: 0;
position: relative;
}
&-desc{
flex: 1;
......
......@@ -45,7 +45,10 @@
</div>
<template v-if="inProgress == 1">
<avatorGroup :group-info="detailInfo.groupBuyInfo || {}" />
<group-desc-info :group-info="detailInfo.groupBuyInfo || {}" :timestemp="timestemp" />
<group-desc-info
:group-info="detailInfo.groupBuyInfo || {}"
:timestemp="groupTimestemp"
/>
<successInfo :group-info="detailInfo.groupBuyInfo || {}" />
<cr-divider
hairline
......@@ -93,8 +96,8 @@ export default {
},
data() {
return {
endTime: 1631203200000,
timestemp: '',
timestemp: '', // 大活动结束时间
groupTimestemp: '', // 小团结束时间
showInfo: false,
inProgress: false, // 活动是否已经开始
countDownText: '',
......@@ -166,6 +169,9 @@ export default {
const currentTime = new Date(data.currentTime).getTime();
const activityStartTime = new Date(data.startTime).getTime();
const activityEndTime = new Date(data.endTime).getTime();
this.groupTimestemp = data.currentGroupEndTime
? new Date(data.currentGroupEndTime).getTime()
: -1;
if (currentTime <= activityStartTime) {
// 当前时间小于活动开始时间
this.timestemp = activityStartTime;
......
......@@ -15,7 +15,8 @@ export default {
title: 'aaaa',
desc: 'bbbb',
link: `https://www.baidu.com`, // 页面地址
imgUrl: 'http://kdspstatic.q-gp.com/FnPUaThQoK23qZjhXTG9C8XopI4y' // 图片地址
imgUrl: 'http://kdspstatic.q-gp.com/FnPUaThQoK23qZjhXTG9C8XopI4y', // 图片地址
posterUrl: 'http://kdspstatic.q-gp.com/FnPUaThQoK23qZjhXTG9C8XopI4y' // 海报地址
}
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment