feat:完善首页功能

This commit is contained in:
zjc
2025-01-10 18:07:31 +08:00
parent 9ee304c8c2
commit 880db48579
18 changed files with 618 additions and 364 deletions

View File

@@ -186,7 +186,7 @@
<div class="box-1">
<Title3 title="购票来源" />
<div class="count">游客总数<countup :end-val="channelTotal" /></div>
<ticket />
<ticket :list="channelData" />
</div>
</div>
</div>
@@ -210,6 +210,7 @@
{ value: 0, name: '低感景区总数' }
]
})
// 景区购票数
const admission = computed(() => {
if (homeData.value) return homeData.value?.admission
return [
@@ -225,6 +226,11 @@
0
)
})
// 年龄占比
const channelData = computed(() => {
if (homeData.value) return homeData.value?.userPortrait.channel
return []
})
const channelTotal = computed(() => {
return homeData.value?.userPortrait?.channel.reduce(
(total, current) => Number(current.count) + total,