import { http } from "/@/utils/http";
import { loadEnv } from "@build/index";
const { VITE_PROXY_DOMAIN_REAL, VITE_PROXY_USER_REAL } = loadEnv();
const userAPi = VITE_PROXY_DOMAIN_REAL;
const yewuApi = VITE_PROXY_USER_REAL + "/admin/";
interface ResponseType extends Promise<any> {
  data?: object;
  code?: number;
  msg?: string;
}
// 按钮列表
export const httpList = (data: object): ResponseType => {
  return http.request("post", `${yewuApi}menuaction`, { data });
};
// 按钮添加
export const httpAdd = (data: object): ResponseType => {
  return http.request("post", `${yewuApi}menuactionadd`, { data });
};
// 按钮编辑
export const httpEdit = (data: object): ResponseType => {
  return http.request("post", `${yewuApi}menuactionsave`, { data });
};
// 按钮状态
export const httpStatus = (data: object): ResponseType => {
  return http.request("post", `${yewuApi}menuactionstatus`, { data });
};
// 按钮删除
export const httpDelete = (data: object): ResponseType => {
  return http.request("post", `${yewuApi}menuactiondel`, { data });
};
