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

Update Create.vue

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