From 478808cba94297e7dde76bd1b91acd38840649d7 Mon Sep 17 00:00:00 2001
From: liudong <liudong>
Date: 星期五, 09 八月 2024 20:45:19 +0800
Subject: [PATCH] 图片上传解决方案
---
src/views/dmx/IntelligentAgent/components/agentConfig.vue | 4 ++--
src/views/dmx/knowledgeLib/config.vue | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/views/dmx/IntelligentAgent/components/agentConfig.vue b/src/views/dmx/IntelligentAgent/components/agentConfig.vue
index 944d094..4c23cd3 100644
--- a/src/views/dmx/IntelligentAgent/components/agentConfig.vue
+++ b/src/views/dmx/IntelligentAgent/components/agentConfig.vue
@@ -51,7 +51,7 @@
<Upload
:action="uploadAction"
:limit="1"
- :url="form.icon"
+ :url="httpUrl + form.icon"
@update:fileList="updateFileList"
@success="handleSuccess"
></Upload>
@@ -314,7 +314,7 @@
let presence_penalty = ref(true);
let frequency_penalty = ref(true);
let max_tokens = ref(true);
-
+const httpUrl = localStorage.getItem('httpUrl');
const height = ref('calc(500px)');
const props = defineProps(['typeAngint', 'formData']);
diff --git a/src/views/dmx/knowledgeLib/config.vue b/src/views/dmx/knowledgeLib/config.vue
index 0fb3804..89966dc 100644
--- a/src/views/dmx/knowledgeLib/config.vue
+++ b/src/views/dmx/knowledgeLib/config.vue
@@ -18,7 +18,7 @@
v-if="avatarShow"
:action="uploadAction"
:limit="1"
- :url="form.avatar"
+ :url="httpUrl + form.avatar"
@update:fileList="updateFileList"
@success="handleSuccess"
></Upload>
@@ -230,6 +230,7 @@
const uploadAction = '/api/v1/llm/upload'; // 鏇挎崲涓轰綘鐨勪笂浼燗PI
const fileList = ref([]);
const imageUrls = ref([]);
+const httpUrl = localStorage.getItem('httpUrl');
const updateFileList = (newFileList) => {
fileList.value = newFileList;
--
Gitblit v1.8.0