import request from '@/utils/request'

// 智能排风远程开关
export function controlSocket(data) {
  const payload = {
    devEui: data.devEui,
    deviceId: data.deviceId,
    status: data.status
  }

  return request({
    url: '/worn/socket/control',
    method: 'post',
    params: payload,
    data: payload
  })
}

// 智慧照明开关远程控制
export function controlLightSwitch(data) {
  const payload = {
    devEui: data.devEui,
    channel: data.channel,
    status: data.status
  }

  return request({
    url: '/worn/socket/switch',
    method: 'post',
    params: payload,
    data: payload
  })
}
