import request from '@/utils/request'

// 查询平台信息列表
export function listSitesInfo(query) {
  return request({
    url: '/tuya/sitesinfo/list',
    method: 'get',
    params: query
  })
}

// 查询平台信息详细
export function getSitesInfo(siteId) {
  return request({
    url: '/tuya/sitesinfo/' + siteId,
    method: 'get'
  })
}

// 新增平台信息
export function addSitesInfo(data) {
  return request({
    url: '/tuya/sitesinfo',
    method: 'post',
    data: data
  })
}

// 修改平台信息
export function updateSitesInfo(data) {
  return request({
    url: '/tuya/sitesinfo',
    method: 'put',
    data: data
  })
}

// 删除平台信息
export function delSitesInfo(siteId) {
  return request({
    url: '/tuya/sitesinfo/' + siteId,
    method: 'delete'
  })
}
// 上传图片
export function uploadAvatar(data) {
  return request({
    url: '/tuya/upload/uploadFile',
    method: 'post',
    timeout: 50000,
    data: data
  })
}


