organization.js 888 Bytes
Newer Older
陈浩玮's avatar
陈浩玮 committed
1 2
import { delReq, getReq, postReq, putReq } from '@/utils';

陈浩玮's avatar
陈浩玮 committed
3 4 5 6
function getJobsApi(data) {
    return getReq('/api/v1/jobs', data);
}

陈浩玮's avatar
陈浩玮 committed
7 8 9 10 11 12 13 14
function addJobsApi(data) {
    return postReq('/api/v1/jobs', data);
}

function updateJobsApi(data) {
    return putReq('/api/v1/jobs', data);
}

陈浩玮's avatar
陈浩玮 committed
15
function getOrganizationListApi(data) {
陈浩玮's avatar
陈浩玮 committed
16 17 18
    return getReq('/api/v1/organizations', data);
}

陈浩玮's avatar
陈浩玮 committed
19 20 21 22 23 24 25 26 27 28 29 30
function getOrganizationDetailsApi(id) {
    return getReq(`/api/v1/organizations/${id}`);
}

function addOrgApi(data) {
    return postReq('/api/v1/organizations', data);
}

function updateOrgApi(data) {
    return putReq('/api/v1/organizations', data);
}

陈浩玮's avatar
陈浩玮 committed
31
export default {
陈浩玮's avatar
陈浩玮 committed
32 33
    addJobs: addJobsApi,
    updateJobs: updateJobsApi,
陈浩玮's avatar
陈浩玮 committed
34 35 36 37 38
    getOrganizationList: getOrganizationListApi,
    getJobs: getJobsApi,
    getOrganizationDetails: getOrganizationDetailsApi,
    addOrg: addOrgApi,
    updateOrg: updateOrgApi,
陈浩玮's avatar
陈浩玮 committed
39
};