feat: AI 择业顾问 MVP — 专业分析 + 岗位匹配 + 多轮对话
- backend: career-advice module with analyze/chat/positions endpoints - frontend: career.vue page with profile form, AI advice, recommendation cards - config/api/pages/user.vue: full integration into existing flow - docs: PROJECT-STATUS v4.5, FEATURE-LIST v4.3, ROADMAP v4.3 - AGENTS.md: updated module count and career link paths
This commit is contained in:
@@ -22,6 +22,7 @@ async function request<T = any>(url: string, method: string = 'POST', data?: any
|
||||
}
|
||||
}
|
||||
|
||||
const apiService = {
|
||||
user: {
|
||||
sendCode: (phone: string) => request(API_ENDPOINTS.USER.SEND_CODE, 'POST', { phone }),
|
||||
login: (phone: string, code: string) => request(API_ENDPOINTS.USER.LOGIN, 'POST', { phone, code }),
|
||||
@@ -89,14 +90,20 @@ async function request<T = any>(url: string, method: string = 'POST', data?: any
|
||||
records: () => request(API_ENDPOINTS.SHARE.RECORDS, 'GET', undefined, true),
|
||||
visitors: () => request(API_ENDPOINTS.SHARE.VISITORS, 'GET', undefined, true),
|
||||
},
|
||||
|
||||
review: {
|
||||
list: (page = 1, limit = 20) =>
|
||||
request(`${API_ENDPOINTS.REVIEW.LIST}?page=${page}&limit=${limit}`, "GET", undefined, true),
|
||||
detail: (id: string) => request(API_ENDPOINTS.REVIEW.DETAIL(id), "GET", undefined, true),
|
||||
delete: (id: string) => request(API_ENDPOINTS.REVIEW.DELETE(id), "DELETE", undefined, true),
|
||||
request(`${API_ENDPOINTS.REVIEW.LIST}?page=${page}&limit=${limit}`, 'GET', undefined, true),
|
||||
detail: (id: string) => request(API_ENDPOINTS.REVIEW.DETAIL(id), 'GET', undefined, true),
|
||||
delete: (id: string) => request(API_ENDPOINTS.REVIEW.DELETE(id), 'DELETE', undefined, true),
|
||||
submitText: (position: string, text: string, company?: string) =>
|
||||
request(API_ENDPOINTS.REVIEW.TEXT, "POST", { position, text, company: company || "" }, true),
|
||||
request(API_ENDPOINTS.REVIEW.TEXT, 'POST', { position, text, company: company || '' }, true),
|
||||
},
|
||||
career: {
|
||||
analyze: (profile: { major: string; grade?: string; interests?: string; gpa?: string; goal?: string }) =>
|
||||
request(API_ENDPOINTS.CAREER.ANALYZE, 'POST', profile, true),
|
||||
chat: (message: string, history: { role: string; content: string }[]) =>
|
||||
request(API_ENDPOINTS.CAREER.CHAT, 'POST', { message, history }, true),
|
||||
positions: () => request(API_ENDPOINTS.CAREER.POSITIONS, 'GET', undefined, true),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user