配置后端地址

This commit is contained in:
fxjhello 2023-05-16 10:24:55 +08:00
parent 5bac7591db
commit 2eadf8d9f5
2 changed files with 5 additions and 2 deletions

View File

@ -35,3 +35,6 @@ export const deletefile = (params: any) => {
export const web_url = () => {
return window.location.origin
}
export const setapi = () => {
return window.baseApi
}

View File

@ -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!',
}"