import { http } from "/@/utils/http"; 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 { data?: object; code?: number; msg?: string; } // 添加 export const httpAdd = (data: object): ResponseType => { return http.request("post", `${newApi}/cxinv/FinancialManager/create`, { data }); }; // 列表 export const httpList = (data: object): ResponseType => { return http.request("post", `${newApi}/cxinv/FinancialManager/list`, { data }); }; export const httpDetail = (data: object): ResponseType => { return http.request("post", `${newApi}/cxinv/FinancialManager/info`, { data }); }; export const httpStatus = (data: object): ResponseType => { return http.request("post", `${newApi}/cxinv/FinancialManager/CheckSure`, { data }); }; export const httpCatist = (data: object): ResponseType => { return http.request("post", `${newApi}/user/TaxCategory/list`, { data }); }; export const httpInvList = (data: object): ResponseType => { return http.request("post", `${yewuApi}orderinvlist`, { data }); }; export const httpCompanies = (data: object): any => { return http.request("post", `${yewuApi}companylist`, { data: { noRela: true, ...data } }); };