index.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import { http } from "/@/utils/http";
  2. import { loadEnv } from "@build/index";
  3. const { VITE_PROXY_DOMAIN_REAL, VITE_PROXY_USER_REAL, VITE_WORKORDER_REAL } = loadEnv();
  4. const userAPi = VITE_PROXY_DOMAIN_REAL;
  5. const yewuApi = VITE_PROXY_USER_REAL + "/admin/";
  6. const newApi = VITE_WORKORDER_REAL
  7. interface ResponseType extends Promise<any> {
  8. data?: object; code?: number; msg?: string;
  9. }
  10. // 添加
  11. export const httpAdd = (data: object): ResponseType => {
  12. return http.request("post", `${newApi}/cxinv/FinancialManager/create`, { data });
  13. };
  14. // 列表
  15. export const httpList = (data: object): ResponseType => {
  16. return http.request("post", `${newApi}/cxinv/FinancialManager/list`, { data });
  17. };
  18. export const httpDetail = (data: object): ResponseType => {
  19. return http.request("post", `${newApi}/cxinv/FinancialManager/info`, { data });
  20. };
  21. export const httpStatus = (data: object): ResponseType => {
  22. return http.request("post", `${newApi}/cxinv/FinancialManager/CheckSure`, { data });
  23. };
  24. export const httpCatist = (data: object): ResponseType => {
  25. return http.request("post", `${newApi}/user/TaxCategory/list`, { data });
  26. };
  27. export const httpInvList = (data: object): ResponseType => {
  28. return http.request("post", `${yewuApi}orderinvlist`, { data });
  29. };
  30. export const httpCompanies = (data: object): any => {
  31. return http.request("post", `${yewuApi}companylist`, { data: { noRela: true, ...data } });
  32. };