import request from '@/utils/request'

/**
 * 书籍管理
 */


export function booksCategory(params) {
  return request({
    url: '/category/index', // 书源分类
    method: 'get',
    params: params
  })
}
export function booksSource(params) {
  return request({
    url: '/platform/index', // 书源
    method: 'get',
    params: params
  })
}

export function getBooksList(params) {
  return request({
    url: '/book/index', // 书籍列表
    method: 'get',
    params: params
  })
}

export function updateBooks(id, params) {
  return request({
    url: `/book/update/${id}`, // 编辑书籍
    method: 'put',
    params: params
  })
}

export function deleteBooks(id) {
  return request({
    url: `/book/delete/${id}`, // 删除书籍
    method: 'delete'
  })
}

