提交 14a1c31a 编写于 作者: D DebugIsFalse

fix: todo请求接问题问题

上级 98e8a06a
export default () => { export default () => {
// 查询主题列表 // 查询主题列表
const getThreadsList = async (c_id) => { const getThreadsList = async (c_ids) => {
let query = c_id ? `?c_id=${c_id}` : '' let query = c_ids ? `?c_ids=${c_ids}` : ''
const { data, error } = await useRequest(`/v1/chat/completion/list${query}`) const { data, error } = await useRequest(`/v1/chat/completion/list${query}`)
if (error.value) { if (error.value) {
return [] return []
......
...@@ -253,7 +253,7 @@ const handleCreateAiTitle = () => { ...@@ -253,7 +253,7 @@ const handleCreateAiTitle = () => {
if (isFirstCreate) { if (isFirstCreate) {
// todo 需要延迟2s获取title // todo 需要延迟2s获取title
setTimeout(async () => { setTimeout(async () => {
const records = await getThreadsList(state.id) const records = await getThreadsList(JSON.stringify([state.id]))
const currentCollection = records.find( item => item.c_id === state.id) const currentCollection = records.find( item => item.c_id === state.id)
if (currentCollection) { if (currentCollection) {
state.title = currentCollection.title state.title = currentCollection.title
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册