/*
 * @Author: chris
 * @Date: 2025-09-05 11:34:53
 * @LastEditors: chris
 * @LastEditTime: 2025-12-03 15:18:14
 */
import request from "@/utils/request";

// 查询科普知识列表
export function listKnowledge(query) {
  return request({
    url: "/business/article/list",
    method: "get",
    params: query,
  });
}

// 查询科普知识详细
export function getKnowledge(id) {
  return request({
    url: "/business/article/" + id,
    method: "get",
  });
}

// 新增科普知识
export function addKnowledge(data) {
  return request({
    url: "/business/article",
    method: "post",
    data,
  });
}

// 修改科普知识
export function updateKnowledge(data) {
  return request({
    url: "/business/article",
    method: "put",
    data,
  });
}

// 删除科普知识
export function delKnowledge(id) {
  return request({
    url: "/business/article/" + id,
    method: "delete",
  });
}

// 导出科普知识数据
export function exportKnowledge(query) {
  return request({
    url: "/business/article/export",
    method: "post",
    params: query,
    responseType: "blob",
  });
}
