2025-11-10 16:28:01 +08:00
|
|
|
import { request } from '@umijs/max';
|
|
|
|
|
|
|
|
|
|
/** 获取用户信息 GET /api/cms/appUser/getUserInfo */
|
|
|
|
|
export async function getAppUserInfo(options?: Record<string, any>) {
|
|
|
|
|
return request<API.AppUserInfoResult>('/api/cms/appUser/getUserInfo', {
|
|
|
|
|
method: 'GET',
|
|
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 获取我的统计数据 GET /api/cms/appUser/getMyTj */
|
|
|
|
|
export async function getMyTj(options?: Record<string, any>) {
|
|
|
|
|
return request<API.MyTjResult>('/api/cms/appUser/getMyTj', {
|
|
|
|
|
method: 'GET',
|
|
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 获取已投递岗位列表 GET /api/cms/job/getAppUserYhsq */
|
|
|
|
|
export async function getAppUserYhsq(params: { userId: number }, options?: Record<string, any>) {
|
|
|
|
|
return request<API.AppUserYhscResult>('/api/cms/job/getAppUserYhsq', {
|
|
|
|
|
method: 'GET',
|
|
|
|
|
params,
|
|
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 获取收藏岗位列表 GET /api/cms/job/getAppUserYhsc */
|
|
|
|
|
export async function getAppUserYhsc(params: { userId: number }, options?: Record<string, any>) {
|
|
|
|
|
return request<API.AppUserYhscResult>('/api/cms/job/getAppUserYhsc', {
|
|
|
|
|
method: 'GET',
|
|
|
|
|
params,
|
|
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 获取访问足迹岗位列表 GET /api/cms/job/getAppUserYhfwzj */
|
|
|
|
|
export async function getAppUserYhfwzj(params: { userId: number }, options?: Record<string, any>) {
|
|
|
|
|
return request<API.AppUserYhscResult>('/api/cms/job/getAppUserYhfwzj', {
|
|
|
|
|
method: 'GET',
|
|
|
|
|
params,
|
|
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 收藏岗位 POST /api/job-portal/list */
|
|
|
|
|
export async function favoriteJob(params: { jobId: number; userId: number }, options?: Record<string, any>) {
|
|
|
|
|
return request<API.Result>('/api/cms/job/collection', {
|
|
|
|
|
method: 'POST',
|
|
|
|
|
data: params,
|
|
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 取消收藏岗位 DELETE /app/company/card/collection */
|
|
|
|
|
export async function unfavoriteJob(params: { jobId: number; userId: number }, options?: Record<string, any>) {
|
|
|
|
|
return request<API.Result>('/api/cms/job/collectionCancel', {
|
|
|
|
|
method: 'POST',
|
|
|
|
|
data: params,
|
|
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 申请岗位 POST /api/cms/jobApply/apply */
|
|
|
|
|
export async function applyJob(params: { jobId: string; userId: string }, options?: Record<string, any>) {
|
|
|
|
|
return request<API.Result>('/api/cms/jobApply', {
|
|
|
|
|
method: 'PUT',
|
|
|
|
|
data: params,
|
2026-06-16 19:11:36 +08:00
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 浏览岗位 POST /api/cms/job/browse */
|
|
|
|
|
export async function browseJob(params: { jobId: number }, options?: Record<string, any>) {
|
|
|
|
|
return request<API.Result>('/api/cms/job/browse', {
|
|
|
|
|
method: 'POST',
|
|
|
|
|
data: params,
|
2025-11-10 16:28:01 +08:00
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 获取消息列表 GET /api/cms/appUser/getMessages */
|
|
|
|
|
export async function getMessages(params?: { pageNum?: number; pageSize?: number; noticeType?: number; isRead?: number }, options?: Record<string, any>) {
|
|
|
|
|
return request<API.MessageListResult>('/api/cms/notice/appNoticList', {
|
|
|
|
|
method: 'GET',
|
|
|
|
|
params,
|
|
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 获取未读消息数量 GET /api/cms/appUser/getUnreadCount */
|
|
|
|
|
export async function getUnreadCount(options?: Record<string, any>) {
|
|
|
|
|
return request<API.UnreadCountResult>('/api/cms/notice/appNoticReadList', {
|
|
|
|
|
method: 'GET',
|
|
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 获取消息总数和未读条数 GET /cms/notice/noticTotal */
|
|
|
|
|
export async function getMessageTotal(options?: Record<string, any>) {
|
|
|
|
|
return request<API.MessageTotalResult>('/api/cms/notice/noticTotal', {
|
|
|
|
|
method: 'GET',
|
|
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 获取已读消息列表 GET /cms/notice/appNoticYdList */
|
|
|
|
|
export async function getReadMessages(params?: { pageNum?: number; pageSize?: number }, options?: Record<string, any>) {
|
|
|
|
|
return request<API.MessageListResult>('/api/cms/notice/appNoticYdList', {
|
|
|
|
|
method: 'GET',
|
|
|
|
|
params,
|
|
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 标记消息为已读 POST /api/cms/appUser/markMessageRead */
|
|
|
|
|
export async function markMessageRead(id: number, options?: Record<string, any>) {
|
|
|
|
|
return request<API.Result>(`/api/cms/notice/read/sysNotice?id=${id}`, {
|
|
|
|
|
method: 'POST',
|
|
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 标记所有消息为已读 POST /api/cms/appUser/markAllMessagesRead */
|
|
|
|
|
export async function markAllMessagesRead(id?: Record<string, any>) {
|
|
|
|
|
return request<API.Result>('/api/cms/appUser/markAllMessagesRead', {
|
|
|
|
|
method: 'POST',
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 删除消息 DELETE /api/cms/appUser/deleteMessage */
|
|
|
|
|
export async function deleteMessage(ids: number, options?: Record<string, any>) {
|
|
|
|
|
return request<API.Result>(`/api/cms/notice/deleteNotice/${ids}`, {
|
|
|
|
|
method: 'DELETE',
|
|
|
|
|
...(options || {}),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-17 21:48:26 +08:00
|
|
|
/** 上传我的风采文件 POST /app/file/upload */
|
|
|
|
|
export async function uploadShowcaseFile(userId: number, file: File) {
|
|
|
|
|
const formData = new FormData();
|
|
|
|
|
formData.append('file', file);
|
|
|
|
|
return request(`/app/file/upload?bussinessid=${userId}`, {
|
|
|
|
|
method: 'POST',
|
|
|
|
|
data: formData,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 获取我的风采文件列表 GET /app/file/list */
|
|
|
|
|
export async function getShowcaseFileList(userId: number) {
|
|
|
|
|
return request('/app/file/list', {
|
|
|
|
|
method: 'GET',
|
|
|
|
|
params: { bussinessid: userId },
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|