panhui 3 жил өмнө
parent
commit
cd996736fd

+ 9 - 0
src/views/activity/Detail.vue

@@ -487,10 +487,19 @@ export default {
                 console.log(_infoIndex);
                 console.log(_infoIndex);
                 showList[index].chooseIds.splice(_infoIndex, 1);
                 showList[index].chooseIds.splice(_infoIndex, 1);
             } else {
             } else {
+                let chooseIds = [];
+                showList.forEach(item => {
+                    chooseIds.push(item.chooseIds);
+                });
+                chooseIds = chooseIds.flat();
                 if (showList[index].chooseIds.length === showList[index].num) {
                 if (showList[index].chooseIds.length === showList[index].num) {
                     this.$toast(`只能选择${showList[index].num}个藏品`);
                     this.$toast(`只能选择${showList[index].num}个藏品`);
                     return;
                     return;
                 }
                 }
+                if (chooseIds.includes(id)) {
+                    this.$toast(`其他标签下已经选择该藏品`);
+                    return;
+                }
                 showList[index].chooseIds.push(id);
                 showList[index].chooseIds.push(id);
             }
             }