yuanyuan 3 жил өмнө
parent
commit
ddb547628f

+ 10 - 4
src/views/user/ShoppingCartSubmit.vue

@@ -96,12 +96,18 @@ export default {
         });
         if (this.$route.query.id) {
             let collectionIdList = this.$route.query.id;
-            this.collectionIds = collectionIdList.join(',');
-            collectionIdList.forEach(item => {
-                this.$http.get('/collection/get/' + item).then(res => {
+            if (collectionIdList.length == 7) {
+                this.$http.get('/collection/get/' + collectionIdList).then(res => {
                     this.collectionList.push(res);
                 });
-            });
+            } else {
+                this.collectionIds = collectionIdList.join(',');
+                collectionIdList.forEach(item => {
+                    this.$http.get('/collection/get/' + item).then(res => {
+                        this.collectionList.push(res);
+                    });
+                });
+            }
         }
     },
     methods: {