Files
shz-admin/src/services/jobportal/user.ts
francis-fh 0cff24aab1
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
投诉功能开发
2026-07-10 17:57:31 +08:00

185 lines
5.7 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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,
...(options || {}),
});
}
/** 获取岗位详情 GET /app/job/{jobId}(含 isApply / isCollection */
export async function getJobDetail(jobId: string | number) {
return request<API.Result>(`/app/job/${jobId}`, {
method: 'GET',
});
}
/** 浏览岗位 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,
...(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 || {}),
});
}
/** 上传我的风采文件 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 },
});
}
/** 删除我的风采文件 DELETE /app/file/{id} */
export async function deleteShowcaseFile(id: number) {
return request(`/app/file/${id}`, {
method: 'DELETE',
});
}
/** 提交岗位投诉 POST /cms/jobComplaint */
export async function submitJobComplaint(params: {
userId: string;
jobId: string;
complaintType: string;
complaintContent: string;
contactPhone: string;
}) {
return request<API.Result>('/api/cms/jobComplaint', {
method: 'POST',
data: params,
});
}