feat(dashboard): CollectionMatrix 容器 + TopFiveAssets
This commit is contained in:
parent
537b6fbc24
commit
e2555dc015
40
frontend/pages/dashboard/components/CollectionMatrix.vue
Normal file
40
frontend/pages/dashboard/components/CollectionMatrix.vue
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<template>
|
||||||
|
<view class="collection-matrix">
|
||||||
|
<text class="section-title">藏品矩阵</text>
|
||||||
|
|
||||||
|
<!-- TOP 5 -->
|
||||||
|
<TopFiveAssets :items="topFive || []" />
|
||||||
|
|
||||||
|
<!-- 后续 Task 11/12 在此追加 LevelDistribution / UpcomingUpgrades / RecentUpgrades -->
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import TopFiveAssets from './TopFiveAssets.vue'
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
topFive: { type: Array, default: () => [] },
|
||||||
|
levels: { type: Array, default: () => [] },
|
||||||
|
upgrades: { type: Object, default: () => ({ upcoming: [], recent: [] }) },
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.collection-matrix {
|
||||||
|
background: rgba(255, 255, 255, 0.12);
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
|
border-radius: 22rpx;
|
||||||
|
padding: 24rpx;
|
||||||
|
margin: 24rpx 0;
|
||||||
|
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-title {
|
||||||
|
display: block;
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #ffffff;
|
||||||
|
margin-bottom: 24rpx;
|
||||||
|
text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
111
frontend/pages/dashboard/components/TopFiveAssets.vue
Normal file
111
frontend/pages/dashboard/components/TopFiveAssets.vue
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
<template>
|
||||||
|
<view class="top-five-card">
|
||||||
|
<text class="card-title">历史藏品收益 TOP 5</text>
|
||||||
|
<view v-if="!items || items.length === 0" class="empty-row">
|
||||||
|
<text class="empty-text">暂无数据</text>
|
||||||
|
</view>
|
||||||
|
<view v-else class="top-five-row">
|
||||||
|
<view
|
||||||
|
v-for="item in items"
|
||||||
|
:key="item.asset_id"
|
||||||
|
class="top-cell"
|
||||||
|
>
|
||||||
|
<view class="top-thumb" :class="`top-grad-${item.rank}`">
|
||||||
|
<text class="top-emoji">🏆</text>
|
||||||
|
</view>
|
||||||
|
<view class="top-badge" :class="`top-badge-${item.rank}`">
|
||||||
|
<text class="top-badge-text">TOP {{ item.rank }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
defineProps({
|
||||||
|
items: { type: Array, default: () => [] }, // TopAssetItem[]
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.top-five-card {
|
||||||
|
background: rgba(255, 255, 255, 0.1);
|
||||||
|
border-radius: 17rpx;
|
||||||
|
padding: 20rpx;
|
||||||
|
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-title {
|
||||||
|
display: block;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #ffffff;
|
||||||
|
margin-bottom: 16rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-five-row {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 8rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-cell {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-thumb {
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-bottom: 8rpx;
|
||||||
|
box-shadow: 0 0 12px rgba(255, 200, 100, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-grad-1 { background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%); }
|
||||||
|
.top-grad-2 { background: linear-gradient(135deg, #C0C0C0 0%, #808080 100%); }
|
||||||
|
.top-grad-3 { background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%); }
|
||||||
|
.top-grad-4 { background: linear-gradient(135deg, #B17BFF 0%, #FF8FE6 100%); }
|
||||||
|
.top-grad-5 { background: linear-gradient(135deg, #5EDFFF 0%, #6FA9FF 100%); }
|
||||||
|
|
||||||
|
.top-emoji {
|
||||||
|
font-size: 48rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-badge {
|
||||||
|
padding: 4rpx 12rpx;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
opacity: 0.85;
|
||||||
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-badge-1 { background: linear-gradient(90deg, #FFD700 0%, #FFA500 100%); }
|
||||||
|
.top-badge-2 { background: linear-gradient(90deg, #C0C0C0 0%, #808080 100%); }
|
||||||
|
.top-badge-3 { background: linear-gradient(90deg, #CD7F32 0%, #8B4513 100%); }
|
||||||
|
.top-badge-4 { background: linear-gradient(90deg, #B17BFF 0%, #FF8FE6 100%); }
|
||||||
|
.top-badge-5 { background: linear-gradient(90deg, #5EDFFF 0%, #6FA9FF 100%); }
|
||||||
|
|
||||||
|
.top-badge-text {
|
||||||
|
font-size: 18rpx;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #ffffff;
|
||||||
|
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-row {
|
||||||
|
height: 120rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-text {
|
||||||
|
color: rgba(255, 255, 255, 0.5);
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -32,6 +32,11 @@
|
|||||||
:error="error.likeIncome"
|
:error="error.likeIncome"
|
||||||
@retry="refresh('likeIncome')"
|
@retry="refresh('likeIncome')"
|
||||||
/>
|
/>
|
||||||
|
<CollectionMatrix
|
||||||
|
:top-five="data.topAssets?.items || []"
|
||||||
|
:levels="data.levels?.items || []"
|
||||||
|
:upgrades="data.upgrades || { upcoming: [], recent: [] }"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- Tab 2: 赛季总览(占位) -->
|
<!-- Tab 2: 赛季总览(占位) -->
|
||||||
@ -52,6 +57,7 @@ import CrystalOverview from './components/CrystalOverview.vue'
|
|||||||
import IncomeCurve from './components/IncomeCurve.vue'
|
import IncomeCurve from './components/IncomeCurve.vue'
|
||||||
import ExhibitionCenter from './components/ExhibitionCenter.vue'
|
import ExhibitionCenter from './components/ExhibitionCenter.vue'
|
||||||
import LikeIncomeBoard from './components/LikeIncomeBoard.vue'
|
import LikeIncomeBoard from './components/LikeIncomeBoard.vue'
|
||||||
|
import CollectionMatrix from './components/CollectionMatrix.vue'
|
||||||
import { useDashboardData } from '@/composables/useDashboardData'
|
import { useDashboardData } from '@/composables/useDashboardData'
|
||||||
|
|
||||||
const pageBg = 'linear-gradient(153deg, #FF9597 0%, #80DFFF 33%, #B8B8B8 74%, #D9D9D9 100%)'
|
const pageBg = 'linear-gradient(153deg, #FF9597 0%, #80DFFF 33%, #B8B8B8 74%, #D9D9D9 100%)'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user