From 32eba6441a2bd61653abf2a742716878f0df0e39 Mon Sep 17 00:00:00 2001
From: liudong <liudong>
Date: 星期五, 09 八月 2024 20:47:09 +0800
Subject: [PATCH] 地址116
---
src/views/dmx/model/components/addPageModel.vue | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/views/dmx/model/components/addPageModel.vue b/src/views/dmx/model/components/addPageModel.vue
index 23008ea..5d6c822 100644
--- a/src/views/dmx/model/components/addPageModel.vue
+++ b/src/views/dmx/model/components/addPageModel.vue
@@ -137,6 +137,9 @@
import { Modal, Message } from '@arco-design/web-vue';
import message from '@arco-design/web-vue/es/message';
import { resolveUnref } from '@vueuse/core';
+ import { useUserStore } from '@/store';
+
+ const userStore = useUserStore();
const addPageModelVisible = defineModel('show');
const loading = ref(false);
@@ -222,14 +225,20 @@
const uploadAction = '/api/v1/llm/upload'; // 鏇挎崲涓轰綘鐨勪笂浼燗PI
const fileList = ref([]);
const imageUrls = ref([]);
+ const uploadUrl = ref([]);
+ const httpUrl = localStorage.getItem('httpUrl');
const updateFileList = (newFileList) => {
fileList.value = newFileList;
- console.log(newFileList, 88);
};
const handleSuccess = (urls) => {
- imageUrls.value = urls; // 鎷垮埌涓婁紶鐨勫浘鐗囧湴鍧�
+ uploadUrl.value = urls;
+
+ const urlsArr = urls.map((url) => {
+ return httpUrl + url;
+ });
+ imageUrls.value = urlsArr; // 鎷垮埌涓婁紶鐨勫浘鐗囧湴鍧�
};
const emit = defineEmits(['refresh-parent']);
const handleSubmit = ({ values, errors }) => {
@@ -250,7 +259,7 @@
volc_sk: form.volc_sk,
api_base: form.api_base,
all_params: all_params,
- logo: imageUrls.value[0],
+ logo: uploadUrl.value[0] || '',
});
if ((data as any).code == 200) {
@@ -269,7 +278,7 @@
volc_sk: form.volc_sk,
api_base: form.api_base,
all_params: all_params,
- logo: imageUrls.value[0],
+ logo: uploadUrl.value[0] || '',
});
if ((data as any).code == 200) {
@@ -361,7 +370,7 @@
});
}
- imageUrls.value.push(data.data.logo);
+ imageUrls.value.push(httpUrl + data.data.logo);
};
watchEffect(() => {
--
Gitblit v1.8.0