import { httpApp } from "@/plugins/axiosIndex";
// import { object2QueryString } from "@/utils/utils";
// import { pickBy } from "lodash-es";

// black-list
export function searchBlackList(datas) {
  return httpApp.post("/api/admin/black/list/select", {}, { params: datas });
}
export function saveBlackItem(datas) {
  return httpApp.post("/api/admin/black/list/save", datas);
}
export function deleteBlackItem(id) {
  return httpApp.post("/api/admin/black/list/delete", {}, { params: { id } });
}
// system-notice
export function searchSystemNoice(datas) {
  return httpApp.post("/api/admin/notify/select", {}, { params: datas });
}
export function saveSystemNotice(datas) {
  return httpApp.post("/api/admin/notify/save", datas);
}
export function enableSystemNotice({ id, enable }) {
  return httpApp.post(
    "/api/admin/notify/enable",
    {},
    { params: { id, enable } }
  );
}
// export function deleteSystemNotice(id) {
//   return httpApp.post("/api/admin/black/delete", { id });
// }

// data-statistics
export function sysStatisticsData() {
  return httpApp.post("/api/admin/sys/data_count", {});
}

// system-config
export function searchSystemConfig(datas) {
  return httpApp.post("/api/admin/sys/config/select", {}, { params: datas });
}
export function saveSystemConfig(datas) {
  return httpApp.post("/api/admin/sys/config/save", datas);
}
export function enableSystemConfig({ id, enable }) {
  return httpApp.post(
    "/api/admin/sys/config/enable",
    {},
    { params: { id, enable } }
  );
}
