|
@@ -99,7 +99,13 @@
|
|
|
持有指定藏品才能铸造
|
|
持有指定藏品才能铸造
|
|
|
</van-button>
|
|
</van-button>
|
|
|
<template v-else-if="showList.length > 0">
|
|
<template v-else-if="showList.length > 0">
|
|
|
- <van-button type="primary" round v-if="!canNext" @click="chooseEvent">
|
|
|
|
|
|
|
+ <van-button type="primary" class="not" round v-if="denied">
|
|
|
|
|
+ <div class="btn-text">材料不足</div>
|
|
|
|
|
+ <div class="btn-sub" v-if="showStok && !isSolded">
|
|
|
|
|
+ <div>剩余 {{ info.stock }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </van-button>
|
|
|
|
|
+ <van-button type="primary" round v-else-if="!canNext" @click="chooseEvent">
|
|
|
<div class="btn-text">选择持有藏品</div>
|
|
<div class="btn-text">选择持有藏品</div>
|
|
|
<div class="btn-sub" v-if="showStok && !isSolded">
|
|
<div class="btn-sub" v-if="showStok && !isSolded">
|
|
|
<div>剩余 {{ info.stock }}</div>
|
|
<div>剩余 {{ info.stock }}</div>
|
|
@@ -232,11 +238,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<img
|
|
<img
|
|
|
class="activity_collection_selection_subclass_list_con_right_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=""
|
|
alt=""
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
@@ -295,7 +297,12 @@ export default {
|
|
|
list: [],
|
|
list: [],
|
|
|
castingQuantity: 1,
|
|
castingQuantity: 1,
|
|
|
allTags: [],
|
|
allTags: [],
|
|
|
- showList: []
|
|
|
|
|
|
|
+ showList: [],
|
|
|
|
|
+ icons: [
|
|
|
|
|
+ require('@assets/icon_gouxuan_pre.png'),
|
|
|
|
|
+ require('@assets/icon_gouxuan_huise.png'),
|
|
|
|
|
+ require('@assets/icon_bukexuan.png')
|
|
|
|
|
+ ]
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
@@ -369,6 +376,14 @@ export default {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
return !info;
|
|
return !info;
|
|
|
|
|
+ },
|
|
|
|
|
+ denied() {
|
|
|
|
|
+ let showList = [...this.showList];
|
|
|
|
|
+ let info = showList.find(item => {
|
|
|
|
|
+ return item.ownCollections.length < item.num;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ return !!info;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
@@ -477,6 +492,10 @@ export default {
|
|
|
this.$toast(`只能选择${showList[index].num}个藏品`);
|
|
this.$toast(`只能选择${showList[index].num}个藏品`);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ if (this.isElseChoose(id, index)) {
|
|
|
|
|
+ this.$toast(`其他标签下已经选择该藏品`);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
showList[index].chooseIds.push(id);
|
|
showList[index].chooseIds.push(id);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -485,6 +504,17 @@ export default {
|
|
|
isChoose(id, list) {
|
|
isChoose(id, list) {
|
|
|
return list.includes(id);
|
|
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) {
|
|
getList(refresh, done) {
|
|
|
this.$http
|
|
this.$http
|
|
|
.get('/asset/assetsForMint', {
|
|
.get('/asset/assetsForMint', {
|