diff --git a/ruoyi-ui/src/views/feedback/feedback/index.vue b/ruoyi-ui/src/views/feedback/feedback/index.vue
index 2e7a5fa..6a5be35 100644
--- a/ruoyi-ui/src/views/feedback/feedback/index.vue
+++ b/ruoyi-ui/src/views/feedback/feedback/index.vue
@@ -8,11 +8,13 @@
action="#"
class="avatar-uploader"
>
-
-
+
+
+
+
Create
@@ -35,23 +37,22 @@ const {t} = useI18n();
const locale = (Cookies.get('language') || 'zhCn') === 'zhCn'
const {proxy} = getCurrentInstance();
const {sys_normal_disable} = proxy.useDict("sys_normal_disable");
-const imageUrl = ref('')
+const imageUrl = ref([''])
-const form = reactive({
- imgUrl: '',
+const form = ref({
+ imgUrl: [''],
})
const onSubmit = () => {
console.log('submit!')
}
const requestUpload = (e) => {
- console.log(e)
let formData = new FormData();
formData.append("avatarfile", e.file);
uploadImg(formData).then(response => {
console.log(response)
- form.value.imgUrl = response.imgUrl
- imageUrl.value = import.meta.env.VITE_APP_BASE_API+response.imgUrl
+ form.value.imgUrl.push(response.imgUrl)
+ imageUrl.value.push(import.meta.env.VITE_APP_BASE_API + response.imgUrl)
});
}
diff --git a/ruoyi-ui/vite.config.js b/ruoyi-ui/vite.config.js
index 1ef2bde..169395a 100644
--- a/ruoyi-ui/vite.config.js
+++ b/ruoyi-ui/vite.config.js
@@ -2,6 +2,7 @@ import {defineConfig, loadEnv} from 'vite'
import path from 'path'
import createVitePlugins from './vite/plugins'
import basicSsl from '@vitejs/plugin-basic-ssl'
+import fs from 'fs'
// https://vitejs.dev/config/
export default defineConfig(({mode, command}) => {