import request from '@/utils/request'

export function fetchList(query) {
    return request({
        url: '/ncjtEntranceGuard/getDevicePageList',
        method: 'get',
        params: query
    })
}

export function checkPowers(query) {
    return request({
        url: '/ncjtEntranceGuard/getDeviceIdentityById',
        method: 'post',
        params: query
    })
}

export function bindPowers(data) {
    return request({
        url: '/ncjtEntranceGuard/bindDeviceWithIdentityIds',
        method: 'post',
        data
    })
}

export function deletePowers(data) {
    return request({
        url: '/ncjtEntranceGuard/unbindDeviceWithIdentityIds',
        method: 'post',
        data
    })
}

export function searchList(query) {
    return request({
        url: '/ncjtEntranceGuard/getDevicePageListByParams',
        method: 'post',
        params: query
    })
}
