|
|
@@ -21,14 +21,20 @@
|
|
|
<!-- 即将售罄 -->
|
|
|
<div class="shop_sold_out_two" v-else-if="isSold">即将售罄</div>
|
|
|
<!-- <img :src="getImg(changeImgs(info.pic, 600))" alt="" class="commodity_map" /> -->
|
|
|
- <van-image width="100%" height="calc(100vw - 30px)" :radius="30" :src="getImg(changeImgs(info.pic))" fit="cover"/>
|
|
|
+ <van-image
|
|
|
+ width="100%"
|
|
|
+ height="calc(100vw - 30px)"
|
|
|
+ :radius="30"
|
|
|
+ :src="getImg(changeImgs(info.pic))"
|
|
|
+ fit="cover"
|
|
|
+ />
|
|
|
<div class="shop_title">
|
|
|
<div>{{ info.name }}</div>
|
|
|
<img v-if="!!info.model3d" :src="require('@assets/3d@3x.png')" alt="" class="shop_title_img" />
|
|
|
</div>
|
|
|
<div class="shop_number">
|
|
|
<div class="shop_number_con" v-if="info.collectionCategory">
|
|
|
- <span>{{info.collectionCategory}}</span>
|
|
|
+ <span>{{ info.collectionCategory }}</span>
|
|
|
</div>
|
|
|
<div class="limit">
|
|
|
<span>限量</span>
|
|
|
@@ -47,17 +53,15 @@
|
|
|
<div class="shop_bottom_left_name">{{ info.minter }}</div>
|
|
|
</div>
|
|
|
<div class="shop_bottom_right" v-if="info.salable">
|
|
|
- <div class="shop_bottom_right_con">¥</div>
|
|
|
- <div class="shop_bottom_right_price">{{ info.price }}</div>
|
|
|
- </div>
|
|
|
- <div class="shop_bottom_right_price" v-else>
|
|
|
- 仅展示
|
|
|
+ <div class="shop_bottom_right_con">¥</div>
|
|
|
+ <div class="shop_bottom_right_price">{{ info.price }}</div>
|
|
|
</div>
|
|
|
+ <div class="shop_bottom_right_price" v-else>仅展示</div>
|
|
|
<!-- <div class="shop_bottom_right">
|
|
|
<div class="shop_bottom_right_title">仅展示</div>
|
|
|
</div> -->
|
|
|
</div>
|
|
|
- <img :src="require('@assets/dibuwenli.png')" alt="" class="bottom_texture">
|
|
|
+ <img :src="require('@assets/dibuwenli.png')" alt="" class="bottom_texture" />
|
|
|
</div>
|
|
|
</router-link>
|
|
|
</template>
|
|
|
@@ -80,23 +84,50 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
time() {
|
|
|
- if (this.info.purchaseTime) {
|
|
|
- if (this.dayjs().isSameOrBefore(this.info.purchaseTime, 'YYYY-MM-DD HH:mm:ss')) {
|
|
|
- return this.dayjs(this.info.purchaseTime).format('MM月DD日HH:mm');
|
|
|
+ if (this.info.hasSubscribe) {
|
|
|
+ if (this.info.purchaseTime) {
|
|
|
+ if (this.dayjs().isSameOrBefore(this.info.purchaseTime, 'YYYY-MM-DD HH:mm:ss')) {
|
|
|
+ return this.dayjs(this.info.purchaseTime).format('MM月DD日HH:mm');
|
|
|
+ }
|
|
|
}
|
|
|
+ return '';
|
|
|
+ } else {
|
|
|
+ if (this.info.startTime && !this.isSolded && !this.isSold) {
|
|
|
+ if (this.dayjs().isSameOrBefore(this.info.startTime, 'YYYY-MM-DD HH:mm:ss')) {
|
|
|
+ return this.dayjs(this.info.startTime).format('MM月DD日HH:mm');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return '';
|
|
|
}
|
|
|
-
|
|
|
- return '';
|
|
|
}
|
|
|
+ // isSolded() {
|
|
|
+ // return this.info && !this.info.noSoldOut && this.info.salable && this.info.source === 'OFFICIAL';
|
|
|
+ // },
|
|
|
+ // isSold() {
|
|
|
+ // return this.info && this.info.soldOut && this.info.salable;
|
|
|
+ // }
|
|
|
},
|
|
|
mounted() {
|
|
|
- if (this.info.purchaseTime) {
|
|
|
- var x = this.dayjs(this.info.purchaseTime, 'YYYY-MM-DD HH:mm:ss');
|
|
|
- var y = this.dayjs();
|
|
|
- let d = this.dayjs.duration(x.diff(y));
|
|
|
- let day = parseInt(d.asDays());
|
|
|
- if (day <= 0) {
|
|
|
- this.getTime(this.info.purchaseTime);
|
|
|
+ console.log(this.isSolded);
|
|
|
+ if (this.info.hasSubscribe) {
|
|
|
+ if (this.info.purchaseTime) {
|
|
|
+ var x = this.dayjs(this.info.purchaseTime, 'YYYY-MM-DD HH:mm:ss');
|
|
|
+ var y = this.dayjs();
|
|
|
+ let d = this.dayjs.duration(x.diff(y));
|
|
|
+ let day = parseInt(d.asDays());
|
|
|
+ if (day <= 0) {
|
|
|
+ this.getTime(this.info.purchaseTime);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (this.info.startTime && !this.isSolded && !this.isSold) {
|
|
|
+ var x1 = this.dayjs(this.info.startTime, 'YYYY-MM-DD HH:mm:ss');
|
|
|
+ var y1 = this.dayjs();
|
|
|
+ let d1 = this.dayjs.duration(x1.diff(y1));
|
|
|
+ let day = parseInt(d1.asDays());
|
|
|
+ if (day <= 0) {
|
|
|
+ this.getTime(this.info.startTime);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -134,14 +165,14 @@ export default {
|
|
|
border-radius: 30px;
|
|
|
margin-bottom: 15px;
|
|
|
position: relative;
|
|
|
- .bottom_texture{
|
|
|
+ .bottom_texture {
|
|
|
width: 196px;
|
|
|
height: 140px;
|
|
|
position: absolute;
|
|
|
right: 0;
|
|
|
bottom: 0;
|
|
|
}
|
|
|
- /deep/ .van-image__img{
|
|
|
+ /deep/ .van-image__img {
|
|
|
position: relative;
|
|
|
z-index: 11;
|
|
|
}
|
|
|
@@ -320,7 +351,7 @@ export default {
|
|
|
font-size: 16px;
|
|
|
font-family: PingFangSC-Medium, PingFang SC;
|
|
|
font-weight: 600;
|
|
|
- color: #FFFFFF;
|
|
|
+ color: #ffffff;
|
|
|
line-height: 22px;
|
|
|
margin-top: 4px;
|
|
|
// position: absolute;
|
|
|
@@ -334,22 +365,22 @@ export default {
|
|
|
color: #ffffff;
|
|
|
line-height: 28px;
|
|
|
}
|
|
|
- .shop_bottom_right_title{
|
|
|
+ .shop_bottom_right_title {
|
|
|
margin-top: 9px;
|
|
|
font-size: 14px;
|
|
|
font-family: PingFangSC-Medium, PingFang SC;
|
|
|
font-weight: 500;
|
|
|
- color: #FFFFFF;
|
|
|
+ color: #ffffff;
|
|
|
line-height: 16px;
|
|
|
}
|
|
|
}
|
|
|
.shop_bottom_right_price {
|
|
|
- font-size: 16px;
|
|
|
- font-family: PingFangSC-Medium, PingFang SC;
|
|
|
- font-weight: 600;
|
|
|
- color: #ffffff;
|
|
|
- line-height: 28px;
|
|
|
- }
|
|
|
+ font-size: 16px;
|
|
|
+ font-family: PingFangSC-Medium, PingFang SC;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #ffffff;
|
|
|
+ line-height: 28px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</style>
|