| 12345678910111213141516171819202122232425 |
- // API List
- // /dashboard/shutdownStatistics/date - GET shutdown统计最新日期
- // /dashboard/shutdownStatistics - GET shutdown统计
- import http from '@/service/serverReq'
- import type { ShutdownStatisticsInfo } from './interface'
- const API_List = {
- shutdownStatisticsDate: '/dashboard/shutdownStatistics/date',
- shutdownStatistics: '/dashboard/shutdownStatistics',
- }
- // GET shutdown统计最新日期
- export const getShutdownStatisticsDate = async (): Promise<string> => {
- const res = await http.get<string>(API_List.shutdownStatisticsDate)
- return res
- }
- // GET shutdown统计
- export const getShutdownStatistics = async (date: string): Promise<ShutdownStatisticsInfo> => {
- const res = await http.get<ShutdownStatisticsInfo>(API_List.shutdownStatistics, {
- params: { date },
- })
- return res
- }
|