import request from '@/utils/request'

// 查询平台下拉列表
export function selectsitelist() {
  return request({
    url: '/tuya/sitesinfo/selectlist',
    method: 'get'
  })
}
// 查询模块下拉列表
export function selectchannellist() {
  return request({
    url: '/tuya/channelinfo/selectlist',
    method: 'get'
  })
}
// 查询父级下拉列表
export function selectcategoryinfolist() {
  return request({
    url: '/tuya/categoryinfo/selectlist',
    method: 'get'
  })
}

// 查询栏目信息列表
export function listInfo(query) {
  return request({
    url: '/tuya/categoryinfo/list',
    method: 'get',
    params: query
  })
}

// 查询栏目信息详细
export function getInfo(categoryId) {
  return request({
    url: '/tuya/categoryinfo/' + categoryId,
    method: 'get'
  })
}

// 新增栏目信息
export function addInfo(data) {
  return request({
    url: '/tuya/categoryinfo',
    method: 'post',
    data: data
  })
}

// 修改栏目信息
export function updateInfo(data) {
  return request({
    url: '/tuya/categoryinfo',
    method: 'put',
    data: data
  })
}

// 删除栏目信息
export function delInfo(categoryId) {
  return request({
    url: '/tuya/categoryinfo/' + categoryId,
    method: 'delete'
  })
}
