// 导入二次封装axios
import koi from "@/utils/axios.ts";

// 统一管理接口
enum API {
  //类型接口
  LOGIN="/api/admin/login/login",
  LIST = "/api/admin/type/index ",
  ADD = "/api/admin/type/add",
  UPDATE = "/api/admin/type/update",
  DEL = "/api/admin/type/del",
  //新增报纸
  BMADD = "/api/admin/bm/add",
  //报纸列表
  BMList = "/api/admin/bm/index",
  //报纸 下 的版面
  BMListNEXT = "/api/admin/bm/bm",
  //版面下面的文章
  BMLISTNEWS = "/api/admin/bm/news",
  DATEUPDATE = "/api/admin/date/update",
  BMUPDATE = "/api/admin/bm/update",
  DATEDEL = "/api/admin/date/del",
  BMDEL = "/api/admin/bm/del",
  NEWSDEL= "/api/admin/news/del",
  BMINFO="/api/admin/bm/find",
  NEWSADD="/api/admin/news/add",
  NEWSUPDATE="/api/admin/news/update",
  BMONEADD="/api/admin/bm/addfind",
  NEWSINFO="/api/admin/news/find",
  //知识库
  KNOWLEDGE="/api/admin/zsk/index",
  KNOWLEDGEADD="/api/admin/zsk/add",
  KNOWLEDGEUPDATE="/api/admin/zsk/update",
  KNOWLEDGEDEL="/api/admin/zsk/del",
  GETMP3="/api/admin/scheduled_tasks/generateRecording"
}
export const Login = (data: any) => {
  return koi.post(API.LOGIN, data);
};
// 根据ID进行查询
export const getList = (data: any) => {
  return koi.post(API.LIST, data);
};

// 根据ID进行修改
export const add = (data: any) => {
  return koi.post(API.ADD, data);
};
// 根据ID进行修改
export const update = (data: any) => {
  return koi.post(API.UPDATE, data);
};
// 根据ID进行修改
export const del = (data: any) => {
  return koi.post(API.DEL, data);
};
export const bmAdd = (data: any) => {
  return koi.post(API.BMADD, data);
};
export const bmList = (data: any) => {
  return koi.post(API.BMList, data);
};
export const bmListNext = (data: any) => {
  return koi.post(API.BMListNEXT, data);
};
export const bmListNews = (data: any) => {
  return koi.post(API.BMLISTNEWS, data);
};

export const dateUpdate = (data: any) => {
  return koi.post(API.DATEUPDATE, data);
};
export const bmUpdate = (data: any) => {
  return koi.post(API.BMUPDATE, data);
};
export const dateDel = (data: any) => {
  return koi.post(API.DATEDEL, data);
};
export const bmDel = (data: any) => {
  return koi.post(API.BMDEL, data);
};
export const newsDel = (data: any) => {
  return koi.post(API.NEWSDEL, data);
};
export const bmInfo = (data: any) => {
  return koi.post(API.BMINFO, data);
};
export const newsAdd = (data: any) => {
  return koi.post(API.NEWSADD, data);
};
export const newsUpdate = (data: any) => {
  return koi.post(API.NEWSUPDATE, data);
};
export const newsInfo = (data: any) => {
  return koi.post(API.NEWSINFO, data);
};
export const bmOneAdd = (data: any) => {
  return koi.post(API.BMONEADD, data);
};
export const knowledge = (data: any) => {
  return koi.post(API.KNOWLEDGE, data);
};
export const knowledgeAdd = (data: any) => {
  return koi.post(API.KNOWLEDGEADD, data);
};
export const knowledgeUpdate = (data: any) => {
  return koi.post(API.KNOWLEDGEUPDATE, data);
};
export const knowledgeDel = (data: any) => {
  return koi.post(API.KNOWLEDGEDEL, data);
};
export const getMp3 = (data: any) => {
  return koi.post(API.GETMP3, data);
};


