提交 2eadf8d9 作者: fxjhello

配置后端地址

上级 5bac7591
......@@ -35,3 +35,6 @@ export const deletefile = (params: any) => {
export const web_url = () => {
return window.location.origin
}
export const setapi = () => {
return window.baseApi
}
......@@ -3,7 +3,7 @@ import { onMounted, ref, toRef } from 'vue'
import { NInput, NP, NPopconfirm, NScrollbar, NText, NUpload, NUploadDragger } from 'naive-ui'
import { SvgIcon } from '@/components/common'
import { useChatStore } from '@/store'
import { deletefile, getfilelist, web_url } from '@/api/chat'
import { deletefile, getfilelist, setapi, web_url } from '@/api/chat'
const knowledge = defineProps({
knowledgebaseid: {
type: String, // 类型字符串
......@@ -41,7 +41,7 @@ function handleEnter({ uuid }: Chat.History, isEdit: boolean, event: KeyboardEve
<NUpload
multiple
directory-dnd
:action="`${web_url()}/api/local_doc_qa/upload_file`"
:action="`${web_url()}${setapi()}/local_doc_qa/upload_file`"
:headers="{
'naive-info': 'hello!',
}"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论