improvement(wrapped): 概览卡片补充年度新增好友统计

- 后端 Card#0 增加 addedFriends 字段(基于系统消息关键字 best-effort 识别新好友)

- 前端概览文案在 addedFriends>0 时展示新增好友数

- bump wrapped cache version,避免旧缓存导致字段缺失
This commit is contained in:
2977094657
2026-02-04 16:25:29 +08:00
parent 2f09aa3dcf
commit 94e6e89f35
3 changed files with 82 additions and 3 deletions

View File

@@ -18,6 +18,11 @@
在与你相伴的
<span class="wrapped-number text-[#07C160] font-semibold">{{ formatInt(activeDays) }}</span>
天里
<template v-if="addedFriends > 0">
你总共加了
<span class="wrapped-number text-[#07C160] font-semibold">{{ formatInt(addedFriends) }}</span>
位好友
</template>
<template v-if="mostActiveHour !== null && mostActiveWeekdayName">
你最常在 {{ mostActiveWeekdayName }}
<span class="wrapped-number text-[#07C160] font-semibold">{{ mostActiveHour }}</span>
@@ -116,6 +121,7 @@ const formatFloat = (n, digits = 1) => {
const totalMessages = computed(() => Number(props.card?.data?.totalMessages || 0))
const activeDays = computed(() => Number(props.card?.data?.activeDays || 0))
const addedFriends = computed(() => Number(props.card?.data?.addedFriends || 0))
const messagesPerDay = computed(() => Number(props.card?.data?.messagesPerDay || 0))
const mostActiveHour = computed(() => {