index.ts
824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { DeviceInfoItemType, DeviceTypeItem } from './model';
import { TBPaginationResult } from '/#/axios';
import { defHttp } from '/@/utils/http/axios';
enum Api {
GET_DEVICE_INFOS = '/tenant/deviceInfos',
GET_DEVICE_TYPE = '/device/types',
TENANT_QUEUE = '/tenant/queues',
}
export const getDeviceInfos = () => {
return defHttp.get<TBPaginationResult<DeviceInfoItemType>>(
{
url: Api.GET_DEVICE_INFOS,
},
{ joinPrefix: false }
);
};
export const getDeviceTypes = () => {
return defHttp.get<TBPaginationResult<DeviceTypeItem[]>>(
{
url: Api.GET_DEVICE_TYPE,
},
{ joinPrefix: false }
);
};
export const getTenantQueue = (params: Recordable) => {
return defHttp.get<string[]>(
{
url: Api.TENANT_QUEUE,
params,
},
{ joinPrefix: false }
);
};