|
|
@@ -23,50 +23,120 @@
|
|
|
></van-image>
|
|
|
</div>
|
|
|
|
|
|
- <swiper pagination :space-between="16" class="mySwiper" :autoplay="{ delay: 3500 }" v-if="banners.length > 0">
|
|
|
- <swiper-slide v-for="item in banners" :key="item.id">
|
|
|
- <product-small :info="item"></product-small>
|
|
|
- </swiper-slide>
|
|
|
- </swiper>
|
|
|
+ <div class="card swiper-card">
|
|
|
+ <swiper
|
|
|
+ pagination
|
|
|
+ :space-between="16"
|
|
|
+ class="mySwiper"
|
|
|
+ :autoplay="{ delay: 3500 }"
|
|
|
+ v-if="banners.length > 0"
|
|
|
+ >
|
|
|
+ <swiper-slide v-for="item in banners" :key="item.id">
|
|
|
+ <product-small :info="item"></product-small>
|
|
|
+ </swiper-slide>
|
|
|
+ </swiper>
|
|
|
+ <van-grid :column-num="3" :border="false" class="top-grid">
|
|
|
+ <van-grid-item
|
|
|
+ url="https://yags.raex.vip/h5/home"
|
|
|
+ :icon="require('@assets/icon2.png')"
|
|
|
+ text="绿洲电竞链"
|
|
|
+ />
|
|
|
+ <van-grid-item @click="wait" :icon="require('@assets/icon1.png')" text="元宇宙农业" />
|
|
|
+ <van-grid-item
|
|
|
+ url="https://www.raex.vip/static/download_raex_space.html"
|
|
|
+ :icon="require('@assets/icon3.jpg')"
|
|
|
+ text="OASISMETA"
|
|
|
+ />
|
|
|
+ </van-grid>
|
|
|
+ <img src="@assets/topbg1.png" class="swiper-bg" alt="" />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="card news">
|
|
|
+ <div class="news-title" @click="$router.push('/newsList')">
|
|
|
+ <div class="news-left">
|
|
|
+ <div class="text1">绿洲头条新闻</div>
|
|
|
+ <div class="text2">快来了解绿洲宇宙新动态</div>
|
|
|
+ </div>
|
|
|
+ <img class="more" src="@assets/icon_inter.png" alt="" />
|
|
|
+ </div>
|
|
|
+ <news-record
|
|
|
+ v-for="(item, index) in news"
|
|
|
+ :key="index"
|
|
|
+ v-model:info="news[index].obj"
|
|
|
+ type="light"
|
|
|
+ ></news-record>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="card-list">
|
|
|
+ <div
|
|
|
+ class="card card-hot"
|
|
|
+ :style="{ order: index < 1 ? index + 1 : index + 2 }"
|
|
|
+ v-for="(item, index) in hots"
|
|
|
+ :key="index"
|
|
|
+ @click="goNext(item)"
|
|
|
+ >
|
|
|
+ <van-image :src="item.pic" fit="cover" width="100%" height="110vw" />
|
|
|
+ <div class="hot-top" v-if="index < 2">
|
|
|
+ <div class="text1">{{ item.name }}</div>
|
|
|
+ <div class="text2">{{ item.remark }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="hot-bottom" v-else>
|
|
|
+ <div class="text1">{{ item.name }}</div>
|
|
|
+ <div class="text2">{{ item.remark }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="card news" style="order: 2" v-if="hotUsers.length > 0">
|
|
|
+ <div class="news-title">
|
|
|
+ <div class="news-left">
|
|
|
+ <div class="text1">热力IP</div>
|
|
|
+ <div class="text2">一周最热IP排名</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="rank-list">
|
|
|
+ <swiper
|
|
|
+ class="rankSwiper"
|
|
|
+ @reachEnd="reachEnd"
|
|
|
+ @slidePrevTransitionStart="slidePrevTransitionStart"
|
|
|
+ direction="vertical"
|
|
|
+ slides-per-view="auto"
|
|
|
+ free-mode
|
|
|
+ >
|
|
|
+ <swiper-slide v-for="(item, index) in hotUsers" :key="index">
|
|
|
+ <rank-info :index="index" v-model:info="hotUsers[index]"></rank-info>
|
|
|
+ </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>
|
|
|
+ </div>
|
|
|
|
|
|
<!-- <div class="tabs" v-if="!empty">
|
|
|
<div class="tab" :class="{ active: active === 0 }" @click="active = 0">数字艺术品</div>
|
|
|
<div class="tab" :class="{ active: active === 1 }" @click="active = 1">产品新闻端</div>
|
|
|
</div> -->
|
|
|
|
|
|
- <div class="list-top">
|
|
|
+ <!-- <div class="list-top">
|
|
|
<van-badge :dot="isNewCollections" :offset="[-35, 15]">
|
|
|
<div class="text1" :class="{ active: active === 0 }" @click="changeActive(0)">数字文创</div>
|
|
|
</van-badge>
|
|
|
<van-badge :dot="isNewNews" :offset="[-35, 15]">
|
|
|
<div class="text1" :class="{ active: active === 1 }" @click="changeActive(1)">绿洲头条</div>
|
|
|
</van-badge>
|
|
|
+ </div> -->
|
|
|
+ <div class="listSwiper-title">往期数字艺术品</div>
|
|
|
+ <div class="listSwiper">
|
|
|
+ <product-large
|
|
|
+ v-for="(item, index) in products"
|
|
|
+ :key="index"
|
|
|
+ v-model:info="products[index].obj"
|
|
|
+ :type="item.type"
|
|
|
+ >
|
|
|
+ </product-large>
|
|
|
</div>
|
|
|
-
|
|
|
- <swiper class="listSwiper" autoHeight @swiper="setSwiperRef" @slideChange="changeSwiper">
|
|
|
- <swiper-slide>
|
|
|
- <product-large
|
|
|
- v-for="(item, index) in products"
|
|
|
- :key="index"
|
|
|
- v-model:info="products[index].obj"
|
|
|
- :type="item.type"
|
|
|
- ></product-large
|
|
|
- ></swiper-slide>
|
|
|
- <swiper-slide>
|
|
|
- <news-small
|
|
|
- v-for="(item, index) in news"
|
|
|
- :key="index"
|
|
|
- v-model:info="news[index].obj"
|
|
|
- type="light"
|
|
|
- ></news-small>
|
|
|
- <!-- <product-large
|
|
|
- v-for="(item, index) in news"
|
|
|
- :key="index"
|
|
|
- v-model:info="news[index].obj"
|
|
|
- :type="item.type"
|
|
|
- ></product-large> -->
|
|
|
- </swiper-slide>
|
|
|
- </swiper>
|
|
|
</van-pull-refresh>
|
|
|
<van-dialog v-model:show="riskShow" theme="round-button" className="risk">
|
|
|
<div class="risk-box">
|
|
|
@@ -105,6 +175,8 @@ import ProductSmall from '../components/product/productSmall.vue';
|
|
|
import { mapState } from 'vuex';
|
|
|
import NewsInfo from '../components/product/NewsInfo';
|
|
|
import NewsSmall from '../components/product/NewsSmall.vue';
|
|
|
+import NewsRecord from '../components/product/NewsRecord.vue';
|
|
|
+import RankInfo from '../components/creator/RankInfo.vue';
|
|
|
|
|
|
export default {
|
|
|
name: 'home',
|
|
|
@@ -115,7 +187,8 @@ export default {
|
|
|
SwiperSlide,
|
|
|
ProductLarge,
|
|
|
ProductSmall,
|
|
|
- NewsSmall
|
|
|
+ NewsRecord,
|
|
|
+ RankInfo
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['userInfo']),
|
|
|
@@ -147,6 +220,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
banners: [],
|
|
|
+ hots: [],
|
|
|
products: [],
|
|
|
active: 0,
|
|
|
news: [],
|
|
|
@@ -157,7 +231,9 @@ export default {
|
|
|
bgImg: '',
|
|
|
swiperRef: null,
|
|
|
scrollTop: 0,
|
|
|
- riskShow: false
|
|
|
+ riskShow: false,
|
|
|
+ hideMore: false,
|
|
|
+ hotUsers: []
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -169,15 +245,16 @@ export default {
|
|
|
this.showTips();
|
|
|
}, 500);
|
|
|
|
|
|
+ this.$http.get('/user/topTen').then(res => {
|
|
|
+ this.hotUsers = res;
|
|
|
+ });
|
|
|
+
|
|
|
this.$nextTick(() => {
|
|
|
this.$el.parentNode.childNodes[1].className = this.$el.parentNode.childNodes[1].className.replace(
|
|
|
/ bgBack/,
|
|
|
''
|
|
|
);
|
|
|
});
|
|
|
- // this.$http.get('sysConfig/get/home_bg').then(res => {
|
|
|
- // this.bgImg = res.value || '';
|
|
|
- // });
|
|
|
},
|
|
|
methods: {
|
|
|
changeSwiper() {
|
|
|
@@ -275,9 +352,11 @@ export default {
|
|
|
this.products = res.filter(item => {
|
|
|
return item.type === 'collection';
|
|
|
});
|
|
|
- this.news = res.filter(item => {
|
|
|
- return item.type === 'news';
|
|
|
- });
|
|
|
+ this.news = res
|
|
|
+ .filter(item => {
|
|
|
+ return item.type === 'news';
|
|
|
+ })
|
|
|
+ .slice(0, 4);
|
|
|
})
|
|
|
]).then(() => {
|
|
|
this.$toast.clear();
|
|
|
@@ -296,7 +375,7 @@ export default {
|
|
|
'/banner/all',
|
|
|
{
|
|
|
query: {
|
|
|
- type: 'HOME',
|
|
|
+ type: 'HOME,DISCOVER',
|
|
|
del: false
|
|
|
},
|
|
|
sort: 'sort,asc;createdAt,desc'
|
|
|
@@ -304,7 +383,12 @@ export default {
|
|
|
{ body: 'json' }
|
|
|
)
|
|
|
.then(res => {
|
|
|
- this.banners = res.content;
|
|
|
+ this.banners = res.content.filter(item => {
|
|
|
+ return item.type === 'HOME';
|
|
|
+ });
|
|
|
+ this.hots = res.content.filter(item => {
|
|
|
+ return item.type === 'DISCOVER';
|
|
|
+ });
|
|
|
if (this.swiperRef) {
|
|
|
this.swiperRef.update();
|
|
|
}
|
|
|
@@ -397,6 +481,14 @@ export default {
|
|
|
changeActive(active) {
|
|
|
this.active = active;
|
|
|
this.swiperRef.slideTo(active, 300);
|
|
|
+ },
|
|
|
+ reachEnd() {
|
|
|
+ this.hideMore = true;
|
|
|
+ },
|
|
|
+ slidePrevTransitionStart() {
|
|
|
+ if (this.hideMore) {
|
|
|
+ this.hideMore = false;
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
activated() {
|
|
|
@@ -466,19 +558,19 @@ export default {
|
|
|
// background-color: @bg3;
|
|
|
position: relative;
|
|
|
z-index: 1;
|
|
|
- background-color: #f5f7fa;
|
|
|
+ background-color: var(--bg);
|
|
|
padding-top: var(--safe-top);
|
|
|
}
|
|
|
|
|
|
::v-deep(.mySwiper) {
|
|
|
// height: 255px;
|
|
|
- padding: 16px 0;
|
|
|
- margin: 0 16px;
|
|
|
+ // padding: 16px 0;
|
|
|
box-sizing: border-box;
|
|
|
// padding-bottom: 35px;
|
|
|
+ border-radius: 16px 16px 0 0;
|
|
|
|
|
|
.swiper-pagination {
|
|
|
- bottom: 30px;
|
|
|
+ bottom: 15px;
|
|
|
}
|
|
|
|
|
|
.swiper-pagination-bullet {
|
|
|
@@ -509,17 +601,18 @@ export default {
|
|
|
.left {
|
|
|
flex-grow: 1;
|
|
|
.text1 {
|
|
|
- font-size: 12px;
|
|
|
+ font-size: 14px;
|
|
|
font-weight: bold;
|
|
|
- color: @text0;
|
|
|
+ color: #8a8a8e;
|
|
|
line-height: 24px;
|
|
|
}
|
|
|
.text2 {
|
|
|
- font-size: 24px;
|
|
|
+ font-size: 30px;
|
|
|
font-weight: bold;
|
|
|
- color: @text0;
|
|
|
- line-height: 32px;
|
|
|
- letter-spacing: 2px;
|
|
|
+ color: var(--text0);
|
|
|
+ line-height: 40px;
|
|
|
+ letter-spacing: 1px;
|
|
|
+ margin-top: 2px;
|
|
|
|
|
|
&.text3 {
|
|
|
letter-spacing: 0px;
|
|
|
@@ -662,4 +755,163 @@ export default {
|
|
|
border-radius: 8px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.card {
|
|
|
+ background: var(--bg2);
|
|
|
+ box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
|
|
|
+ border-radius: 16px;
|
|
|
+ margin: 16px 16px 0;
|
|
|
+ overflow: hidden;
|
|
|
+ &.news {
|
|
|
+ padding-bottom: 18px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.news-title {
|
|
|
+ padding: 14px 14px 16px 16px;
|
|
|
+ .flex();
|
|
|
+ .news-left {
|
|
|
+ flex-grow: 1;
|
|
|
+ .text1 {
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #8a8a8e;
|
|
|
+ line-height: 24px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .text2 {
|
|
|
+ font-size: 26px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: var(--text0);
|
|
|
+ line-height: 36px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .more {
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.rankSwiper {
|
|
|
+ height: 320px;
|
|
|
+ .swiper-slide {
|
|
|
+ height: 65px;
|
|
|
+ }
|
|
|
+ // overflow: auto;
|
|
|
+}
|
|
|
+
|
|
|
+.rank-list {
|
|
|
+ .rank-more {
|
|
|
+ .flex-col();
|
|
|
+ align-items: center;
|
|
|
+ padding-top: 10px;
|
|
|
+ .font_family {
|
|
|
+ color: var(--text1);
|
|
|
+ }
|
|
|
+ div {
|
|
|
+ font-size: 12px;
|
|
|
+ color: var(--text1);
|
|
|
+ line-height: 10px;
|
|
|
+ margin-top: 4px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.card-hot {
|
|
|
+ position: relative;
|
|
|
+ .van-image {
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ .hot-top {
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ .flex-col();
|
|
|
+ flex-direction: column-reverse;
|
|
|
+ padding: 14px 16px;
|
|
|
+ .text1 {
|
|
|
+ font-size: 24px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #ffffff;
|
|
|
+ line-height: 24px;
|
|
|
+ margin-top: 6px;
|
|
|
+ }
|
|
|
+ .text2 {
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #ffffff99;
|
|
|
+ line-height: 24px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .hot-bottom {
|
|
|
+ position: absolute;
|
|
|
+ top: calc(110vw - 128px);
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ border-radius: 0 0 16px 16px;
|
|
|
+ overflow: hidden;
|
|
|
+
|
|
|
+ .text2 {
|
|
|
+ line-height: 64px;
|
|
|
+ height: 64px;
|
|
|
+ backdrop-filter: blur(10px);
|
|
|
+ font-size: 14px;
|
|
|
+ color: #ffffff;
|
|
|
+ padding: 0 20px;
|
|
|
+ border-radius: 0 0 16px 16px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .text1 {
|
|
|
+ font-size: 24px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #ffffff;
|
|
|
+ line-height: 24px;
|
|
|
+ padding: 20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.card-list {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+}
|
|
|
+.listSwiper-title {
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: var(--text0);
|
|
|
+ line-height: 24px;
|
|
|
+ border-top: 1px solid var(--border);
|
|
|
+ padding: 19px 0 8px;
|
|
|
+ margin: 20px 16px 0;
|
|
|
+}
|
|
|
+
|
|
|
+.top-grid {
|
|
|
+ --van-grid-item-icon-size: 56px;
|
|
|
+ --van-grid-item-text-color: var(--text0);
|
|
|
+ --van-grid-item-text-font-size: 12px;
|
|
|
+ --van-grid-item-content-padding: 10px 8px 9px;
|
|
|
+ /deep/.van-grid-item__icon + .van-grid-item__text {
|
|
|
+ margin-top: 6px;
|
|
|
+ }
|
|
|
+ /deep/.van-grid-item__icon {
|
|
|
+ border-radius: 12px;
|
|
|
+ overflow: hidden;
|
|
|
+ }
|
|
|
+}
|
|
|
+.swiper-card {
|
|
|
+ position: relative;
|
|
|
+ .swiper-bg {
|
|
|
+ width: 100%;
|
|
|
+ display: block;
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ bottom: 0;
|
|
|
+ z-index: 0;
|
|
|
+ }
|
|
|
+ .van-grid {
|
|
|
+ z-index: 1;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|