|
|
@@ -11,28 +11,45 @@
|
|
|
<!-- <div class="card">33222</div> -->
|
|
|
|
|
|
<div class="introduce center-content">
|
|
|
- <div class="introduce2">
|
|
|
- <img class="img1" src="../assets/img/888.jpg" alt="" />
|
|
|
- <div>
|
|
|
- <div class="name">本期推荐:创作者姓名</div>
|
|
|
- <div class="name name1">作者简介</div>
|
|
|
- <div class="name2">
|
|
|
- 介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍
|
|
|
- 介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍介绍…
|
|
|
+ <router-link
|
|
|
+ class="introduce2"
|
|
|
+ :class="{ active: index === showCreator }"
|
|
|
+ v-for="(item, index) in creators"
|
|
|
+ :key="item.id"
|
|
|
+ :to="{
|
|
|
+ path: '/castingDetail',
|
|
|
+ query: {
|
|
|
+ id: item.id
|
|
|
+ }
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ class="introduce-content"
|
|
|
+ @mouseenter="(showCreator = index), (initChange = false)"
|
|
|
+ @mouseleave="initChange = true"
|
|
|
+ >
|
|
|
+ <el-image class="img1" :src="item.avatar" fit="cover" />
|
|
|
+ <div class="">
|
|
|
+ <div class="name">本期推荐:{{ item.nickname }}</div>
|
|
|
+ <div class="name name1">作者简介</div>
|
|
|
+ <div class="name2">
|
|
|
+ {{ item.intro || '该作者什么都没留下~' }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <img class="img2" src="../assets/img/888.jpg" alt="" />
|
|
|
- <img class="img2" src="../assets/img/888.jpg" alt="" />
|
|
|
- <img class="img2" src="../assets/img/888.jpg" alt="" />
|
|
|
+ </router-link>
|
|
|
</div>
|
|
|
- <div class="content center-content">
|
|
|
- <div class="hot">最HOT收藏品</div>
|
|
|
- <goods-info></goods-info>
|
|
|
- <div class="all all1">
|
|
|
- <img class="img1" src="../assets/img/icon_inter@3x.png" alt="" />
|
|
|
- <div class="name">查看更多</div>
|
|
|
- <img class="img1" src="../assets/img/icon_inter@3x (3).png" alt="" />
|
|
|
+ <div class="content">
|
|
|
+ <div class="center-content">
|
|
|
+ <div class="hot">最HOT收藏品</div>
|
|
|
+ <div class="list">
|
|
|
+ <collection-info
|
|
|
+ v-for="(item, index) in products"
|
|
|
+ :key="index"
|
|
|
+ :info.sync="products[index]"
|
|
|
+ ></collection-info>
|
|
|
+ </div>
|
|
|
+ <more-title path="/collection"></more-title>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="content1 center-content">
|
|
|
@@ -41,11 +58,7 @@
|
|
|
<img class="imgBox1" src="../assets/img/888.jpg" alt="" />
|
|
|
<img class="imgBox1" src="../assets/img/888.jpg" alt="" />
|
|
|
</div>
|
|
|
- <div class="all">
|
|
|
- <img class="img1" src="../assets/img/icon_inter@3x.png" alt="" />
|
|
|
- <div class="name">查看更多</div>
|
|
|
- <img class="img1" src="../assets/img/icon_inter@3x (3).png" alt="" />
|
|
|
- </div>
|
|
|
+ <more-title path="/collection"></more-title>
|
|
|
<div class="describe">
|
|
|
<div class="box">
|
|
|
<div class="box1">
|
|
|
@@ -96,26 +109,109 @@
|
|
|
<div class="words2">与收藏夹们共建链上游戏生态的数字现实时间</div>
|
|
|
</div>
|
|
|
<div class="border"></div>
|
|
|
- <div>
|
|
|
+ <div class="word-item">
|
|
|
<div class="words1 words3">此为,第九空间</div>
|
|
|
- <div class="th2">
|
|
|
- <img class="img1" src="../assets/img/icon_inter@3x.png" alt="" />
|
|
|
- <div class="name">了解更多</div>
|
|
|
- <img class="img1" src="../assets/img/icon_inter@3x (3).png" alt="" />
|
|
|
- </div>
|
|
|
+ <more-title>了解更多</more-title>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import CollectionInfo from '../components/CollectionInfo.vue';
|
|
|
import GoodsInfo from '../components/GoodsInfo.vue';
|
|
|
+import MoreTitle from '../components/MoreTitle.vue';
|
|
|
export default {
|
|
|
- components: { GoodsInfo },
|
|
|
+ components: { GoodsInfo, CollectionInfo, MoreTitle },
|
|
|
data() {
|
|
|
- return {};
|
|
|
+ return {
|
|
|
+ creators: [],
|
|
|
+ showCreator: 3,
|
|
|
+ initChange: true,
|
|
|
+ timer: null,
|
|
|
+ products: []
|
|
|
+ };
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.getCreators();
|
|
|
+ this.autoChange();
|
|
|
+ this.getProduct().then(res => {
|
|
|
+ this.products = res;
|
|
|
+ });
|
|
|
+
|
|
|
+ this.$http
|
|
|
+ .post(
|
|
|
+ '/banner/all',
|
|
|
+ {
|
|
|
+ query: {
|
|
|
+ type: 'HOME'
|
|
|
+ },
|
|
|
+ sort: 'createdAt,desc'
|
|
|
+ },
|
|
|
+ { body: 'json' }
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ this.banners = res.content;
|
|
|
+ })
|
|
|
},
|
|
|
- mounted() {}
|
|
|
+ methods: {
|
|
|
+ getCreators() {
|
|
|
+ this.$http
|
|
|
+ .post(
|
|
|
+ '/user/all',
|
|
|
+ {
|
|
|
+ page: 0,
|
|
|
+ query: { hasRole: 'ROLE_MINTER' },
|
|
|
+ size: 4,
|
|
|
+ sort: 'sales,desc'
|
|
|
+ },
|
|
|
+ { body: 'json' }
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ this.creators = res.content;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ autoChange() {
|
|
|
+ if (this.timer) {
|
|
|
+ clearTimeout(this.timer);
|
|
|
+ }
|
|
|
+ if (!this.initChange) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.showCreator = (this.showCreator + 1) % 4;
|
|
|
+ this.timer = setTimeout(this.autoChange, 3000);
|
|
|
+ },
|
|
|
+ getProduct(type = 'DEFAULT') {
|
|
|
+ return this.$http
|
|
|
+ .post(
|
|
|
+ '/collection/all',
|
|
|
+ {
|
|
|
+ page: 0,
|
|
|
+ size: 4,
|
|
|
+ query: {
|
|
|
+ type: type,
|
|
|
+ onShelf: true,
|
|
|
+ del: false
|
|
|
+ },
|
|
|
+ sort: 'createdAt,desc'
|
|
|
+ },
|
|
|
+ { body: 'json' }
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ return Promise.resolve(res.content);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ initChange() {
|
|
|
+ if (this.initChange) {
|
|
|
+ if (this.timer) {
|
|
|
+ clearTimeout(this.timer);
|
|
|
+ }
|
|
|
+ this.timer = setTimeout(this.autoChange, 3000);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
|
@@ -146,7 +242,7 @@ export default {
|
|
|
margin: 50px 0 0 10px;
|
|
|
position: relative;
|
|
|
font-size: 24px;
|
|
|
- color: #00ffcb;
|
|
|
+ color: @prim;
|
|
|
border: 1px solid;
|
|
|
border-radius: 8px;
|
|
|
background-image: linear-gradient(135deg, rgba(0, 255, 203, 1), rgba(0, 110, 255, 1)) 1 1;
|
|
|
@@ -156,16 +252,23 @@ export default {
|
|
|
.introduce {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
- height: 300px;
|
|
|
- .introduce2 {
|
|
|
- display: flex;
|
|
|
+ // justify-content: space-between;
|
|
|
+
|
|
|
+ .introduce-content {
|
|
|
+ display: inline-flex;
|
|
|
align-items: center;
|
|
|
+ height: 300px;
|
|
|
+ width: 220px;
|
|
|
+ cursor: pointer;
|
|
|
+ overflow: hidden;
|
|
|
+ transition: width ease-in-out 0.3s;
|
|
|
.img1 {
|
|
|
- width: 180px;
|
|
|
+ width: 220px;
|
|
|
height: 180px;
|
|
|
border-radius: 8px;
|
|
|
margin-right: 16px;
|
|
|
+ flex-shrink: 0;
|
|
|
+ transition: width ease-in-out 0.3s;
|
|
|
}
|
|
|
.name {
|
|
|
font-size: 16px;
|
|
|
@@ -187,12 +290,23 @@ export default {
|
|
|
text-overflow: ellipsis;
|
|
|
}
|
|
|
}
|
|
|
- .img2 {
|
|
|
- width: 220px;
|
|
|
- height: 180px;
|
|
|
- border-radius: 8px;
|
|
|
+ .introduce2 {
|
|
|
+ &.active {
|
|
|
+ .introduce-content {
|
|
|
+ width: 460px;
|
|
|
+ .img1 {
|
|
|
+ width: 180px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .introduce2 + .introduce2 {
|
|
|
margin-left: 30px;
|
|
|
}
|
|
|
+
|
|
|
+ .active + .introduce2 {
|
|
|
+ margin-left: 20px;
|
|
|
+ }
|
|
|
}
|
|
|
.content {
|
|
|
background: #0f1111;
|
|
|
@@ -222,6 +336,13 @@ export default {
|
|
|
color: #ffffff;
|
|
|
line-height: 24px;
|
|
|
margin: 0 10px;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+
|
|
|
+ &:hover {
|
|
|
+ .name {
|
|
|
+ animation-name: jello;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -269,21 +390,11 @@ export default {
|
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
|
.box {
|
|
|
- // .line();
|
|
|
+ .line();
|
|
|
width: 580px;
|
|
|
height: 114px;
|
|
|
- background: #0f1111;
|
|
|
- border-radius: 8px;
|
|
|
border: 1px solid;
|
|
|
margin-bottom: 30px;
|
|
|
- border-image: linear-gradient(
|
|
|
- 143deg,
|
|
|
- rgba(0, 255, 203, 0.6),
|
|
|
- rgba(0, 209, 220, 0.1),
|
|
|
- rgba(0, 151, 240, 0.1),
|
|
|
- rgba(0, 110, 255, 0.5)
|
|
|
- )
|
|
|
- 1 1;
|
|
|
.box1 {
|
|
|
margin: 30px 0 0 40px;
|
|
|
.text1 {
|
|
|
@@ -338,7 +449,7 @@ export default {
|
|
|
font-weight: 400;
|
|
|
color: #ffffff;
|
|
|
line-height: 25px;
|
|
|
- margin: 12px 0;
|
|
|
+ // margin: 12px 0;
|
|
|
&.words3 {
|
|
|
text-align: center;
|
|
|
}
|
|
|
@@ -349,6 +460,7 @@ export default {
|
|
|
font-weight: 400;
|
|
|
color: #939599;
|
|
|
line-height: 24px;
|
|
|
+ margin-top: 12px;
|
|
|
}
|
|
|
.th2 {
|
|
|
display: flex;
|
|
|
@@ -367,4 +479,16 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.list {
|
|
|
+ margin: -16px;
|
|
|
+ .collect {
|
|
|
+ margin: 16px;
|
|
|
+ }
|
|
|
+}
|
|
|
+.word-item {
|
|
|
+ .more {
|
|
|
+ padding: 0;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|