import { $postParam, $post } from "@/plugins/axios";

// 文档管理 ------------------->
export const courseDocumentListPage = (datas) => {
  return $postParam("/api/admin/mark/archive/document/list", datas);
};
// 文档管理-文档列表
export const documentListPage = (datas) => {
  return $postParam("/api/admin/mark/archive/document/detail", datas);
};
// 文档管理-文档下载
export const documentDownload = (id) => {
  return $postParam(
    "/api/admin/mark/archive/document/download",
    { id },
    {
      responseType: "blob",
    }
  );
};
// 文档管理-文档批量下载
export const documentBatchDownload = (datas) => {
  return $postParam("/api/admin/mark/archive/document/download_batch", datas, {
    responseType: "blob",
  });
};
// 文档管理-文档新建
export const documentSave = (datas) => {
  return $post("/api/admin/mark/archive/document/save", datas);
};
// 文档管理-文档删除
export const documentDelete = (id) => {
  return $postParam("/api/admin/mark/archive/document/delete", { id });
};
