import request from '@/utils/request'

// 查询主播列表
export function listLiveAnchor(query) {
  return request({
    url: '/live/liveAnchor/list',
    method: 'get',
    params: query
  })
}

// 查询主播详细
export function getLiveAnchor(anchorId) {
  return request({
    url: '/live/liveAnchor/' + anchorId,
    method: 'get'
  })
}

// 新增主播
export function addLiveAnchor(data) {
  return request({
    url: '/live/liveAnchor',
    method: 'post',
    data: data
  })
}

// 修改主播
export function updateLiveAnchor(data) {
  return request({
    url: '/live/liveAnchor',
    method: 'put',
    data: data
  })
}

// 删除主播
export function delLiveAnchor(anchorId) {
  return request({
    url: '/live/liveAnchor/' + anchorId,
    method: 'delete'
  })
}

// 导出主播
export function exportLiveAnchor(query) {
  return request({
    url: '/live/liveAnchor/export',
    method: 'get',
    params: query
  })
}
