import request from '@/utils/request'

// 分页查询资讯
export const goodsPageList = (query) => {
  return request({
    url: '/goods/performInfo/pageList',
    method: 'get',
    params: query
  })
}

// id节目详情
export function getSelectById(id) {
  return request({
    url: '/goods/performInfo/selectById?id=' + id,
    method: 'get'
  })
}

// 添加修改节目
export const saveAndEdit = (data) => {
  return request({
    url: '/goods/performInfo/insertOrUpdate',
    method: 'post',
    data: data
  })
}

// 节目上下线
export const online = (data) => {
  return request({
    url: '/goods/performInfo/online',
    method: 'post',
    data: data
  })
}

// 删除模板
export const deleteById = (id) => {
  return request({
    url: '/goods/performInfo/deleteById',
    method: 'delete',
    params: {id:id}
  })
}
