Selaa lähdekoodia

feat(records): change

gemercheung 1 vuosi sitten
vanhempi
commit
fef699fd10
1 muutettua tiedostoa jossa 9 lisäystä ja 1 poistoa
  1. 9 1
      src/app/map/company-select/organization.ts

+ 9 - 1
src/app/map/company-select/organization.ts

@@ -6,6 +6,14 @@ import {
   getTreeselect,
 } from "@/request";
 
+const request = axios.create({
+  baseURL: 'https://xj-mix3d.4dkankan.com/fusion-xj',
+  timeout: 1000,
+  headers: {
+    share: 1,
+    'Content-Type': 'application/json'
+  },
+});
 
 export enum DeptType {
   corps = 1,
@@ -28,7 +36,7 @@ export type Organization = {
 };
 
 export const getOrganizationTree = async (type?: string) =>
-  (await axios.get<Organization[]>(getTreeselect, { headers: { share: 1 }, params: { type, ingoreRes: true, share: 1, } })).data;
+  (await request.get<Organization[]>('/web/department/treeselect', { headers: { share: 1 }, params: { type, ingoreRes: true, share: 1, } })).data;
 
 export const addOrganization = async (
   dept: Omit<Organization, "id">,