仓库初始化+岗位相关页面

This commit is contained in:
2026-03-24 21:06:00 +08:00
commit 0468339d23
113 changed files with 18644 additions and 0 deletions
+192
View File
@@ -0,0 +1,192 @@
import request from '@/utils/request'
import type { ApiResult } from '@/api/auth'
// ==================== 匹配详情 ====================
/** 匹配度详情 */
export interface MatchDetail {
/** 行业匹配分 */
industryScore: number
/** 技能匹配分 */
skillScore: number
/** 经验匹配分 */
experienceScore: number
}
// ==================== 岗位列表项 ====================
/** 岗位列表项(接口返回结构) */
export interface JobListItem {
/** 岗位 ID */
id: string
/** 岗位标题 */
title: string
/** 公司全称 */
companyName: string
/** 公司简称 */
companyShortName: string
/** 公司类型(如"上市企业" */
companyType: string
/** 地区名称 */
regionName: string
/** 岗位分类名称 */
categoryName: string
/** 标签列表 */
tags: string[]
/** 原始招聘链接 */
sourceUrl: string
/** 是否已收藏 */
isFavorite: boolean
/** 岗位状态:0=有效 1=已下架 2=已过期 */
status: number
/** 综合匹配分(0-100 */
matchScore: number
/** 匹配度详情 */
matchDetail: MatchDetail
}
// ==================== 分页结构 ====================
/** 分页数据结构 */
export interface JobPageData {
/** 当前页码 */
pageNum: string
/** 每页条数 */
pageSize: string
/** 总记录数 */
total: string
/** 岗位列表 */
list: JobListItem[]
}
// ==================== 请求参数 ====================
/** 岗位列表请求参数 */
export interface JobListParams {
/** 当前页码,从1开始,默认1 */
pageNum?: number
/** 每页条数,默认15 */
pageSize?: number
/** 地区编码列表 */
regionCodes?: string[]
/** 岗位类型 ID 列表 */
categoryIds?: number[]
/** 行业 ID 列表 */
industryIds?: number[]
/** 工作类型:0=全职 1=兼职 */
employmentType?: number
/** 指定岗位 ID 列表(用于收藏列表) */
jobIds?: number[]
/** 岗位状态过滤(0=有效 1=已下架 2=已过期,可多选,null或空=查所有) */
statusFilter?: number[]
}
// ==================== 接口方法 ====================
/**
* 获取岗位列表
* POST /job/list
* @param params 岗位列表查询参数
*/
export function fetchJobList(params: JobListParams = {}) {
return request.post<any, ApiResult<JobPageData>>('/job/list', {
pageNum: params.pageNum ?? 1,
pageSize: params.pageSize ?? 15,
...params,
})
}
// ==================== 岗位详情 ====================
/** 匹配度详情(岗位详情用) */
export interface JobMatchScoreDto {
/** 行业得分(0-100 */
industryScore: number
/** 技能得分(0-100 */
skillScore: number
/** 经验得分(0-100 */
experienceScore: number
}
/** 岗位详情出参 */
export interface JobDetailData {
/** 岗位 ID */
jobId: string
/** 岗位标题 */
jobTitle: string
/** 薪资描述 */
salary: string
/** 工作类型 0=全职 1=兼职 */
employmentType: number
/** 学历要求 0=不限 1=大专 2=本科 3=硕士 4=博士 */
education: number
/** 最低工作年限 */
minExperience: number
/** 岗位职责 */
description: string
/** 任职要求 */
requirement: string
/** 加分项 */
bonus: string
/** 岗位标签 */
tags: string[]
/** 技能标签 */
skillTags: string[]
/** 来源链接 */
sourceUrl: string
/** 岗位类型名称 */
categoryName: string
/** 要求的行业经验名称 */
requiredIndustryName: string
/** 公司 ID */
companyId: string
/** 公司名称 */
companyName: string
/** 公司简称 */
companyShortName: string
/** 公司 Logo URL */
companyLogoUrl: string
/** 公司类型 */
companyType: string
/** 公司所属行业名称 */
companyIndustryName: string
/** 公司标签 */
companyTags: string[]
/** 公司简介 */
companySummary: string
/** 公司描述 */
companyDescription: string
/** 成立时间 */
companyFoundedYear: string
/** 公司地址 */
companyAddress: string
/** 公司规模 */
companyScale: string
/** 公司官网 */
companyWebsite: string
/** 融资状态 */
companyFinancingStage: string
/** 最新估值 */
companyLatestValuation: string
/** 公司新闻 */
companyNews: string[]
/** 地区名称 */
regionName: string
/** 匹配总分 */
matchScore: number
/** 匹配度详情 */
matchDetail: JobMatchScoreDto
/** 是否已收藏 */
isFavorite: boolean
}
/**
* 获取岗位详情
* GET /job/detail?jobId=xxx
* @param jobId 岗位 ID
*/
export function fetchJobDetail(jobId: string) {
return request.get<any, ApiResult<JobDetailData>>('/job/detail', {
params: { jobId },
})
}