|
|
@@ -12,10 +12,10 @@
|
|
|
<!-- <div class="info">
|
|
|
<div class="text1">限量</div>
|
|
|
<div>{{ info.total }}份</div>
|
|
|
- </div>
|
|
|
- <div class="info">
|
|
|
- <div>剩余 {{ info.stock }}</div>
|
|
|
</div> -->
|
|
|
+ <div class="info" v-if="showStok">
|
|
|
+ <div>剩余 {{ info.stock }}</div>
|
|
|
+ </div>
|
|
|
|
|
|
<div class="flex1"></div>
|
|
|
<van-button :disabled="startTime" type="primary" round v-if="startTime">{{ startTime }}</van-button>
|
|
|
@@ -43,16 +43,27 @@ export default {
|
|
|
info: {},
|
|
|
timer: null,
|
|
|
startTime: '',
|
|
|
- holdingFlag: false
|
|
|
+ holdingFlag: false,
|
|
|
+ showCollections: [],
|
|
|
+ activityId: 0
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
isSolded() {
|
|
|
return !this.info.stock || this.info.stock < 0;
|
|
|
+ },
|
|
|
+ showStok() {
|
|
|
+ return [...this.showCollections].includes(this.activityId);
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
+ this.activityId = this.$route.query.id;
|
|
|
this.getProduct(true);
|
|
|
+ this.$http.get('/sysConfig/get/mint_countCollection').then(res => {
|
|
|
+ if (res.value) {
|
|
|
+ this.showCollections = res.value.split(',');
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
goBuild() {
|
|
|
@@ -65,13 +76,13 @@ export default {
|
|
|
);
|
|
|
},
|
|
|
getProduct(init = false) {
|
|
|
- this.$http.get('/mintActivity/get/' + this.$route.query.id).then(res => {
|
|
|
+ this.$http.get('/mintActivity/get/' + this.activityId).then(res => {
|
|
|
this.info = res;
|
|
|
if (res.scheduleSale && init && res.startTime) {
|
|
|
this.getTime();
|
|
|
}
|
|
|
if (res.holdingTags && res.holdingTags.length) {
|
|
|
- this.$http.get('/mintOrder/checkHolding', { id: this.$route.query.id }).then(res => {
|
|
|
+ this.$http.get('/mintOrder/checkHolding', { id: this.activityId }).then(res => {
|
|
|
this.holdingFlag = res;
|
|
|
});
|
|
|
} else {
|