|
|
@@ -1,30 +1,56 @@
|
|
|
<template>
|
|
|
<div class="detail">
|
|
|
- <swiper pagination class="mySwiper" v-if="banners.length > 0">
|
|
|
- <swiper-slide v-for="(item, index) in banners" :key="index">
|
|
|
- <!-- <img :src="item" /> -->
|
|
|
-
|
|
|
- <video
|
|
|
- class="swiper-video"
|
|
|
- v-if="isVideo(item)"
|
|
|
- :src="item.url"
|
|
|
- :poster="getImg(changeImgs([item]), '', 1200)"
|
|
|
- controls="controls"
|
|
|
- >
|
|
|
- 您的浏览器不支持 video 标签。
|
|
|
- </video>
|
|
|
- <van-image
|
|
|
- v-else
|
|
|
- @click="preview(index, changeImgs(banners))"
|
|
|
- :src="getImg(item.url, '', 1200)"
|
|
|
- width="100vw"
|
|
|
- height="100vw"
|
|
|
- fit="scale-down"
|
|
|
- />
|
|
|
- </swiper-slide>
|
|
|
- </swiper>
|
|
|
+ <div class="detail-top">
|
|
|
+ <img src="../../assets/png-bg-shangping.png" class="bg-img" />
|
|
|
+
|
|
|
+ <div class="detail-info">
|
|
|
+ <swiper pagination class="mySwiper" v-if="banners.length > 0">
|
|
|
+ <swiper-slide v-for="(item, index) in banners" :key="index">
|
|
|
+ <!-- <img :src="item" /> -->
|
|
|
+
|
|
|
+ <video
|
|
|
+ class="swiper-video"
|
|
|
+ v-if="isVideo(item)"
|
|
|
+ :src="item.url"
|
|
|
+ :poster="getImg(changeImgs([item]), '', 1200)"
|
|
|
+ controls="controls"
|
|
|
+ >
|
|
|
+ 您的浏览器不支持 video 标签。
|
|
|
+ </video>
|
|
|
+ <van-image
|
|
|
+ v-else
|
|
|
+ @click="preview(index, changeImgs(banners))"
|
|
|
+ :src="getImg(item.url, '', 1200)"
|
|
|
+ width="calc(100vw - 134px)"
|
|
|
+ height="calc(100vw - 134px)"
|
|
|
+ fit="scale-down"
|
|
|
+ />
|
|
|
+ </swiper-slide>
|
|
|
+ </swiper>
|
|
|
+
|
|
|
+ <div class="share-content">
|
|
|
+ <like-button :isLike="info.liked" @click="likeProduct">
|
|
|
+ {{ info.likes }}
|
|
|
+ </like-button>
|
|
|
+
|
|
|
+ <div class="share-icon" @click="share">
|
|
|
+ <img src="../../assets/svgs/icon-fenxiang.svg" alt="" />
|
|
|
+ <span>分享</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
|
|
|
<div class="info">
|
|
|
+ <div class="info-title">
|
|
|
+ <div class="detail-name">
|
|
|
+ <span>{{ info.name }}</span>
|
|
|
+ <img src="../../assets/svgs/png-biaotikuang-01.svg" alt="" />
|
|
|
+ <img src="../../assets/svgs/png-biaotikuang-02.svg" alt="" />
|
|
|
+ <img src="../../assets/svgs/png-biaotikuang-03.svg" alt="" />
|
|
|
+ <img src="../../assets/svgs/png-biaotikuang-04.svg" alt="" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<div class="name" v-if="info.salable && startTime">
|
|
|
<div class="name1">首发抢购倒计时</div>
|
|
|
<div class="name2">{{ startTime }}</div>
|
|
|
@@ -42,9 +68,9 @@
|
|
|
<span>剩余 {{ info.stock }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="title">{{ info.name }}</div>
|
|
|
+ <!-- <div class="title">{{ info.name }}</div> -->
|
|
|
<div class="info-bottom">
|
|
|
- <span class="text1"> 编号 {{ info.id }} </span>
|
|
|
+ <span class="text1" v-if="info.number"> 编号 {{ info.number }} </span>
|
|
|
<!-- <van-button
|
|
|
v-if="info.type !== 'DEFAULT'"
|
|
|
type="primary"
|
|
|
@@ -53,9 +79,9 @@
|
|
|
>选择其他编号</van-button
|
|
|
> -->
|
|
|
<div class="flex1"></div>
|
|
|
- <like-button :isLike="info.liked" @click="likeProduct">
|
|
|
+ <!-- <like-button :isLike="info.liked" @click="likeProduct">
|
|
|
{{ info.likes }}
|
|
|
- </like-button>
|
|
|
+ </like-button> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -83,7 +109,7 @@
|
|
|
<driver />
|
|
|
|
|
|
<div class="goods">
|
|
|
- <template v-if="boxs.length > 0">
|
|
|
+ <div class="goods-info" v-if="boxs.length > 0">
|
|
|
<div class="page-title">盲盒详情</div>
|
|
|
<swiper :slidesPerView="'auto'" :spaceBetween="20" class="detail-swiper">
|
|
|
<swiper-slide v-for="(item, index) in boxs" :key="index">
|
|
|
@@ -97,8 +123,8 @@
|
|
|
/>
|
|
|
</swiper-slide>
|
|
|
</swiper>
|
|
|
- </template>
|
|
|
- <template v-if="properties.length > 0">
|
|
|
+ </div>
|
|
|
+ <div class="goods-info" v-if="properties.length > 0">
|
|
|
<div class="page-title">商品特性</div>
|
|
|
<div class="specific-list">
|
|
|
<div class="specific-item" v-for="(item, index) in properties" :key="index">
|
|
|
@@ -106,11 +132,11 @@
|
|
|
<div class="text2">{{ item.value }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </template>
|
|
|
- <template v-if="info.detail">
|
|
|
+ </div>
|
|
|
+ <div class="goods-info" v-if="info.detail">
|
|
|
<div class="page-title">作品描述</div>
|
|
|
- <div class="page-text page-detail" v-html="info.detail"></div
|
|
|
- ></template>
|
|
|
+ <div class="page-text page-detail" v-html="info.detail"></div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="btn van-safe-area-bottom" v-if="info.isAppointment">
|
|
|
<div class="btns">
|
|
|
@@ -126,6 +152,10 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
+ <div class="btn van-safe-area-bottom" v-if="!info.salable">
|
|
|
+ <div class="btns status-text">仅展示</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
<!-- <driver /> -->
|
|
|
|
|
|
<!-- <van-collapse v-model="activeName" accordion>
|
|
|
@@ -136,7 +166,7 @@
|
|
|
|
|
|
<driver />
|
|
|
|
|
|
- <post :info="info" />
|
|
|
+ <post ref="post" :info="info" noButton />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -274,6 +304,9 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
+ },
|
|
|
+ share() {
|
|
|
+ this.$refs.post.init();
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
@@ -301,7 +334,7 @@ export default {
|
|
|
line-height: 24px;
|
|
|
}
|
|
|
.name2 {
|
|
|
- font-size: 16px;
|
|
|
+ font-size: @font2;
|
|
|
font-weight: 400;
|
|
|
color: #fdfb60;
|
|
|
line-height: 24px;
|
|
|
@@ -330,7 +363,7 @@ export default {
|
|
|
.sub {
|
|
|
flex-grow: 1;
|
|
|
margin-left: 5px;
|
|
|
- font-size: 14px;
|
|
|
+ font-size: @font2;
|
|
|
color: #949699;
|
|
|
line-height: 16px;
|
|
|
span {
|
|
|
@@ -339,15 +372,15 @@ export default {
|
|
|
}
|
|
|
|
|
|
.price-sub {
|
|
|
- font-size: 14px;
|
|
|
- color: #939599;
|
|
|
+ font-size: @font2;
|
|
|
+ color: @text3;
|
|
|
text-decoration: line-through;
|
|
|
margin-left: 10px;
|
|
|
}
|
|
|
|
|
|
.text {
|
|
|
- font-size: 14px;
|
|
|
- color: #939599;
|
|
|
+ font-size: @font2;
|
|
|
+ color: @text3;
|
|
|
line-height: 16px;
|
|
|
span {
|
|
|
margin-left: 10px;
|
|
|
@@ -369,12 +402,12 @@ export default {
|
|
|
margin-top: 4px;
|
|
|
height: 24px;
|
|
|
.text1 {
|
|
|
- font-size: 14px;
|
|
|
+ font-size: @font2;
|
|
|
color: #949699;
|
|
|
line-height: 24px;
|
|
|
}
|
|
|
.van-button {
|
|
|
- font-size: 13px;
|
|
|
+ font-size: @font2;
|
|
|
color: #fdfb60;
|
|
|
line-height: 24px;
|
|
|
background: linear-gradient(135deg, #fdfb60 0%, #ff8f3e 100%);
|
|
|
@@ -397,18 +430,18 @@ export default {
|
|
|
.van-cell__title {
|
|
|
margin-left: 12px;
|
|
|
.text1 {
|
|
|
- font-size: 16px;
|
|
|
+ font-size: @font2;
|
|
|
line-height: 24px;
|
|
|
}
|
|
|
.text2 {
|
|
|
- font-size: 12px;
|
|
|
- color: #939599;
|
|
|
+ font-size: @font2;
|
|
|
+ color: @text3;
|
|
|
line-height: 22px;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.van-cell__value {
|
|
|
- font-size: 13px;
|
|
|
+ font-size: @font2;
|
|
|
}
|
|
|
}
|
|
|
.buy {
|
|
|
@@ -425,12 +458,12 @@ export default {
|
|
|
|
|
|
&.used {
|
|
|
background: linear-gradient(135deg, darken(@prim, 50%), darken(@warn, 50%));
|
|
|
- color: #939599;
|
|
|
+ color: @text3;
|
|
|
}
|
|
|
}
|
|
|
/deep/ .mySwiper {
|
|
|
- width: 100vw;
|
|
|
- height: 100vw;
|
|
|
+ width: calc(100vw - 120px);
|
|
|
+ height: calc(100vw - 120px);
|
|
|
z-index: 1;
|
|
|
|
|
|
.swiper-pagination {
|
|
|
@@ -467,47 +500,64 @@ export default {
|
|
|
}
|
|
|
|
|
|
.page-title {
|
|
|
- font-size: 18px;
|
|
|
+ font-size: @font2;
|
|
|
font-weight: bold;
|
|
|
color: #ffffff;
|
|
|
line-height: 28px;
|
|
|
}
|
|
|
.specific-list {
|
|
|
- padding: 16px 0;
|
|
|
+ padding: 10px 0 0;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
|
+ overflow-x: auto;
|
|
|
}
|
|
|
.specific-item {
|
|
|
- width: 94px;
|
|
|
- height: 62px;
|
|
|
+ // width: 94px;
|
|
|
+ // height: 62px;
|
|
|
border-radius: 4px;
|
|
|
- border: solid 0px transparent;
|
|
|
- padding: 1px;
|
|
|
- background-image: linear-gradient(@bg, @bg), linear-gradient(135deg, #fdfb60, #ff8f3e);
|
|
|
- background-origin: border-box;
|
|
|
- box-sizing: border-box;
|
|
|
- background-clip: content-box, border-box;
|
|
|
+ padding: 8px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
|
flex-direction: column;
|
|
|
+ position: relative;
|
|
|
+ background: linear-gradient(135deg, @prim, @warn);
|
|
|
+ margin-right: 20px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ min-width: 94px;
|
|
|
+
|
|
|
+ &::after {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ top: 1px;
|
|
|
+ left: 1px;
|
|
|
+ right: 1px;
|
|
|
+ bottom: 1px;
|
|
|
+ background-color: @bg;
|
|
|
+ border-radius: 4px;
|
|
|
+ z-index: 0;
|
|
|
+ }
|
|
|
|
|
|
.text1 {
|
|
|
- font-size: 14px;
|
|
|
- color: #939599;
|
|
|
+ font-size: @font2;
|
|
|
+ color: @text3;
|
|
|
line-height: 24px;
|
|
|
+ z-index: 1;
|
|
|
+ white-space: nowrap;
|
|
|
}
|
|
|
|
|
|
.text2 {
|
|
|
- font-size: 14px;
|
|
|
+ font-size: @font2;
|
|
|
color: #ffffff;
|
|
|
line-height: 24px;
|
|
|
+ z-index: 1;
|
|
|
+ white-space: nowrap;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.page-text {
|
|
|
- font-size: 14px;
|
|
|
+ font-size: @font2;
|
|
|
color: #ffffff;
|
|
|
line-height: 28px;
|
|
|
margin-top: 10px;
|
|
|
@@ -526,14 +576,16 @@ export default {
|
|
|
.van-button {
|
|
|
background: linear-gradient(135deg, #fdfb60 0%, #ff8f3e 100%);
|
|
|
color: #333230;
|
|
|
- font-size: 16px;
|
|
|
+ font-size: @font2;
|
|
|
border-width: 0px;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+.goods-info {
|
|
|
+ padding: 0 0 30px;
|
|
|
+}
|
|
|
.detail-swiper {
|
|
|
height: 170px;
|
|
|
- margin-top: 12px;
|
|
|
+ margin-top: 10px;
|
|
|
}
|
|
|
|
|
|
.swiper-slide {
|
|
|
@@ -548,7 +600,160 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.swiper-video {
|
|
|
- width: 100vw;
|
|
|
- height: 100vw;
|
|
|
+ width: calc(100vw - 134px);
|
|
|
+ height: calc(100vw - 134px);
|
|
|
+ border: 2px solid #2f2f2f;
|
|
|
+ border-radius: 8px;
|
|
|
+ overflow: hidden;
|
|
|
+ background-color: @bg;
|
|
|
+}
|
|
|
+
|
|
|
+.detail-top {
|
|
|
+ position: relative;
|
|
|
+ .detail-info {
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ left: 50%;
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ .bg-img {
|
|
|
+ display: block;
|
|
|
+ width: 100vw;
|
|
|
+ }
|
|
|
+ .mySwiper {
|
|
|
+ border-radius: 8px;
|
|
|
+ border: 2px solid #ffffff;
|
|
|
+ .swiper-slide {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ /deep/ .van-image {
|
|
|
+ border: 2px solid #2f2f2f;
|
|
|
+ border-radius: 8px;
|
|
|
+ overflow: hidden;
|
|
|
+ background-color: @bg;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .name {
|
|
|
+ font-size: @font4;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #ffffff;
|
|
|
+ line-height: 30px;
|
|
|
+ padding: 10px 25px;
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ img {
|
|
|
+ position: absolute;
|
|
|
+ &:nth-child(2),
|
|
|
+ &:nth-child(5) {
|
|
|
+ width: 45px;
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+
|
|
|
+ &:nth-child(3),
|
|
|
+ &:nth-child(4) {
|
|
|
+ width: calc(100% - 65px);
|
|
|
+ height: 10px;
|
|
|
+ }
|
|
|
+ &:nth-child(2) {
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ }
|
|
|
+ &:nth-child(3) {
|
|
|
+ top: -0.8px;
|
|
|
+ left: 45px;
|
|
|
+ }
|
|
|
+ &:nth-child(4) {
|
|
|
+ bottom: 0.5px;
|
|
|
+ right: 45px;
|
|
|
+ }
|
|
|
+ &:nth-child(5) {
|
|
|
+ bottom: 0;
|
|
|
+ right: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.share-content {
|
|
|
+ display: flex;
|
|
|
+ margin-top: 20px;
|
|
|
+}
|
|
|
+.share-icon {
|
|
|
+ margin-left: 30px;
|
|
|
+ img {
|
|
|
+ width: 18px;
|
|
|
+ height: 18px;
|
|
|
+ display: inline-block;
|
|
|
+ vertical-align: middle;
|
|
|
+ }
|
|
|
+ span {
|
|
|
+ font-size: @font1;
|
|
|
+ color: #949699;
|
|
|
+ line-height: 24px;
|
|
|
+ vertical-align: middle;
|
|
|
+ margin-left: 2px;
|
|
|
+ }
|
|
|
+}
|
|
|
+.info {
|
|
|
+ .info-title {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.detail-name {
|
|
|
+ font-size: @font4;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #ffffff;
|
|
|
+ line-height: 30px;
|
|
|
+ padding: 10px 25px;
|
|
|
+ position: relative;
|
|
|
+
|
|
|
+ img {
|
|
|
+ position: absolute;
|
|
|
+ &:nth-child(2),
|
|
|
+ &:nth-child(5) {
|
|
|
+ width: 45px;
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+
|
|
|
+ &:nth-child(3),
|
|
|
+ &:nth-child(4) {
|
|
|
+ width: calc(100% - 65px);
|
|
|
+ height: 10px;
|
|
|
+ }
|
|
|
+ &:nth-child(2) {
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ }
|
|
|
+ &:nth-child(3) {
|
|
|
+ top: -0.8px;
|
|
|
+ left: 45px;
|
|
|
+ }
|
|
|
+ &:nth-child(4) {
|
|
|
+ bottom: 0.5px;
|
|
|
+ right: 45px;
|
|
|
+ }
|
|
|
+ &:nth-child(5) {
|
|
|
+ bottom: 0;
|
|
|
+ right: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.status-text {
|
|
|
+ font-size: @font4;
|
|
|
+ color: #939599;
|
|
|
+ line-height: 28px;
|
|
|
+ text-align: center;
|
|
|
+ padding: 14px 50px !important;
|
|
|
+ border-top: 1px solid #313233;
|
|
|
}
|
|
|
</style>
|