feat: 完善仪表盘访客地域分布区块内容

This commit is contained in:
2023-09-09 15:09:05 +08:00
parent 83b2e2a7c0
commit dc1691f019
19 changed files with 253 additions and 140 deletions

View File

@@ -16,6 +16,11 @@ export interface DashboardPopularModuleRecord {
newPvFromYesterday: number;
}
export interface DashboardGeoDistributionRecord {
locations: string[];
locationIpStatistics: [];
}
export interface DashboardAnnouncementRecord {
id: string;
title: string;
@@ -32,6 +37,12 @@ export function listPopularModule() {
);
}
export function getGeoDistribution() {
return axios.get<DashboardGeoDistributionRecord>(
`${BASE_URL}/geo/distribution`
);
}
export function listAnnouncement() {
return axios.get<DashboardAnnouncementRecord[]>(`${BASE_URL}/announcement`);
}
@@ -43,15 +54,4 @@ export interface ContentDataRecord {
export function queryContentData() {
return axios.get<ContentDataRecord[]>('/api/content-data');
}
export interface PopularRecord {
key: number;
clickNumber: string;
title: string;
increases: number;
}
export function queryPopularList(params: { type: string }) {
return axios.get<TableData[]>('/api/popular/list', { params });
}
}