feat: 适配访问趋势图表卡片

This commit is contained in:
2024-04-16 20:13:48 +08:00
parent dd971f75bc
commit 2e2927a189
7 changed files with 287 additions and 208 deletions

9
src/apis/common/home.ts Normal file
View File

@@ -0,0 +1,9 @@
import http from '@/utils/http'
import type * as Common from './type'
const BASE_URL = '/dashboard'
/** @desc 查询访问趋势 */
export function listAccessTrend(days: number) {
return http.get<Common.DashboardAccessTrendResp[]>(`${BASE_URL}/access/trend/${days}`)
}

View File

@@ -1,2 +1,3 @@
export * from './common'
export * from './captcha'
export * from './home'

View File

@@ -3,3 +3,10 @@ export interface ImageCaptchaResp {
uuid: string
img: string
}
/** 仪表盘访问趋势 */
export interface DashboardAccessTrendResp {
date: string
pvCount: number
ipCount: number
}