提交 6a8bc852 编写于 作者: D DebugIsFalse

Update Create.vue

上级 ac92eae5
......@@ -54,19 +54,12 @@ const menuUI = {
const handleSearch = async () => {
if (loading.value || query.value === '') return
loading.value = true
const result = await useRequest('/v1/chat/completion/create', {
method: 'post',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
if (result && result.data) {
navigateTo(`/search/${result.data.c_id}?query=${query.value}&repo=${selectedRepo.value}`)
const { data } = await useRequest('/v1/chat/completion/create', { method: 'post' })
navigateTo(`/search/${data.value.data.c_id}`)
emits('search')
nextTick(() => {
loading.value = false
})
}
}
nextTick(async () => {
if (!$repos.length) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册