import request from '@/utils/request'

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

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

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

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

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

// 解除关联
export function relieve(data){
  return request({
    url: `/admin/podcast/manmage/relieve`,
    method: 'post',
    data
  })
}

// 关联节目
export function checkList(data){
  return request({
    url: `/admin/podcastProgram/podcastQueryLinklist`,
    method: 'post',
    data
  })
}