|
|
@@ -66,14 +66,16 @@
|
|
|
<div class="box-list_con_right_top_title">
|
|
|
<div
|
|
|
class="box-list_con_right_top_title_name"
|
|
|
- :class="active == 'SELLOUT' ? 'box-list_con_right_top_title_names' : ''"
|
|
|
+ :class="item.enabled == false ? 'box-list_con_right_top_title_names' : ''"
|
|
|
>
|
|
|
{{ item.collectionName }}
|
|
|
</div>
|
|
|
- <div class="box-list_con_right_top_title_time">剩余时长 {{ item.endTime }}</div>
|
|
|
+ <div class="box-list_con_right_top_title_time" v-if="item.enabled == true">
|
|
|
+ 剩余时长 {{ item.endTime }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="box-list_con_right_bottom" v-if="active == 'ALL'">
|
|
|
+ <div class="box-list_con_right_bottom" v-if="active == 'ALL' && item.enabled == true">
|
|
|
<img
|
|
|
:src="require('@assets/icon_jiage@3x (4).png')"
|
|
|
alt=""
|
|
|
@@ -86,7 +88,7 @@
|
|
|
<div v-else class="box-list_con_right_two">
|
|
|
<div
|
|
|
class="box-list_con_right_two_name"
|
|
|
- :class="active == 'SELLOUT' ? 'box-list_con_right_two_names' : ''"
|
|
|
+ :class="item.enabled == false ? 'box-list_con_right_two_names' : ''"
|
|
|
>
|
|
|
{{ item.collectionName }}
|
|
|
</div>
|
|
|
@@ -94,13 +96,15 @@
|
|
|
<van-image width="14" height="14" :src="item.ownerAvatar" fit="cover" radius="100" />
|
|
|
<div class="box-list_con_right_two_information_name">{{ item.owner }}</div>
|
|
|
</div>
|
|
|
- <div class="box-list_con_right_bottom" v-if="active == 'ALL'">
|
|
|
+ <div class="box-list_con_right_bottom" v-if="active == 'ALL' && item.enabled == true">
|
|
|
<img
|
|
|
:src="require('@assets/icon_jiage@3x (4).png')"
|
|
|
alt=""
|
|
|
class="box-list_con_right_bottom_price_img"
|
|
|
/>
|
|
|
- <div class="box-list_con_right_bottom_price">{{ item.price }}</div>
|
|
|
+ <div class="box-list_con_right_bottom_price" v-if="active == 'ALL' && item.enabled == true">
|
|
|
+ {{ item.price }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="box-list_con_right_bottom_noBuy" v-else>藏品已售罄不能购买</div>
|
|
|
</div>
|
|
|
@@ -220,7 +224,7 @@ export default {
|
|
|
item.check = true;
|
|
|
this.price += Number(item.price);
|
|
|
});
|
|
|
- // this.price = this.price.toFixed(1);
|
|
|
+ this.price = this.price.toFixed(2);
|
|
|
this.collectionListSelected = this.collectionList;
|
|
|
} else {
|
|
|
this.price = 0;
|
|
|
@@ -246,9 +250,12 @@ export default {
|
|
|
this.totalSettlement = newCollectionList.length;
|
|
|
this.price = 0;
|
|
|
newCollectionList.forEach(item => {
|
|
|
+ if (item.enabled == false) {
|
|
|
+ item.price = 0;
|
|
|
+ }
|
|
|
this.price += item.price;
|
|
|
});
|
|
|
- // this.price = this.price.toFixed(1);
|
|
|
+ this.price = this.price.toFixed(2);
|
|
|
// if (this.price == '0.0') {
|
|
|
// this.price = 0;
|
|
|
// }
|
|
|
@@ -261,8 +268,12 @@ export default {
|
|
|
if (this.totalSettlement == 0) {
|
|
|
return;
|
|
|
} else {
|
|
|
- this.collectionList.forEach(item => {
|
|
|
- if (item.enabled == false) {
|
|
|
+ let newEnabled = '';
|
|
|
+ newEnabled = [...this.collectionListSelected].find(item => {
|
|
|
+ return item.enabled == false;
|
|
|
+ });
|
|
|
+ this.collectionListSelected.forEach(item => {
|
|
|
+ if (newEnabled) {
|
|
|
Dialog.confirm({
|
|
|
title: '有藏品已售罄,无法购买!',
|
|
|
confirmButtonText: '一键删除',
|
|
|
@@ -275,6 +286,7 @@ export default {
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
} else {
|
|
|
+ console.log('sdhdgdfgd');
|
|
|
let cartIds = [];
|
|
|
this.collectionListSelected.forEach(item => {
|
|
|
cartIds.push(Number(item.collectionId));
|
|
|
@@ -348,11 +360,6 @@ export default {
|
|
|
...query,
|
|
|
enabled: false
|
|
|
};
|
|
|
- } else {
|
|
|
- query = {
|
|
|
- ...query,
|
|
|
- enabled: true
|
|
|
- };
|
|
|
}
|
|
|
let sort = 'createdAt,desc';
|
|
|
let url = '/cart/all';
|