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