import request, { postBlob, getBlob, handleImport } from "@/utils/request";

export function adminWebsitList(data) {
  return request({
    url: `/admin/websit/list?moduleId=${data.moduleId}`,
    method: "post",
    data,
  });
}

export function adminWebsitListExport(data, name) {
  return postBlob({
    url: "/admin/websit/list/export",
    data,
    name,
  });
}

export function adminWebsitImport(data) {
  return handleImport("/admin/websit/import", data.formdata, data.id || "");
}

export function adminWebsitAdd(data) {
  return request({
    url: `/admin/websit/add`,
    method: "post",
    data,
  });
}

export function adminWebsitUpdate(data) {
  return request({
    url: `/admin/websit/update`,
    method: "post",
    data,
  });
}

export function adminWebsitDetail(params) {
  return request({
    url: `/admin/websit/detail`,
    method: "get",
    params,
  });
}

export function adminWebsitDelete(params) {
  return request({
    url: `/admin/websit/delete`,
    method: "post",
    params,
  });
}
