Commit 044330be authored by 徐光星's avatar 徐光星

Merge branch 'feat/group-buy' into 'master'

fix

See merge request !6
parents bf3f2d86 bf06f283
...@@ -147,8 +147,10 @@ export default { ...@@ -147,8 +147,10 @@ export default {
placeholderArr() { placeholderArr() {
const arr = []; const arr = [];
const num = this.maxCount - this.avatorList.length; const num = this.maxCount - this.avatorList.length;
for (let i = 0; i < num; i++) { if (num >= 0) {
arr.push({}); for (let i = 0; i < num; i++) {
arr.push({});
}
} }
return arr; return arr;
} }
...@@ -160,7 +162,7 @@ export default { ...@@ -160,7 +162,7 @@ export default {
let peoplePhotoList = sharePicData.peoplePhotoList || []; let peoplePhotoList = sharePicData.peoplePhotoList || [];
this.maxCount = openGroupCnt >= 6 ? 6 : openGroupCnt; this.maxCount = openGroupCnt >= 6 ? 6 : openGroupCnt;
this.openGroupCnt = openGroupCnt; this.openGroupCnt = openGroupCnt;
this.avatorList = peoplePhotoList.slice(0, openGroupCnt); this.avatorList = peoplePhotoList.slice(0, this.maxCount);
this.$nextTick(() => { this.$nextTick(() => {
if (this.avatorList.length === 0) { if (this.avatorList.length === 0) {
this.maxCount -= 1; this.maxCount -= 1;
......
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