import axios from "@/utils/request";

export function list(query) {
  return axios({
    url: "/system/custom/config/list",
    method: "get",
    params: query
  });
}


// 保存
export function saveCustomConfig(data, formName, method = "post") {
  let url =
    formName !== "edit"
      ? "/system/custom/config/save"
      : "/system/custom/config/edit";
  return axios({
    url: url,
    method: method,
    data: data
  });
}

// 删除
export function devCustomConfig(data) {
  return axios({
    url: "/system/custom/config/delete",
    method: "post",
    data: data
  });
}


export function getConfigs(query) {
  return axios({
    url: "/system/custom/config/getConfigs",
    method: "post",
    data: query
  });
}
