This commit is contained in:
lcw
2025-09-26 17:22:28 +08:00
parent 7f6783108b
commit ee5e534052
77 changed files with 185 additions and 158 deletions

View File

@ -127,7 +127,7 @@ function delFile(index) {
}
// 文件下载
function downloadFile(url) {
window.open('/bagl/mosty-base/minio/image/download/'+url, "_blank");
window.open('/mosty-base/minio/image/download/'+url, "_blank");
}
// 选择文件
function fileChange(e) {
@ -136,7 +136,7 @@ function fileChange(e) {
let formData = new FormData();
formData.append("file", file);
axios
.post("/bagl/mosty-base/minio/image/upload/id", formData, {
.post("/mosty-base/minio/image/upload/id", formData, {
"Content-type": "multipart/form-data"
})
.then((res) => {

View File

@ -98,18 +98,18 @@ watch(() => props.modelValue,(val) => {
if(arr.length == 0 ) return fileList.value = [];
fileList.value = arr.map((el) => {
if (Object.prototype.toString.call(el) === "[object Object]") {
return props.isAll ? { url: `/bagl/mosty-base/minio/image/download/` + el.id, name: el.name } : { url:el,name:el.name};
return props.isAll ? { url: `/mosty-base/minio/image/download/` + el.id, name: el.name } : { url:el,name:el.name};
} else {
return { url: `/bagl/mosty-base/minio/image/download/` + el };
return { url: `/mosty-base/minio/image/download/` + el };
}
});
},{ immediate: true,deep:true });
const actionUrl = computed(() => {
if (props.isAll) {
return "/bagl/mosty-base/minio/image/upload/id";
return "/mosty-base/minio/image/upload/id";
} else {
return props.isImg ? "/bagl/mosty-base/minio/image/upload/id": "/bagl/mosty-base/minio/file/upload";
return props.isImg ? "/mosty-base/minio/image/upload/id": "/mosty-base/minio/file/upload";
}
});
@ -156,7 +156,7 @@ const getSuffix = (fileName) => {
};
const handlerSuccess = (res, file) => {
// file.url = `/bagl/mosty-base/minio/image/download/` + res.data;
// file.url = `/mosty-base/minio/image/download/` + res.data;
file.id = res.data;
fileList.value.push(file);
let arr = []