Commit 11b38334 authored by beisir's avatar beisir

Merge branch 'feat/group-buy' of git.quantgroup.cn:ui/group-buy-ui into feat/group-buy

parents 3ce2f79a b140f529
......@@ -3,31 +3,32 @@
<div class="groupInfo">
<!-- 组团头像信息 -->
<div class="avatorGroup">
<div class="item leader">
<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
class="avator"
src="https://img.lkbang.net/avator/0070abce3cf2fd7f0f436f5e49d3e6f8d684f4571ada0-dMUyR7_fw658.jpeg"
src="https://img.lkbang.net/activity/share/default/leaderBorder.png?i=1"
alt=""
/>
<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 class="item normal">
<img
src="https://img.lkbang.net/avator/0070abce3cf2fd7f0f436f5e49d3e6f8d684f4571ada0-dMUyR7_fw658.jpeg"
alt=""
<div
v-for="num in maxCount - avatorList.length"
:key="`placeholder${num}`"
class="item placeholder"
/>
</div>
<div class="item placeholder" />
<div class="item more" />
<div class="item more" />
<div class="item more" />
<div class="item more" />
<div v-if="openGroupCnt >= 7" class="item more" />
</div>
<div class="groupProcess">
<div class="desc">
......@@ -85,11 +86,28 @@ export default {
},
data() {
return {
qrcodeUrl: ''
qrcodeUrl: '',
avatorList: [],
openGroupCnt: 7,
maxCount: 0
};
},
watch: {
sharePicData() {
this.handleAvator();
}
},
methods: {
handleAvator() {
const openGroupCnt = this.sharePicData.openGroupCnt || 7;
let peoplePhotoList = this.sharePicData.peoplePhotoList || [];
this.maxCount = openGroupCnt >= 6 ? 6 : openGroupCnt;
this.openGroupCnt = openGroupCnt;
this.avatorList = peoplePhotoList.slice(0, openGroupCnt);
},
async createAndUploadPic() {
console.log(JSON.stringify(this.sharePicData));
this.handleAvator();
const _this = this;
const [qrcodeUrl] = await groupBuyApi.getQrcodeUrl(this.sharePicData);
this.qrcodeUrl = qrcodeUrl;
......@@ -232,7 +250,6 @@ body {
border-radius: 50%;
}
.groupInfo .avatorGroup .more {
border: 2px dashed #ff9393;
display: flex;
align-items: center;
align-content: center;
......@@ -241,9 +258,11 @@ body {
font-size: 34px;
}
.groupInfo .avatorGroup .more::after {
content: '?';
content: '...';
margin-top: -15px;
}
.groupInfo .avatorGroup .placeholder {
border: 2px dashed #ff9393;
display: flex;
align-items: center;
align-content: center;
......@@ -252,8 +271,7 @@ body {
font-size: 34px;
}
.groupInfo .avatorGroup .placeholder::after {
content: '...';
margin-top: -15px;
content: '?';
}
.groupInfo .groupProcess {
width: 750px;
......
......@@ -436,7 +436,7 @@ export default {
},
async getAddr() {
if (!this.hasLogin) {
this.$router.push({ name: 'login' });
this.checkLogin();
return;
}
const [addressInfo] = await goods.addrList();
......@@ -449,7 +449,7 @@ export default {
},
addAddress() {
if (!this.hasLogin) {
this.$router.push({ name: 'login' });
this.checkLogin();
return;
}
this.show = false;
......@@ -457,7 +457,7 @@ export default {
},
toOrder() {
if (!this.hasLogin) {
this.$router.push({ name: 'login' });
this.checkLogin();
return;
}
if (this.detailInfo.stock === 0) {
......@@ -574,7 +574,7 @@ export default {
},
areaPopup() {
if (!this.hasLogin) {
this.$router.push({ name: 'login' });
this.checkLogin();
return;
}
this.getAddr();
......
......@@ -165,13 +165,6 @@ export default {
changeButtonVisible(res) {
this.showButtonNav = res;
},
// ka渠道逻辑
goVccOrDetail() {
if (!this.hasLogin) {
this.$router.push({ name: 'login' });
return;
}
},
async init(detailParam) {
const [res] = await goods.detailInfo(detailParam);
if (res.groupBuyInfo.groupId) {
......
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