import { http } from "/@/utils/http/http2";
import { loadEnv } from "@build/index";
const { VITE_PROXY_DOMAIN_REAL, VITE_PROXY_USER_REAL, VITE_WORKORDER_REAL } = loadEnv();
const userAPi = VITE_PROXY_DOMAIN_REAL;
const yewuApi = VITE_PROXY_USER_REAL + "/admin/";

const newApi = VITE_WORKORDER_REAL


interface ResponseType extends Promise<any> {
  data?: object;
  code?: number;
  msg?: string;
}

// 添加
export const httpList = (data: object): ResponseType => {
  return http.request("post", `${yewuApi}orderquery`, { data });
};

export const httpAdd = (data: object): ResponseType => {
  return http.request("post", `${newApi}/cxinv/orderInvoice/create`, { data });
};
