Jelajahi Sumber

feat:更换API

snow 1 bulan lalu
induk
melakukan
ef509fdac1

+ 1 - 1
src/api/InvoiceSales/invoiceApply/index.ts

@@ -50,7 +50,7 @@ export const httpSetPost = (data: object): ResponseType => {
 
 
 //
 //
 export const httpInvoiceList = (data: object): ResponseType => {
 export const httpInvoiceList = (data: object): ResponseType => {
-  return http.request("post", `http://pro.test.caixiao365.com/user/invoice/list`, { data: { noRela: true, ...data } });
+  return http.request("post", `${newApi}/user/invoice/list`, { data: { noRela: true, ...data } });
 };
 };
 
 
 export const httpCompanyList = (data: object): ResponseType => {
 export const httpCompanyList = (data: object): ResponseType => {

+ 6 - 4
src/api/parameter/finance/index.ts

@@ -1,19 +1,21 @@
 import { http } from "/@/utils/http";
 import { http } from "/@/utils/http";
 import { loadEnv } from "@build/index";
 import { loadEnv } from "@build/index";
-const { VITE_PROXY_DOMAIN_REAL, VITE_PROXY_USER_REAL } = loadEnv();
+const { VITE_PROXY_DOMAIN_REAL, VITE_PROXY_USER_REAL, VITE_WORKORDER_REAL } = loadEnv();
 const userAPi = VITE_PROXY_DOMAIN_REAL;
 const userAPi = VITE_PROXY_DOMAIN_REAL;
 const yewuApi = VITE_PROXY_USER_REAL + "/admin/";
 const yewuApi = VITE_PROXY_USER_REAL + "/admin/";
 
 
+const newApi = VITE_WORKORDER_REAL
+
 export const httpList = (data: object): any => {
 export const httpList = (data: object): any => {
-  return http.request("post", `http://pro.test.caixiao365.com/user/supplier/list`, { data: { noRela: true, ...data } });
+  return http.request("post", `${newApi}/user/supplier/list`, { data: { noRela: true, ...data } });
 };
 };
 
 
 export const httpInfo = (data: object): any => {
 export const httpInfo = (data: object): any => {
-  return http.request("post", `http://pro.test.caixiao365.com/user/supplier/info`, { data: { noRela: true, ...data } });
+  return http.request("post", `${newApi}/user/supplier/info`, { data: { noRela: true, ...data } });
 };
 };
 
 
 export const httpCompanylist = (data: object): any => {
 export const httpCompanylist = (data: object): any => {
-  return http.request("post", `http://pro.test.caixiao365.com/user/invoice/list`, { data: { noRela: true, ...data } });
+  return http.request("post", `${newApi}/user/invoice/list`, { data: { noRela: true, ...data } });
 };
 };
 
 
 export const httpAdd = (data: object): any => {
 export const httpAdd = (data: object): any => {

+ 6 - 4
src/api/parameter/invoiceheader/index.ts

@@ -1,9 +1,11 @@
 import { http } from "/@/utils/http";
 import { http } from "/@/utils/http";
 import { loadEnv } from "@build/index";
 import { loadEnv } from "@build/index";
-const { VITE_PROXY_DOMAIN_REAL, VITE_PROXY_USER_REAL } = loadEnv();
+const { VITE_PROXY_DOMAIN_REAL, VITE_PROXY_USER_REAL, VITE_WORKORDER_REAL } = loadEnv();
 const userAPi = VITE_PROXY_DOMAIN_REAL;
 const userAPi = VITE_PROXY_DOMAIN_REAL;
 const yewuApi = VITE_PROXY_USER_REAL + "/admin/";
 const yewuApi = VITE_PROXY_USER_REAL + "/admin/";
 
 
+const newApi = VITE_WORKORDER_REAL
+
 // export const httpList = (data: object): any => {
 // export const httpList = (data: object): any => {
 //   return http.request("post", `${yewuApi}involist`, { data });
 //   return http.request("post", `${yewuApi}involist`, { data });
 // };
 // };
@@ -21,7 +23,7 @@ const yewuApi = VITE_PROXY_USER_REAL + "/admin/";
 // };
 // };
 
 
 export const httpList = (data: object): any => {
 export const httpList = (data: object): any => {
-  return http.request("post", `http://pro.test.caixiao365.com/user/invoice/list`, { data: { ...data, type: '1' }});
+  return http.request("post", `${newApi}/user/invoice/list`, { data: { ...data, type: '1' }});
   // return http.request("post", `${yewuApi}invoice/list`, { data });
   // return http.request("post", `${yewuApi}invoice/list`, { data });
 };
 };
 
 
@@ -30,11 +32,11 @@ export const httpDelete = (data: object): any => {
 };
 };
 
 
 export const httpAdd = (data: Record<string, any>): any => {
 export const httpAdd = (data: Record<string, any>): any => {
-  return http.request("post", `http://pro.test.caixiao365.com/user/invoice/create`, { data: { ...data, type: '1', companyNo: data.invoice_code } });
+  return http.request("post", `${newApi}/user/invoice/create`, { data: { ...data, type: '1', companyNo: data.invoice_code } });
   // return http.request("post", `${yewuApi}invoiceadd`, { data });
   // return http.request("post", `${yewuApi}invoiceadd`, { data });
 };
 };
 
 
 export const httpUpdate = (data: Record<string, any>): any => {
 export const httpUpdate = (data: Record<string, any>): any => {
-  return http.request("post", `http://pro.test.caixiao365.com/user/invoice/update`, { data: { ...data, type: '1', companyNo: data.invoice_code } });
+  return http.request("post", `${newApi}/user/invoice/update`, { data: { ...data, type: '1', companyNo: data.invoice_code } });
 };
 };
 
 

+ 6 - 4
src/api/user.ts

@@ -7,6 +7,8 @@ const yewuApi = VITE_PROXY_USER_REAL + "/admin/";
 
 
 const workorderAPI = VITE_WORKORDER_REAL + "/user/company/";
 const workorderAPI = VITE_WORKORDER_REAL + "/user/company/";
 
 
+const newApi = VITE_WORKORDER_REAL
+
 interface userType extends Promise<any> {
 interface userType extends Promise<any> {
   svg?: string;
   svg?: string;
   code?: number;
   code?: number;
@@ -2502,7 +2504,7 @@ export const httpSupplierList = (data: object): any => {
 };
 };
 
 
 export const httpBusinessList = (data: object): any => {
 export const httpBusinessList = (data: object): any => {
-  return http.request("post", `http://pro.test.caixiao365.com/user/supplier/list`, {
+  return http.request("post", `${newApi}/user/supplier/list`, {
     data: {
     data: {
       ...data,
       ...data,
       is_upgrade: 1
       is_upgrade: 1
@@ -2517,7 +2519,7 @@ export const httpGetAllCompany = (data: object) => {
 };
 };
 
 
 export const httpGetSupplier = (data: object) => {
 export const httpGetSupplier = (data: object) => {
-  return http.request("post", `http://pro.test.caixiao365.com/user/supplier/list`, {
+  return http.request("post", `${newApi}/user/supplier/list`, {
     data: {
     data: {
       ...data,
       ...data,
     }
     }
@@ -2525,13 +2527,13 @@ export const httpGetSupplier = (data: object) => {
 };
 };
 
 
 export const httpGetBusiness = (data: object) => {
 export const httpGetBusiness = (data: object) => {
-  return http.request("post", `http://pro.test.caixiao365.com/user/invoice/list`, {
+  return http.request("post", `${newApi}/user/invoice/list`, {
     data
     data
   });
   });
 };
 };
 
 
 export const httpGetBusinessInfo = (data: object) => {
 export const httpGetBusinessInfo = (data: object) => {
-  return http.request("post", `http://pro.test.caixiao365.com/user/invoice/info`, {
+  return http.request("post", `${newApi}/user/invoice/info`, {
     data
     data
   });
   });
 };
 };