fix(mobile): isolate candidate study position
This commit is contained in:
@@ -312,7 +312,7 @@ const loadStudy = async () => {
|
||||
studyLoading.value = true;
|
||||
message.value = '';
|
||||
try {
|
||||
const result = await searchKnowledge('生活顾问岗前预习 投诉处理 报事报修 客户沟通');
|
||||
const result = await searchKnowledge('生活顾问岗前预习 投诉处理 报事报修 客户沟通', '生活顾问');
|
||||
studyAnswer.value = result.answer;
|
||||
studyRefs.value = (result.docs || []).map((item) => item.title).filter(Boolean).slice(0, 3);
|
||||
} catch (error) {
|
||||
|
||||
@@ -18,14 +18,14 @@ const normalizeSnippet = (snippet: RawKnowledgeSnippet): KnowledgeSnippet => ({
|
||||
content: snippet.content || snippet.text || ''
|
||||
});
|
||||
|
||||
export const searchKnowledge = async (queryText: string) => {
|
||||
export const searchKnowledge = async (queryText: string, position = getSelectedPosition()) => {
|
||||
const response = await apiRequest<KnowledgeSearchResponse>({
|
||||
url: '/api/knowledge/search',
|
||||
method: 'POST',
|
||||
data: {
|
||||
queryText,
|
||||
category: 'sop',
|
||||
position: getSelectedPosition(),
|
||||
position,
|
||||
limit: 5
|
||||
},
|
||||
timeout: 30000
|
||||
|
||||
Reference in New Issue
Block a user