import request from '@/utils/request'

export function allClothSpeed() {
  return request({
    url: '/mapi/cloth/speed/allSpeed',
    method: 'get',
  })
}

// 查询洗衣速度列表
export function listSpeed(query) {
  return request({
    url: '/mapi/cloth/speed/list',
    method: 'get',
    params: query
  })
}

// 查询洗衣速度详细
export function getSpeed(id) {
  return request({
    url: '/mapi/cloth/speed/' + id,
    method: 'get'
  })
}

// 新增洗衣速度
export function addSpeed(data) {
  return request({
    url: '/mapi/cloth/speed',
    method: 'post',
    data: data
  })
}

// 修改洗衣速度
export function updateSpeed(data) {
  return request({
    url: '/mapi/cloth/speed',
    method: 'put',
    data: data
  })
}

// 删除洗衣速度
export function delSpeed(id) {
  return request({
    url: '/mapi/cloth/speed/' + id,
    method: 'delete'
  })
}


// 修改洗衣速度状态
export function updateSpeedStatus(id,status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/mapi/cloth/speed/updateStatus',
    method: 'post',
    data: data
  })
}
