diff --git a/pages/search/[id].vue b/pages/search/[id].vue index 393d8e3c9020627d330bcb5267b5a1b7167343ca..ea9034265f6df73d1427c6759e34209dbbe76dad 100644 --- a/pages/search/[id].vue +++ b/pages/search/[id].vue @@ -205,7 +205,7 @@ const fetchLinkedQuestion = (query) => { const { gitPath, id } = state const messages = [] messages.push({ role: 'user', content: query }) - useFetchRequest('/v1/chat/recomend_question', { + useRequest('/v1/chat/recomend_question', { method: 'post', headers: { 'Content-Type': 'application/json' @@ -253,9 +253,10 @@ function initSearchRecords (records) { data.value = records.map(item => { let { answer, actions } = item const historyItem = { article: answer, desLoading: false, searchLoading: false, ansLoading: false } + // console.log(`actions:`, typeof actions) // todo ?action为啥成了string? actions = typeof actions === 'string' ? JSON.parse(actions) : actions - console.log(actions) + // console.log(actions) // 处理搜索过程 actions && actions.forEach(child => { const childAction = child.action