mirror of
https://github.com/LifeArchiveProject/WeChatDataAnalysis.git
synced 2026-02-19 14:20:51 +08:00
feat(wrapped-ui): 新增年度总结页面与热力图卡片
- 新增 /wrapped PPT 风格滑动浏览(封面 + 卡片页) - 新增 Card#1 组件与 24×7 周-小时热力图可视化 - 首页新增年度总结入口;useApi 增加 getWrappedAnnual;补充 wrapped 背景纹理
This commit is contained in:
@@ -311,6 +311,16 @@ export const useApi = () => {
|
||||
if (!exportId) throw new Error('Missing exportId')
|
||||
return await request(`/chat/exports/${encodeURIComponent(String(exportId))}`, { method: 'DELETE' })
|
||||
}
|
||||
|
||||
// WeChat Wrapped(年度总结)
|
||||
const getWrappedAnnual = async (params = {}) => {
|
||||
const query = new URLSearchParams()
|
||||
if (params && params.year != null) query.set('year', String(params.year))
|
||||
if (params && params.account) query.set('account', String(params.account))
|
||||
if (params && params.refresh != null) query.set('refresh', String(!!params.refresh))
|
||||
const url = '/wrapped/annual' + (query.toString() ? `?${query.toString()}` : '')
|
||||
return await request(url)
|
||||
}
|
||||
|
||||
return {
|
||||
detectWechat,
|
||||
@@ -339,6 +349,7 @@ export const useApi = () => {
|
||||
createChatExport,
|
||||
getChatExport,
|
||||
listChatExports,
|
||||
cancelChatExport
|
||||
cancelChatExport,
|
||||
getWrappedAnnual
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user