import request from '@/utils/request'

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

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

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

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

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

// 批量上传歌曲
export function upload(data){
  return request({
    url: `/admin/program/batch/upload`,
    method: 'post',
    data
  })
}