Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled
48 lines
1.3 KiB
TypeScript
48 lines
1.3 KiB
TypeScript
import { request } from '@umijs/max';
|
|
|
|
// 获取职位树形选择数据
|
|
export async function getJobTitleTreeSelect() {
|
|
return request('/api/app/common/jobTitle/treeselect', {
|
|
method: 'GET',
|
|
});
|
|
}
|
|
|
|
// 获取热门岗位推荐数据
|
|
export async function getJobRecommend(params?: { jobTitle?: string }) {
|
|
return request('/api/cms/job/recommend', {
|
|
method: 'GET',
|
|
params: {
|
|
order: 2,
|
|
...(params?.jobTitle ? { jobTitle: params.jobTitle } : {})
|
|
}
|
|
});
|
|
}
|
|
|
|
/** 获取岗位名称联想 GET /api/app/job/suggest */
|
|
export async function getJobSuggestions(keyword: string, limit = 10) {
|
|
return request<{ code: number; msg?: string; data?: string[] }>('/api/app/job/suggest', {
|
|
method: 'GET',
|
|
params: { keyword, limit },
|
|
});
|
|
}
|
|
|
|
// 获取职位列表数据
|
|
export async function getJobList(jobCategory: string) {
|
|
return request('/api/cms/job/recommend', {
|
|
method: 'GET',
|
|
params: {
|
|
order: 0,
|
|
isPublish: 1,
|
|
jobCategory: jobCategory
|
|
}
|
|
});
|
|
}
|
|
|
|
// 添加用户工作经历
|
|
export async function addUserWorkExperience(params: { companyName: string; position?: string; startDate?: string; endDate?: string; description?: string }) {
|
|
return request('/api/cms/userworkexperiences', {
|
|
method: 'POST',
|
|
data: params,
|
|
});
|
|
}
|