import request from '@/utils/request'

// 查询期刊分类列表
export function listHomeCategory(query) {
  return request({
    url: '/his/homeCategory/list',
    method: 'get',
    params: query
  })
}

// 查询期刊分类详细
export function getHomeCategory(categoryId) {
  return request({
    url: '/his/homeCategory/' + categoryId,
    method: 'get'
  })
}

// 新增期刊分类
export function addHomeCategory(data) {
  return request({
    url: '/his/homeCategory',
    method: 'post',
    data: data
  })
}

// 修改期刊分类
export function updateHomeCategory(data) {
  return request({
    url: '/his/homeCategory',
    method: 'put',
    data: data
  })
}

// 删除期刊分类
export function delHomeCategory(categoryId) {
  return request({
    url: '/his/homeCategory/' + categoryId,
    method: 'delete'
  })
}

// 导出期刊分类
export function exportHomeCategory(query) {
  return request({
    url: '/his/homeCategory/export',
    method: 'get',
    params: query
  })
}

// 查询期刊分类列表(所有)
export function allListHomeCategory(query) {
  return request({
    url: '/his/homeCategory/allList',
    method: 'get',
    params: query
  })
}
