From 778978af5fef63848e21d1cff2cef159d98d5323 Mon Sep 17 00:00:00 2001 From: DebugIsFalse <511418503@qq.com> Date: Mon, 27 May 2024 15:44:59 +0800 Subject: [PATCH] Update [id].vue --- pages/search/[id].vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pages/search/[id].vue b/pages/search/[id].vue index 393d8e3..ea90342 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 -- GitLab