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