Commit 25bb4841 authored by Xuguangxing's avatar Xuguangxing

fix

parent 65690df2
...@@ -105,12 +105,12 @@ ...@@ -105,12 +105,12 @@
</script> </script>
</head> </head>
<body> <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> <script>
// init vConsole // init vConsole
var vConsole = new VConsole(); var vConsole = new VConsole();
console.log('Hello world'); console.log('Hello world');
</script> </script> -->
<noscript> <noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript> </noscript>
......
...@@ -28,10 +28,10 @@ ...@@ -28,10 +28,10 @@
<cr-image width="25px" src="@/assets/images/new-user.png" /> <cr-image width="25px" src="@/assets/images/new-user.png" />
</div> </div>
</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 class="content">?</div>
</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 class="content" />
</div> </div>
<cr-dialog v-model="showDialogSlot" confirm-button-text="知道了" confirm-button-color="#ec1500"> <cr-dialog v-model="showDialogSlot" confirm-button-text="知道了" confirm-button-color="#ec1500">
...@@ -81,20 +81,32 @@ export default { ...@@ -81,20 +81,32 @@ export default {
return { return {
isLeader: true, // 标识是不是团长 isLeader: true, // 标识是不是团长
showDialogSlot: false, // 查看参团人员 showDialogSlot: false, // 查看参团人员
avators: [] // 头像列表 avators: [], // 头像列表
groupHC: 0 // 团型(5人团则为5)
}; };
}, },
computed: { 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() { widthStyle() {
// 用于单个头像不能占一排 // 用于单个头像不能占一排
return this.avators.length == 6 ? { width: '25%' } : { width: '20%' }; return this.avators.length == 6 ? { width: '25%' } : { width: '20%' };
} }
}, },
created() { created() {
this.avators = this.groupInfo.groupBuyAllUserInfoList || []; this.groupHC = this.groupInfo.groupBuyLimitUserCount || 0;
this.avators = this.groupInfo.groupBuyValidUserInfoList || [];
}, },
methods: { methods: {
showMoreAvator() { showMoreAvator() {
if (this.avators.length == 0) return;
this.showDialogSlot = true; this.showDialogSlot = true;
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<cr-count-down :time="time"> <cr-count-down :time="time">
<template #default="timeData"> <template #default="timeData">
<template v-if="timeData.d != 0"> <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> <span class="colon">:</span>
</template> </template>
<span :class="blockNoBg ? 'block-no-bg' : 'block'">{{ fillZero(timeData.h) }}</span> <span :class="blockNoBg ? 'block-no-bg' : 'block'">{{ fillZero(timeData.h) }}</span>
......
...@@ -60,7 +60,10 @@ ...@@ -60,7 +60,10 @@
<!-- {{ detailInfo.groupBuyInfo }} --> <!-- {{ detailInfo.groupBuyInfo }} -->
<template v-if="inProgress == 1"> <template v-if="inProgress == 1">
<avatorGroup :group-info="detailInfo.groupBuyInfo || {}" /> <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 || {}" /> <successInfo :group-info="detailInfo.groupBuyInfo || {}" />
<cr-divider <cr-divider
hairline hairline
...@@ -209,7 +212,8 @@ export default { ...@@ -209,7 +212,8 @@ export default {
}, },
data() { data() {
return { return {
timestemp: '', timestemp: '', // 大活动结束时间
groupTimestemp: '', // 小团结束时间
showInfo: false, showInfo: false,
inProgress: false, // 活动是否已经开始 inProgress: false, // 活动是否已经开始
countDownText: '', countDownText: '',
...@@ -281,6 +285,9 @@ export default { ...@@ -281,6 +285,9 @@ export default {
const currentTime = new Date(data.currentTime).getTime(); const currentTime = new Date(data.currentTime).getTime();
const activityStartTime = new Date(data.startTime).getTime(); const activityStartTime = new Date(data.startTime).getTime();
const activityEndTime = new Date(data.endTime).getTime(); const activityEndTime = new Date(data.endTime).getTime();
this.groupTimestemp = data.currentGroupEndTime
? new Date(data.currentGroupEndTime).getTime()
: -1;
if (currentTime <= activityStartTime) { if (currentTime <= activityStartTime) {
// 当前时间小于活动开始时间 // 当前时间小于活动开始时间
this.timestemp = activityStartTime; this.timestemp = activityStartTime;
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
.goods { .goods {
&-red-bg{ // 用于小图详情页 &-red-bg{ // 用于小图详情页
position: fixed; position: absolute;
left: -5%; left: -5%;
top: 0; top: 0;
z-index: -1; z-index: -1;
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
height: 18px; height: 18px;
line-height: 18px; line-height: 18px;
text-align: center; 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; border-radius: 6px 0 6px 0;
} }
&-img{ &-img{
...@@ -111,6 +111,7 @@ ...@@ -111,6 +111,7 @@
height: 108px; height: 108px;
margin-right: @padding-x; margin-right: @padding-x;
flex-shrink: 0; flex-shrink: 0;
position: relative;
} }
&-desc{ &-desc{
flex: 1; flex: 1;
......
...@@ -45,7 +45,10 @@ ...@@ -45,7 +45,10 @@
</div> </div>
<template v-if="inProgress == 1"> <template v-if="inProgress == 1">
<avatorGroup :group-info="detailInfo.groupBuyInfo || {}" /> <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 || {}" /> <successInfo :group-info="detailInfo.groupBuyInfo || {}" />
<cr-divider <cr-divider
hairline hairline
...@@ -93,8 +96,8 @@ export default { ...@@ -93,8 +96,8 @@ export default {
}, },
data() { data() {
return { return {
endTime: 1631203200000, timestemp: '', // 大活动结束时间
timestemp: '', groupTimestemp: '', // 小团结束时间
showInfo: false, showInfo: false,
inProgress: false, // 活动是否已经开始 inProgress: false, // 活动是否已经开始
countDownText: '', countDownText: '',
...@@ -166,6 +169,9 @@ export default { ...@@ -166,6 +169,9 @@ export default {
const currentTime = new Date(data.currentTime).getTime(); const currentTime = new Date(data.currentTime).getTime();
const activityStartTime = new Date(data.startTime).getTime(); const activityStartTime = new Date(data.startTime).getTime();
const activityEndTime = new Date(data.endTime).getTime(); const activityEndTime = new Date(data.endTime).getTime();
this.groupTimestemp = data.currentGroupEndTime
? new Date(data.currentGroupEndTime).getTime()
: -1;
if (currentTime <= activityStartTime) { if (currentTime <= activityStartTime) {
// 当前时间小于活动开始时间 // 当前时间小于活动开始时间
this.timestemp = activityStartTime; this.timestemp = activityStartTime;
......
...@@ -15,7 +15,8 @@ export default { ...@@ -15,7 +15,8 @@ export default {
title: 'aaaa', title: 'aaaa',
desc: 'bbbb', desc: 'bbbb',
link: `https://www.baidu.com`, // 页面地址 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