添加上传全局提示

This commit is contained in:
GGJ
2025-12-15 10:35:34 +08:00
parent 9f5b2ecc46
commit 6918611d06

View File

@@ -1,5 +1,5 @@
import createAxios from '@/utils/request' import createAxios from '@/utils/request'
import { ElMessage } from 'element-plus'
const SYSTEM_PREFIX = '/system-boot' const SYSTEM_PREFIX = '/system-boot'
/** /**
@@ -17,6 +17,11 @@ export const uploadFile = (file: any, path: string) => {
'Content-Type': 'multipart/form-data' 'Content-Type': 'multipart/form-data'
}, },
data: form data: form
}).then(res => {
if (res.code == `A0000`) {
ElMessage.success('上传成功!')
return res
}
}) })
} }