import request from '@/utils/request'
export function _getChannel(id) {
  return request({
    url: `/PublicChannel/GetChannel?id=${id}`,
    method: 'get'
  })
}

export function _queryPager(data) {
  return request({
    url: '/PublicChannel/QueryPager',
    method: 'post',
    timeout: 20 * 1000,
    data
  })
}

export function setEnabled(id, isEnabled) {
  return request({
    url: '/PublicChannel/SetEnabled',
    method: 'post',
    timeout: 20 * 1000,
    data: { id, isEnabled }
  })
}

export function save(data) {
  return request({
    url: '/PublicChannel/AddOrEdit',
    method: 'post',
    timeout: 20 * 1000,
    data: data
  })
}
