|
|
@@ -238,11 +238,7 @@
|
|
|
</div>
|
|
|
<img
|
|
|
class="activity_collection_selection_subclass_list_con_right_img"
|
|
|
- :src="
|
|
|
- isChoose(pro.id, item.chooseIds)
|
|
|
- ? require('../../assets/icon_gouxuan_pre.png')
|
|
|
- : require('../../assets/icon_gouxuan_huise.png')
|
|
|
- "
|
|
|
+ :src="icons[isChoose(pro.id, item.chooseIds) ? 0 : isElseChoose(pro.id, index) ? 2 : 1]"
|
|
|
alt=""
|
|
|
/>
|
|
|
</div>
|
|
|
@@ -301,7 +297,12 @@ export default {
|
|
|
list: [],
|
|
|
castingQuantity: 1,
|
|
|
allTags: [],
|
|
|
- showList: []
|
|
|
+ showList: [],
|
|
|
+ icons: [
|
|
|
+ require('@assets/icon_gouxuan_pre.png'),
|
|
|
+ require('@assets/icon_gouxuan_huise.png'),
|
|
|
+ require('@assets/icon_bukexuan.png')
|
|
|
+ ]
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -487,16 +488,11 @@ export default {
|
|
|
console.log(_infoIndex);
|
|
|
showList[index].chooseIds.splice(_infoIndex, 1);
|
|
|
} else {
|
|
|
- let chooseIds = [];
|
|
|
- showList.forEach(item => {
|
|
|
- chooseIds.push(item.chooseIds);
|
|
|
- });
|
|
|
- chooseIds = chooseIds.flat();
|
|
|
if (showList[index].chooseIds.length === showList[index].num) {
|
|
|
this.$toast(`只能选择${showList[index].num}个藏品`);
|
|
|
return;
|
|
|
}
|
|
|
- if (chooseIds.includes(id)) {
|
|
|
+ if (this.isElseChoose(id, index)) {
|
|
|
this.$toast(`其他标签下已经选择该藏品`);
|
|
|
return;
|
|
|
}
|
|
|
@@ -508,6 +504,17 @@ export default {
|
|
|
isChoose(id, list) {
|
|
|
return list.includes(id);
|
|
|
},
|
|
|
+ isElseChoose(id, index) {
|
|
|
+ const showList = [...this.showList];
|
|
|
+ let chooseIds = [];
|
|
|
+ showList.forEach(item => {
|
|
|
+ chooseIds.push(item.chooseIds);
|
|
|
+ });
|
|
|
+ chooseIds = chooseIds.flat();
|
|
|
+ console.log(chooseIds.includes(id));
|
|
|
+ console.log(!this.isChoose(id, showList[index].chooseIds));
|
|
|
+ return chooseIds.includes(id) && !this.isChoose(id, showList[index].chooseIds);
|
|
|
+ },
|
|
|
getList(refresh, done) {
|
|
|
this.$http
|
|
|
.get('/asset/assetsForMint', {
|