配置后端地址
This commit is contained in:
parent
5bac7591db
commit
2eadf8d9f5
|
|
@ -35,3 +35,6 @@ export const deletefile = (params: any) => {
|
||||||
export const web_url = () => {
|
export const web_url = () => {
|
||||||
return window.location.origin
|
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 { NInput, NP, NPopconfirm, NScrollbar, NText, NUpload, NUploadDragger } from 'naive-ui'
|
||||||
import { SvgIcon } from '@/components/common'
|
import { SvgIcon } from '@/components/common'
|
||||||
import { useChatStore } from '@/store'
|
import { useChatStore } from '@/store'
|
||||||
import { deletefile, getfilelist, web_url } from '@/api/chat'
|
import { deletefile, getfilelist, setapi, web_url } from '@/api/chat'
|
||||||
const knowledge = defineProps({
|
const knowledge = defineProps({
|
||||||
knowledgebaseid: {
|
knowledgebaseid: {
|
||||||
type: String, // 类型字符串
|
type: String, // 类型字符串
|
||||||
|
|
@ -41,7 +41,7 @@ function handleEnter({ uuid }: Chat.History, isEdit: boolean, event: KeyboardEve
|
||||||
<NUpload
|
<NUpload
|
||||||
multiple
|
multiple
|
||||||
directory-dnd
|
directory-dnd
|
||||||
:action="`${web_url()}/api/local_doc_qa/upload_file`"
|
:action="`${web_url()}${setapi()}/local_doc_qa/upload_file`"
|
||||||
:headers="{
|
:headers="{
|
||||||
'naive-info': 'hello!',
|
'naive-info': 'hello!',
|
||||||
}"
|
}"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue