import request from '@/config/axios'

// 查询知识库列表
export const getLibraryPage = (params) => {
  return request.get({ url: '/admin-api/crm/knowledge-lib/page', params })
}

// 查询知识库详情
export const getLibrary = (id) => {
  return request.get({ url: '/admin-api/crm/knowledge-lib/get?id=' + id })
}

// 新增知识库
export const createLibrary = (data) => {
  return request.post({ url: '/admin-api/crm/knowledge-lib/create', data })
}

// 修改知识库
export const updateLibrary = (data) => {
  return request.put({ url: '/admin-api/crm/knowledge-lib/update', data })
}

// 删除知识库
export const deleteLibrary = (id) => {
  return request.delete({ url: '/admin-api/crm/knowledge-lib/delete?id=' + id })
}
