-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.helper.js
100 lines (90 loc) · 2.26 KB
/
api.helper.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import request from "./core";
//활동지원사 api 처리
//퀵) 목록 조회
const getQuickServiceList = async () => {
return await request({ url: `/apply/quick` }).catch((error) =>
console.error(error)
);
};
//사전) 목록 조회
const getPreServiceList = async () => {
return await request({ url: `/apply/pre` }).catch((error) =>
console.error(error)
);
};
//퀵, 사전) 지원_기존 자기소개서 가져오기
const getResume = async (hp_id) => {
return await request({ url: `/hp/apply/${hp_id}` }).catch((error) =>
console.error(error)
);
};
//퀵, 사전) 지원하기
const postApply = async (data) => {
return await request({
method: "post",
url: `/hp/apply`,
data: {
apply_id: data.apply_id,
mem_id: data.mem_id,
hp_id: data.hp_id,
is_new: data.is_new,
new_idc: data.new_idc,
apply_date: data.apply_date,
start_point: data.start_point,
end_point: data.end_point,
},
}).catch((error) => console.error(error));
};
//나의지원목록) 조회하기
const getApplyList = async (hp_id) => {
return await request({ url: `/helper/${hp_id}` }).catch((error) =>
console.error(error)
);
};
//나의지원목록) 메모 수정하기
const postModifyMemo = async (data) => {
return await request({
method: "post",
url: `/hp_memo/${data.hp_id}/${data.apply_id}`,
data: {
memo: data.memo,
},
}).catch((error) => console.error(error));
};
//마이페이지) 기존자기소개서 가져오기
const getDefaultResume = async (hp_id) => {
return await request({ url: `/hp/preidc/${hp_id}` }).catch((error) =>
console.error(error)
);
};
//마이페이지) 기존자기소개서 수정하기
const postModifyResume = async (data) => {
return await request({
method: "post",
url: `/hp/preidc`,
data: {
is_exist: data.is_exist,
hp_id: data.hp_id,
content: data.content,
},
}).catch((error) => console.error(error));
};
const getMyInfo = async (hp_id) => {
const data = {
mem_name: "김도움",
mem_gender: "F",
mem_birth: "96-03-13",
};
return data;
};
export {
getQuickServiceList,
getPreServiceList,
getResume,
postApply,
getApplyList,
postModifyMemo,
getDefaultResume,
postModifyResume,
getMyInfo,
};