import request from '@/utils/request'

// 刷新物联网设备信息
export function refreshIot(deviceId, onlineType) {
  return request({
    url: `/bst/device/iot/${deviceId}/refreshIot`,
    method: 'get',
    timeout: 20000,
    params: {
      onlineType
    }
  })
}

// 设备开关
export function switchDevice(deviceId, open) {
  return request({
    url: `/bst/device/iot/${deviceId}/switch?open=${open}`,
    method: 'put'
  })
}
