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/";

export const httpList = (data: object): any => {
  return http.request("post", `${yewuApi}involist`, { data });
};

export const httpDelete = (data: object): any => {
  return http.request("post", `${yewuApi}invoicedel`, { data });
};

export const httpAdd = (data: Record<string, any>): any => {
  return http.request("post", `${yewuApi}invoiceadd`, { data });
};

export const httpUpdate = (data: Record<string, any>): any => {
  return http.request("post", `${yewuApi}invoicesave`, { data });
};
