导师列表和导师详情
This commit is contained in:
@@ -0,0 +1,204 @@
|
||||
import jianshiRequest from '@/utils/jianshiRequest'
|
||||
|
||||
/**
|
||||
* 分页查询导师列表请求参数
|
||||
*/
|
||||
export interface MentorListParams {
|
||||
/** 页码,>= 1 */
|
||||
page: number
|
||||
/** 每页条数,1~100 */
|
||||
pageSize: number
|
||||
/** 搜索关键词,可选 */
|
||||
keyword?: string
|
||||
/** 行业ids,可选 */
|
||||
industryIds?: number[]
|
||||
/** 导师ids,可选 */
|
||||
mentorIds?: number[]
|
||||
/** 身份类型:0企业在职 1生涯规划师 2心理咨询师 3教职工 4在校学生,可选 */
|
||||
identityType?: number | null
|
||||
/** 标签ids,可选 */
|
||||
labelIds?: number[]
|
||||
/** 约聊方式:0语音电话 1线下约见,可选 */
|
||||
chatType?: number
|
||||
/** 价格最大值,可选 */
|
||||
maxChatPrice?: number
|
||||
/** 价格最小值,可选 */
|
||||
minChatPrice?: number
|
||||
/** 公司名,可选 */
|
||||
agencyName?: string
|
||||
/** 机构类型,可选 */
|
||||
type?: string | null
|
||||
/** 排序:0默认 1金牌导师优先 2好评优先 3价格升序 4价格降序 */
|
||||
sort: number
|
||||
}
|
||||
|
||||
/**
|
||||
* 导师列表项数据
|
||||
*/
|
||||
export interface MentorItem {
|
||||
/** 导师id(字符串,避免大数精度丢失) */
|
||||
id: string
|
||||
/** 用户id */
|
||||
userId: number
|
||||
/** 平台名 */
|
||||
platformName: string
|
||||
/** 头像 */
|
||||
picture: string
|
||||
/** 话题标题字符串 */
|
||||
titleStr: string
|
||||
/** 话题列表 */
|
||||
titles: string[]
|
||||
/** 标签字符串 */
|
||||
labelStr: string
|
||||
/** 标签列表 */
|
||||
labels: string[]
|
||||
/** 最低价格 */
|
||||
price: number
|
||||
/** 机构名 */
|
||||
agencyName: string
|
||||
/** 岗位 */
|
||||
position: string
|
||||
/** 机构logo */
|
||||
agencyLogo: string
|
||||
/** 排序 */
|
||||
sort: number
|
||||
/** 认证类型 */
|
||||
type: string
|
||||
/** 身份类型 */
|
||||
identityType: number
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询导师列表响应
|
||||
*/
|
||||
export interface MentorPageResult {
|
||||
records: MentorItem[]
|
||||
total: number
|
||||
size: number
|
||||
current: number
|
||||
pages: number
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询导师列表
|
||||
* POST /public/website/pageSelectMentor
|
||||
*/
|
||||
export function fetchMentorList(params: MentorListParams): Promise<MentorPageResult> {
|
||||
return jianshiRequest.post('/public/website/pageSelectMentor', params)
|
||||
}
|
||||
|
||||
// ==================== 导师详情接口 ====================
|
||||
|
||||
/**
|
||||
* 导师详情 — 在职人士认证信息
|
||||
*/
|
||||
export interface MentorWorking {
|
||||
companyName: string
|
||||
type: number
|
||||
companyLogo: string
|
||||
industryId: number
|
||||
position: string
|
||||
currentPositionTerm: number
|
||||
term: number
|
||||
images: string[]
|
||||
link: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 导师详情 — 认证信息
|
||||
*/
|
||||
export interface MentorVerification {
|
||||
career?: { agencyName: string; position: string; type: number; term: number; agencyLogo: string; images: string[] }
|
||||
psychology?: { agencyName: string; position: string; type: number; agencyLogo: string; term: number; images: string[] }
|
||||
staff?: { schoolName: string; type: number; schoolLogo: string; position: string; term: number; images: string[] }
|
||||
student?: { schoolName: string; type: number; schoolLogo: string; major: string; startTime: string; endTime: string; degree: number; images: string[] }
|
||||
working?: MentorWorking
|
||||
}
|
||||
|
||||
/**
|
||||
* 导师详情 — 基本信息
|
||||
*/
|
||||
export interface MentorInfo {
|
||||
platformName: string
|
||||
realName: string
|
||||
nickName: string
|
||||
picture: string
|
||||
identityType: number
|
||||
country?: string
|
||||
province?: string
|
||||
everCompany?: string
|
||||
city?: string
|
||||
phone: string
|
||||
mail?: string
|
||||
introduce?: string
|
||||
introduceImages?: string[]
|
||||
wechat?: string
|
||||
cooperationCount?: number
|
||||
starLevel?: number
|
||||
remark?: string
|
||||
sort?: number
|
||||
status: number
|
||||
}
|
||||
|
||||
/**
|
||||
* 导师详情 — 支持服务项
|
||||
*/
|
||||
export interface MentorSupport {
|
||||
type: number
|
||||
introduce?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 导师详情 — 标签关系
|
||||
*/
|
||||
export interface MentorLabelRelation {
|
||||
labelId: number
|
||||
alias?: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 导师详情完整数据
|
||||
*/
|
||||
export interface MentorFullInfo {
|
||||
id: number
|
||||
mentorInfo: MentorInfo
|
||||
verification?: MentorVerification
|
||||
supports?: MentorSupport[]
|
||||
labelRelations?: MentorLabelRelation[]
|
||||
}
|
||||
|
||||
/**
|
||||
* 导师话题项
|
||||
*/
|
||||
export interface MentorTalk {
|
||||
id: number
|
||||
teacherUserId: number
|
||||
title: string
|
||||
content: string
|
||||
chatType: string
|
||||
seePrice: number
|
||||
seeSalePrice: number
|
||||
chatPrice: number
|
||||
chatSalePrice: number
|
||||
tags: string
|
||||
status: string
|
||||
talkTimes: number
|
||||
jobBusinessType: string
|
||||
caseImages?: string[]
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取导师详情信息
|
||||
* GET /public/website/selectMentorFullInfo?mentorId=xxx
|
||||
*/
|
||||
export function fetchMentorFullInfo(mentorId: string): Promise<MentorFullInfo> {
|
||||
return jianshiRequest.get('/public/website/selectMentorFullInfo', { params: { mentorId } })
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取导师话题列表
|
||||
* GET /public/website/selectTalk?teacherId=xxx
|
||||
*/
|
||||
export function fetchMentorTalks(teacherId: string): Promise<MentorTalk[]> {
|
||||
return jianshiRequest.get('/public/website/selectTalk', { params: { teacherId } })
|
||||
}
|
||||
Reference in New Issue
Block a user