|
|
@@ -85,7 +85,7 @@
|
|
|
<div class="text2">{{ item.remark }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="card news" style="order: 2">
|
|
|
+ <div class="card news" style="order: 2" v-if="HotCollects.length > 0">
|
|
|
<div class="news-title">
|
|
|
<div class="news-left">
|
|
|
<div class="text1">热力IP</div>
|
|
|
@@ -101,11 +101,16 @@
|
|
|
slides-per-view="auto"
|
|
|
free-mode
|
|
|
>
|
|
|
- <swiper-slide v-for="(item, index) in hotUsers" :key="index">
|
|
|
+ <swiper-slide v-for="(item, index) in HotCollects" :key="index">
|
|
|
<!-- <rank-info :index="index" v-model:info="hotUsers[index]"></rank-info> -->
|
|
|
- <hot-collect :index="index" v-model:info="hotUsers[index]"></hot-collect>
|
|
|
+ <hot-collect :index="index" :info="item"></hot-collect>
|
|
|
</swiper-slide>
|
|
|
</swiper>
|
|
|
+
|
|
|
+ <div class="rank-more" :style="{ visibility: hideMore ? 'hidden' : 'visible' }">
|
|
|
+ <van-icon name="icon-a-iconarrowdown1" class-prefix="font_family" />
|
|
|
+ <div>上滑显示更多</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -248,7 +253,8 @@ export default {
|
|
|
scrollTop: 0,
|
|
|
riskShow: false,
|
|
|
hideMore: false,
|
|
|
- hotUsers: []
|
|
|
+ hotUsers: [],
|
|
|
+ HotCollects: []
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -357,7 +363,7 @@ export default {
|
|
|
message: '加载中...',
|
|
|
forbidClick: true
|
|
|
});
|
|
|
- return Promise.all([this.getBanner(), this.getProduct(), this.getHot()]).then(() => {
|
|
|
+ return Promise.all([this.getBanner(), this.getProduct(), this.getHot(), this.getTop()]).then(() => {
|
|
|
this.$toast.clear();
|
|
|
return Promise.resolve();
|
|
|
});
|
|
|
@@ -369,6 +375,12 @@ export default {
|
|
|
return Promise.resolve();
|
|
|
});
|
|
|
},
|
|
|
+ getTop() {
|
|
|
+ return this.$http.get('/asset/topTen').then(res => {
|
|
|
+ this.HotCollects = res;
|
|
|
+ return Promise.resolve();
|
|
|
+ });
|
|
|
+ },
|
|
|
getProduct() {
|
|
|
return this.$http.get('/collection/recommend').then(res => {
|
|
|
this.products = res.filter(item => {
|
|
|
@@ -812,9 +824,21 @@ export default {
|
|
|
}
|
|
|
|
|
|
.rankSwiper {
|
|
|
- height: 320px;
|
|
|
+ height: 350px;
|
|
|
.swiper-slide {
|
|
|
- height: 65px;
|
|
|
+ height: 70px;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ .swiper-slide + .swiper-slide {
|
|
|
+ &::before {
|
|
|
+ content: '';
|
|
|
+ height: 1px;
|
|
|
+ background: #f5f7fa;
|
|
|
+ left: 74px;
|
|
|
+ right: 16px;
|
|
|
+ top: 0;
|
|
|
+ position: absolute;
|
|
|
+ }
|
|
|
}
|
|
|
// overflow: auto;
|
|
|
}
|