You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
721 B
TypeScript
25 lines
721 B
TypeScript
|
4 years ago
|
import { useAxios } from '@/hooks/web/useAxios'
|
||
|
|
import type { WorkplaceTotal, Project, Dynamic, Team, RadarData } from './types'
|
||
|
|
|
||
|
|
const { request } = useAxios()
|
||
|
|
|
||
|
|
export const getCountApi = () => {
|
||
|
|
return request<WorkplaceTotal>({ url: '/workplace/total', method: 'get' })
|
||
|
|
}
|
||
|
|
|
||
|
|
export const getProjectApi = () => {
|
||
|
|
return request<Project[]>({ url: '/workplace/project', method: 'get' })
|
||
|
|
}
|
||
|
|
|
||
|
|
export const getDynamicApi = () => {
|
||
|
|
return request<Dynamic[]>({ url: '/workplace/dynamic', method: 'get' })
|
||
|
|
}
|
||
|
|
|
||
|
|
export const getTeamApi = () => {
|
||
|
|
return request<Team[]>({ url: '/workplace/team', method: 'get' })
|
||
|
|
}
|
||
|
|
|
||
|
|
export const getRadarApi = () => {
|
||
|
|
return request<RadarData[]>({ url: '/workplace/radar', method: 'get' })
|
||
|
|
}
|