|
@@ -1,28 +1,29 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="detail">
|
|
<div class="detail">
|
|
|
- <swiper pagination class="mySwiper">
|
|
|
|
|
- <swiper-slide><img src="../assets/detail.jpg" /></swiper-slide>
|
|
|
|
|
- <swiper-slide><img src="../assets/detail.jpg" /></swiper-slide>
|
|
|
|
|
- <swiper-slide><img src="../assets/detail.jpg" /></swiper-slide>
|
|
|
|
|
- <swiper-slide><img src="../assets/detail.jpg" /></swiper-slide>
|
|
|
|
|
- <swiper-slide><img src="../assets/detail.jpg" /></swiper-slide>
|
|
|
|
|
- <swiper-slide><img src="../assets/detail.jpg" /></swiper-slide>
|
|
|
|
|
|
|
+ <swiper pagination class="mySwiper" v-if="banners.length > 0">
|
|
|
|
|
+ <swiper-slide v-for="(item, index) in banners" :key="index">
|
|
|
|
|
+ <img :src="item" />
|
|
|
|
|
+ </swiper-slide>
|
|
|
</swiper>
|
|
</swiper>
|
|
|
|
|
|
|
|
<div class="info">
|
|
<div class="info">
|
|
|
<div class="price-line">
|
|
<div class="price-line">
|
|
|
- <div class="price"><i class="font_family icon-icon_jiage"></i>320</div>
|
|
|
|
|
|
|
+ <div class="price">
|
|
|
|
|
+ <i class="font_family icon-icon_jiage"></i>{{ info.price }}
|
|
|
|
|
+ </div>
|
|
|
<div class="sub">含 <span>5%</span> 版税</div>
|
|
<div class="sub">含 <span>5%</span> 版税</div>
|
|
|
<div class="text">
|
|
<div class="text">
|
|
|
- <span>已售 23</span>
|
|
|
|
|
- <span>剩余 50</span>
|
|
|
|
|
|
|
+ <span>已售 {{ info.sale }}</span>
|
|
|
|
|
+ <span>剩余 {{ info.stock }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="title">游戏《百分之一》精美皮肤---恶魔的礼物</div>
|
|
|
|
|
|
|
+ <div class="title">{{ info.name }}</div>
|
|
|
<div class="info-bottom">
|
|
<div class="info-bottom">
|
|
|
<span class="text1"> 编号 338392 </span>
|
|
<span class="text1"> 编号 338392 </span>
|
|
|
<van-button type="primary" plain size="mini">选择其他编号</van-button>
|
|
<van-button type="primary" plain size="mini">选择其他编号</van-button>
|
|
|
- <like-button>20</like-button>
|
|
|
|
|
|
|
+ <like-button :isLike="liked" @click="likeProduct">
|
|
|
|
|
+ {{ info.likes }}
|
|
|
|
|
+ </like-button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -32,13 +33,13 @@
|
|
|
<van-image
|
|
<van-image
|
|
|
width="40"
|
|
width="40"
|
|
|
height="40"
|
|
height="40"
|
|
|
- src="https://bpic.588ku.com/illus_water_img/21/09/08/e769eb69326977dc1a5f488dfb988ba4.jpg"
|
|
|
|
|
|
|
+ :src="info.minterAvatar"
|
|
|
fit="cover"
|
|
fit="cover"
|
|
|
radius="100"
|
|
radius="100"
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
<template #title>
|
|
<template #title>
|
|
|
- <div class="text1">铸造者昵称</div>
|
|
|
|
|
|
|
+ <div class="text1">{{ info.minter }}</div>
|
|
|
<div class="text2">铸造者</div>
|
|
<div class="text2">铸造者</div>
|
|
|
</template>
|
|
</template>
|
|
|
</van-cell>
|
|
</van-cell>
|
|
@@ -48,41 +49,38 @@
|
|
|
<div class="goods">
|
|
<div class="goods">
|
|
|
<div class="page-title">商品特性</div>
|
|
<div class="page-title">商品特性</div>
|
|
|
<div class="specific-list">
|
|
<div class="specific-list">
|
|
|
- <div class="specific-item">
|
|
|
|
|
- <div class="text1">数字权益卡</div>
|
|
|
|
|
- <div class="text2">打开可见</div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="specific-item">
|
|
|
|
|
- <div class="text1">属性</div>
|
|
|
|
|
- <div class="text2">S级</div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="specific-item">
|
|
|
|
|
- <div class="text1">限量发售</div>
|
|
|
|
|
- <div class="text2">100份</div>
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="specific-item"
|
|
|
|
|
+ v-for="(item, index) in properties"
|
|
|
|
|
+ :key="index"
|
|
|
|
|
+ >
|
|
|
|
|
+ <div class="text1">{{ item.name }}</div>
|
|
|
|
|
+ <div class="text2">{{ item.value }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="page-title">链上信息</div>
|
|
|
|
|
- <div class="page-text">
|
|
|
|
|
- 创世“由艺术大师天野喜孝为游戏”百分之一“倾情绘制,天野喜孝是日本知名画家,插画师,角色设计师,普任”最终幻想“系列多部作品的角色设计
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="page-title" style="padding-top: 30px">作品描述</div>
|
|
|
|
|
|
|
+ <!-- <div class="page-title">链上信息</div>
|
|
|
<div class="page-text">
|
|
<div class="page-text">
|
|
|
- 品名:数字权益卡<br />
|
|
|
|
|
- 款式:基础版*3+待解锁隐藏款*2<br />
|
|
|
|
|
- 尺寸:1080x1920<br />
|
|
|
|
|
- 类型:个人创作 <br />
|
|
|
|
|
- 创建时间:2021-08-20<br />
|
|
|
|
|
创世“由艺术大师天野喜孝为游戏”百分之一“倾情绘制,天野喜孝是日本知名画家,插画师,角色设计师,普任”最终幻想“系列多部作品的角色设计
|
|
创世“由艺术大师天野喜孝为游戏”百分之一“倾情绘制,天野喜孝是日本知名画家,插画师,角色设计师,普任”最终幻想“系列多部作品的角色设计
|
|
|
|
|
+ </div> -->
|
|
|
|
|
+ <div class="page-title">作品描述</div>
|
|
|
|
|
+ <div class="page-text" v-html="info.detail"></div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="btn van-safe-area-bottom" ref="btn">
|
|
|
|
|
+ <div class="btns">
|
|
|
|
|
+ <van-button type="primary" block round @click="buy"
|
|
|
|
|
+ >立即购买</van-button
|
|
|
|
|
+ >
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <driver />
|
|
|
|
|
|
|
+ <!-- <driver /> -->
|
|
|
|
|
|
|
|
- <van-collapse v-model="activeName" accordion>
|
|
|
|
|
|
|
+ <!-- <van-collapse v-model="activeName" accordion>
|
|
|
<van-collapse-item title="交易记录" name="1">
|
|
<van-collapse-item title="交易记录" name="1">
|
|
|
<van-cell title="单元格" value="内容"> </van-cell>
|
|
<van-cell title="单元格" value="内容"> </van-cell>
|
|
|
</van-collapse-item>
|
|
</van-collapse-item>
|
|
|
- </van-collapse>
|
|
|
|
|
|
|
+ </van-collapse> -->
|
|
|
|
|
|
|
|
<driver />
|
|
<driver />
|
|
|
</div>
|
|
</div>
|
|
@@ -104,11 +102,92 @@ export default {
|
|
|
Swiper,
|
|
Swiper,
|
|
|
SwiperSlide,
|
|
SwiperSlide,
|
|
|
},
|
|
},
|
|
|
|
|
+ inject: ["bs"],
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
activeName: "1",
|
|
activeName: "1",
|
|
|
|
|
+ info: {},
|
|
|
|
|
+ liked: false,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ banners() {
|
|
|
|
|
+ return this.info.pics || [];
|
|
|
|
|
+ },
|
|
|
|
|
+ properties() {
|
|
|
|
|
+ return this.info.properties || [];
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ mounted() {
|
|
|
|
|
+ this.getProduct();
|
|
|
|
|
+ document.body.appendChild(this.$refs.btn);
|
|
|
|
|
+ },
|
|
|
|
|
+ unmounted() {
|
|
|
|
|
+ if (this.$refs.btn) {
|
|
|
|
|
+ document.body.removeChild(this.$refs.btn);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ getProduct() {
|
|
|
|
|
+ this.$toast.loading({
|
|
|
|
|
+ message: "加载中...",
|
|
|
|
|
+ forbidClick: true,
|
|
|
|
|
+ });
|
|
|
|
|
+ this.$http.get("/collection/get/" + this.$route.query.id).then((res) => {
|
|
|
|
|
+ this.info = res;
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.checkLike();
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.$toast.clear();
|
|
|
|
|
+ this.bs.value.refresh();
|
|
|
|
|
+ }, 500);
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ checkLike() {
|
|
|
|
|
+ if (!this.isLogin) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$http
|
|
|
|
|
+ .post(
|
|
|
|
|
+ "/like/all",
|
|
|
|
|
+ {
|
|
|
|
|
+ query: {
|
|
|
|
|
+ collectionId: this.info.id,
|
|
|
|
|
+ userId: this.$store.state.id,
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ { body: "json" }
|
|
|
|
|
+ )
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ this.liked = !res.empty;
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ likeProduct() {
|
|
|
|
|
+ if (!this.liked) {
|
|
|
|
|
+ this.$http.get(`/collection/${this.info.id}/like`).then(() => {
|
|
|
|
|
+ this.getProduct();
|
|
|
|
|
+ this.$toast.success("收藏成功");
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$http.get(`/collection/${this.info.id}/unlike`).then(() => {
|
|
|
|
|
+ this.getProduct();
|
|
|
|
|
+ this.$toast.success("取消收藏");
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ buy() {
|
|
|
|
|
+ this.checkLogin().then(() => {
|
|
|
|
|
+ this.$router.push({
|
|
|
|
|
+ path: "/submit",
|
|
|
|
|
+ query: {
|
|
|
|
|
+ id: this.$route.query.id,
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
@@ -117,13 +196,13 @@ export default {
|
|
|
padding-bottom: 100px;
|
|
padding-bottom: 100px;
|
|
|
}
|
|
}
|
|
|
.info {
|
|
.info {
|
|
|
- height: 164px;
|
|
|
|
|
|
|
+ // height: 164px;
|
|
|
background-color: @bg;
|
|
background-color: @bg;
|
|
|
border-radius: 20px 20px 0 0;
|
|
border-radius: 20px 20px 0 0;
|
|
|
transform: translateY(-16px);
|
|
transform: translateY(-16px);
|
|
|
position: relative;
|
|
position: relative;
|
|
|
z-index: 2;
|
|
z-index: 2;
|
|
|
- padding: 16px;
|
|
|
|
|
|
|
+ padding: 16px 16px 0;
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
|
|
|
|
|
.price {
|
|
.price {
|
|
@@ -250,6 +329,12 @@ export default {
|
|
|
}
|
|
}
|
|
|
.goods {
|
|
.goods {
|
|
|
padding: 20px 16px;
|
|
padding: 20px 16px;
|
|
|
|
|
+
|
|
|
|
|
+ .page-title {
|
|
|
|
|
+ &:not(:first-child) {
|
|
|
|
|
+ padding-top: 16px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.page-title {
|
|
.page-title {
|
|
@@ -259,7 +344,7 @@ export default {
|
|
|
line-height: 28px;
|
|
line-height: 28px;
|
|
|
}
|
|
}
|
|
|
.specific-list {
|
|
.specific-list {
|
|
|
- padding: 16px 0 32px;
|
|
|
|
|
|
|
+ padding: 16px 0;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
@@ -299,4 +384,22 @@ export default {
|
|
|
line-height: 28px;
|
|
line-height: 28px;
|
|
|
margin-top: 10px;
|
|
margin-top: 10px;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+.btn {
|
|
|
|
|
+ position: fixed;
|
|
|
|
|
+ z-index: 20;
|
|
|
|
|
+ bottom: 0;
|
|
|
|
|
+ left: 0;
|
|
|
|
|
+ right: 0;
|
|
|
|
|
+ background: #202122ee;
|
|
|
|
|
+ .btns {
|
|
|
|
|
+ padding: 6px 42px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .van-button {
|
|
|
|
|
+ background: linear-gradient(135deg, #fdfb60 0%, #ff8f3e 100%);
|
|
|
|
|
+ color: #333230;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ border-width: 0px;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|