feat(usage): 使用记录改为按应用列表展示
跨天按开始时间倒序,每条记录显示应用图标、开始/结束精确到秒与用时。
This commit is contained in:
1 parent
7a83a2acb3
commit
134fb3dac7
4 files changed
+69
-140
No files matched your search
@@ -548,6 +548,7 @@ export interface UsageApp {
|
||||
export interface UsageSession {
|
||||
packageName: string
|
||||
appName?: string
|
||||
iconUrl?: string
|
||||
startTs: number | string
|
||||
endTs: number | string
|
||||
durationMs: number | string
|
||||
@@ -589,3 +590,9 @@ export const getUsageDays = (sn: string, days = 7) =>
|
||||
request<UsageDaily[]>({
|
||||
url: `/v1/client/sn/usage/days?${query({ sn, days })}`
|
||||
})
|
||||
|
||||
/** 应用使用记录(跨天,按开始时间倒序,含应用图标) */
|
||||
export const getUsageSessions = (sn: string, days = 7, limit = 200) =>
|
||||
request<UsageSession[]>({
|
||||
url: `/v1/client/sn/usage/sessions?${query({ sn, days, limit })}`
|
||||
})
|
||||
Reference in new issue
Block a user