import request from '@/utils/request'

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

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

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

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

// 通过音频类型获取平台类型
export function audioType(data) {
  return request({
    url: `/admin/platform/getlistByAudioType`,
    method: 'post',
    data
  })
}

// 通过平台类型获取音频类型
export function platform(platfromId){
  return request({
    url: `/admin/platform/getlistByPlatfromId/${platfromId}`,
    method: 'get'
  })
}