import request from '@/utils/request'

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

// 详情
export function detail(id) {
  return request({
    url: `/admin/maowang/choice/tBroadcast/queryPageById/${id}`,
    method: 'get'
  })
}

// 直播流列表
export function liveList(audioId){
  return request({
    url: `/admin/maowang/choice/tBroadcast/queryPageByAudioId/${audioId}`,
    method: 'get'
  })
}

// 新增 编辑
export function submit(data){
  return request({
    url: `/admin/maowang/choice/tBroadcast/addOrUpdate`,
    method: 'post',
    data
  })
}

// 上下架
export function change(ids, status){
  return request({
    url: `/admin/maowang/choice/tBroadcast/hitOrSold/${ids}/${status}`,
    method: 'get'
  })
}

// 删除
export function remove(ids) {
  return request({
    url: `/admin/maowang/choice/tBroadcast/remove/${ids}`,
    method: 'delete'
  })
}