/** 登录接口 POST /api/login/account */
import { request } from 'umi';

export async function getMapList(body: any, options?: { [key: string]: any }) {
  return request<API.MapInfoRes>('/api/map/queryMapInfo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    ...(options || {}),
    data: body,
  });
}
export async function getBuildingList(body: any, options?: { [key: string]: any }) {
  //debugger;
  return request<API.BuildFloorList>('/api2/object/building/query', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    ...(options || {}),
    data: body,
  });
}
export async function getFloorList(body: any, options?: { [key: string]: any }) {
  // debugger;
  return request<API.BuildFloorList>('/api2/object/floor/query', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    ...(options || {}),
    data: body,
  });
}
export async function queryDeviceTimeManage(params: any, options?: { [key: string]: any }) {
  // debugger;  '/api3/duoduo-service/setup-service/deviceManage/queryDeviceTimeManage'
  return request<API.DeviceTimeType>('/api3/deviceManage/queryDeviceTimeManage', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
