Kaynağa Gözat

选择藏品

panhui 3 yıl önce
ebeveyn
işleme
b28fe08fcc
1 değiştirilmiş dosya ile 9 ekleme ve 3 silme
  1. 9 3
      src/views/activity/ChooseProduct.vue

+ 9 - 3
src/views/activity/ChooseProduct.vue

@@ -246,7 +246,6 @@ export default {
             let list = [...this.list];
             let nots = [...this.nots];
             let _map = new Map();
-            console.log(list);
             list.forEach(item => {
                 let flag = true;
                 nots.forEach(_not => {
@@ -277,13 +276,20 @@ export default {
                     }
                 }
             });
-            console.log(_map);
 
             return [..._map.values()];
         },
         numList() {
             let chooseIds = [...this.chooseIds];
-            let collections = [...this.collections];
+            let collections = [...this.collections]
+                .map(item => {
+                    if (item.collectionInfos) {
+                        return [item, ...item.collectionInfos];
+                    } else {
+                        return item;
+                    }
+                })
+                .flat();
             let nums = [];
             chooseIds.forEach(item => {
                 let info = collections.find(coll => {