// 上传请求
import { otherHttp } from '/@/utils/http/axios'

enum Api {
    list = '/farmbase/list',
    queryById = '/farmbase/queryById',
    deviceList = '/device/list',
    getDeviceTypeCount = '/device/getTypeCount',
}

export function list(params) {
    return otherHttp.get({
        url: Api.list,
        params,
    })
}

export function getFarmbaseInfoById(params: any = {}) {
    return otherHttp.get({
        url: Api.queryById,
        params,
    })
}

export function getDeviceList(params) {
    return otherHttp.get({
        url: Api.deviceList,
        params,
    })
}

export function getDeviceTypeCount(params) {
    return otherHttp.get({
        url: Api.getDeviceTypeCount,
        params,
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded',
        },
    })
}
