|
@@ -52,24 +52,43 @@
|
|
|
<template v-if="data.salePlans">
|
|
|
<div v-for="(item, index) in data.salePlans" :key="index">
|
|
|
<template v-if="item.itemCount == 1">
|
|
|
- <div
|
|
|
- class="btn"
|
|
|
- :class="{ disable: !((data.perUserBuyLimit - data.userBuyCount) >= 1 && (data.itemTotalCount - data.itemSoldCount) >= 1) }"
|
|
|
- @click="goBuy(((data.perUserBuyLimit - data.userBuyCount) >= 1 && (data.itemTotalCount - data.itemSoldCount) >= 1))">
|
|
|
- <div class="l">BUY {{item.itemCount}}</div>
|
|
|
- <FontZoom width="220">
|
|
|
- <img class="icon" :src="item.currencyInfo.iconPath" /> {{ item.price }} {{ item.currencyInfo.tokenSymbol }} (${{item.usdPrice}})
|
|
|
- </FontZoom>
|
|
|
- </div>
|
|
|
+ <template v-if="purchaseStatus !== 0">
|
|
|
+ <div
|
|
|
+ class="btn"
|
|
|
+ :class="{ disable: !((data.perUserBuyLimit - data.userBuyCount) >= 1 && (data.itemTotalCount - data.itemSoldCount) >= 1) }"
|
|
|
+ @click="goBuy(((data.perUserBuyLimit - data.userBuyCount) >= 1 && (data.itemTotalCount - data.itemSoldCount) >= 1))">
|
|
|
+ <div class="l">BUY {{item.itemCount}}</div>
|
|
|
+ <FontZoom width="220">
|
|
|
+ <img class="icon" :src="item.currencyInfo.iconPath" /> {{ item.price }} {{ item.currencyInfo.tokenSymbol }} (${{item.usdPrice}})
|
|
|
+ </FontZoom>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <div
|
|
|
+ class="btn disable">
|
|
|
+ <div class="l">BUY {{item.itemCount}}</div>
|
|
|
+ <FontZoom width="220">
|
|
|
+ <img class="icon" :src="item.currencyInfo.iconPath" /> {{ item.price }} {{ item.currencyInfo.tokenSymbol }} (${{item.usdPrice}})
|
|
|
+ </FontZoom>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <div
|
|
|
- class="btn"
|
|
|
- @click="goBuy()">
|
|
|
- BUY 1
|
|
|
- </div>
|
|
|
+ <template v-if="purchaseStatus !== 0">
|
|
|
+ <div
|
|
|
+ class="btn"
|
|
|
+ @click="goBuy()">
|
|
|
+ BUY 1
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <div
|
|
|
+ class="btn disable">
|
|
|
+ BUY 1
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
<div class="sale">
|
|
|
<div class="l">SOLD: {{ data.itemSoldCount || 0 }}/{{ data.itemTotalCount }}</div>
|
|
@@ -120,6 +139,12 @@ export default {
|
|
|
loginLayer: false,
|
|
|
}
|
|
|
},
|
|
|
+ props: {
|
|
|
+ purchaseStatus: {
|
|
|
+ type: Number,
|
|
|
+ default: 0
|
|
|
+ }
|
|
|
+ },
|
|
|
created() {
|
|
|
this.getSaleInfo()
|
|
|
// report
|