import request from '@/config/axios'

// 查询资源列表
export const getResourcePage = (params) => {
  return request.get({ url: '/admin-api/crm/knowledge-lib-info/page', params })
}

// 查询资源详情
export const getResource = (id) => {
  return request.get({ url: '/admin-api/crm/knowledge-lib-info/get?id=' + id })
}

// 新增资源
export const createResource = (data) => {
  return request.post({ url: '/admin-api/crm/knowledge-lib-info/create', data })
}

// 修改资源
export const updateResource = (data) => {
  return request.put({ url: '/admin-api/crm/knowledge-lib-info/update', data })
}

// 删除资源
export const deleteResource = (id) => {
  return request.delete({ url: '/admin-api/crm/knowledge-lib-info/delete?id=' + id })
}
