import request from '@/core/utils/request'

// 创建
export function create (data) {
  return request.post('/cms/res/create', data)
}

// 根据ID删除
export function deleteById (id) {
  return request.get(`/cms/res/delete/${id}`)
}

// 批量删除
export function deleteByIdInBatch (ids) {
  return request.get('/cms/res/delete/batch', {
    params: {
      ids
    }
  })
}

// 根据ID修改
export function updateById (data) {
  return request.post('/cms/res/updateById', data)
}

// 修改状态
export function updateStatus (data) {
  return request.post('/cms/res/updateStatus', data)
}

// 分页查询
export function fetchPage (data) {
  return request.post('/cms/res/page', data)
}
