import axios from "axios"; export default { getAllOrganizations() { return axios.get('http://localhost:8080/api/organizations/listAll').then(response => { return response.data; }); }, addOrganization(organization) { return axios.post('http://localhost:8080/api/organizations/addOrganization', organization).then(response => { return response.data; }); }, deleteOrganization(organizationId) { return axios.post('http://localhost:8080/api/organizations/deleteOrganization' , {organizationId:organizationId},{headers: { 'Content-Type': 'application/json' // 设置 Content-Type 为 application/json }}).then(response => { return response.data; }); }, updateOrganization(organization) { return axios.post('http://localhost:8080/api/organizations/updateOrganization', organization).then(response => { return response.data; }); }, getOrganizationById(organizationId) { return axios.post('http://localhost:8080/organizations/getOrganizationById', {organizationId:organizationId},{headers: { 'Content-Type': 'application/json' // 设置 Content-Type 为 application/json }}).then(response => { return response.data; }); }, }