Commit f58e66b9 authored by Xuguangxing's avatar Xuguangxing

处理海报内容

parent 0626aa47
......@@ -3,14 +3,35 @@
<div class="groupInfo">
<!-- 组团头像信息 -->
<div class="avatorGroup">
<div
v-for="(item, index) in avatorList"
:key="index"
class="item"
:class="{ leader: index == 0, normal: index != 0 }"
>
<img class="avator" :src="item" alt="" />
<template v-if="index == 0">
<template v-if="avatorList.length !== 0">
<div
v-for="(item, index) in avatorList"
:key="index"
class="item"
:class="{ leader: index == 0, normal: index != 0 }"
>
<img class="avator" :src="item" alt="" />
<template v-if="index == 0">
<div class="leaderName">团长</div>
<div class="leaderBorder">
<img
src="https://img.lkbang.net/activity/share/default/leaderBorder.png?i=1"
alt=""
/>
</div>
<div class="crown">
<img src="https://img.lkbang.net/activity/share/default/crown.png?i=1" alt="" />
</div>
</template>
</div>
<div
v-for="num in maxCount - avatorList.length"
:key="`placeholder${num}`"
class="item placeholder"
/>
</template>
<template v-else>
<div class="item leader">
<div class="leaderName">团长</div>
<div class="leaderBorder">
<img
......@@ -21,19 +42,20 @@
<div class="crown">
<img src="https://img.lkbang.net/activity/share/default/crown.png?i=1" alt="" />
</div>
</template>
</div>
<div
v-for="num in maxCount - avatorList.length"
:key="`placeholder${num}`"
class="item placeholder"
/>
</div>
<div
v-for="num in maxCount - 1 - avatorList.length"
:key="`placeholder${num}`"
class="item placeholder"
/>
</template>
<div v-if="openGroupCnt >= 7" class="item more" />
</div>
<div class="groupProcess">
<div class="desc">
还差 <span>{{ sharePicData.needGuys }}人</span> 成团,<template v-if="endTime != ''"
>参团截止时间 {{ endTime }}</template
><template v-if="avatorList.length == 0">活动</template
><template v-else>参团</template>截止时间 {{ endTime }}</template
>
</div>
</div>
......@@ -98,7 +120,10 @@ export default {
},
async createAndUploadPic(sharePicData) {
this.sharePicData = sharePicData;
this.endTime = sharePicData.endTime ? sharePicData.endTime.split(' ')[0] : '';
let endTime = sharePicData.endTime ? sharePicData.endTime.split(' ')[0] : '';
if (endTime) {
this.endTime = `${new Date(endTime).getMonth() + 1}${new Date(endTime).getDate()}日`;
}
this.handleAvator(sharePicData);
const _this = this;
const [qrcodeUrl] = await groupBuyApi.getQrcodeUrl(sharePicData);
......
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