import request from '@/utils/request'

// 列表
export function list(data) {
  return request({
    url: `/admin/podcaster/manage/list`,
    method: 'post',
    data
  })
}

// 详情
export function detail(id) {
  return request({
    url: `/admin/podcaster/manage/queryById/${id}`,
    method: 'get'
  })
}

// 新增
export function submit(data) {
  return request({
    url: `/admin/podcaster/manage/addOrUpdate`,
    method: 'post',
    data
  })
}

// 上下架
export function change(id, status) {
  return request({
    url: `/admin/podcaster/manage/hitOrSold/${id}/${status}`,
    method: 'get'
  })
}

// 删除
export function remove(id) {
  return request({
    url: `/admin/podcaster/manage/remove/${id}`,
    method: 'delete'
  })
}

// 查询主播
export function selectAnchor(name) {
  return request({
    url: `/admin/podcaster/manage/querySingerlistByName/${name}`,
    method: 'get'
  })
}
