feat: 重构仪表盘逻辑,整合管理员仪表盘API,移除冗余代码,优化数据加载和状态管理
This commit is contained in:
12
src/api/admin-dashboard.ts
Normal file
12
src/api/admin-dashboard.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { adminRequest } from "@/lib/admin-http";
|
||||
|
||||
import { API_V1_PREFIX } from "./paths";
|
||||
|
||||
import type { AdminDashboardData } from "@/types/api/admin-dashboard";
|
||||
|
||||
const A = `${API_V1_PREFIX}/admin`;
|
||||
|
||||
/** 首页仪表盘聚合(大厅 + 当期财务/风控/异常转账等,按账号权限填充各块) */
|
||||
export async function getAdminDashboard(): Promise<AdminDashboardData> {
|
||||
return adminRequest.get<AdminDashboardData>(`${A}/dashboard`);
|
||||
}
|
||||
Reference in New Issue
Block a user