diff --git a/src/api/system-boot/file.ts b/src/api/system-boot/file.ts index bc13ddac..5be9ad94 100644 --- a/src/api/system-boot/file.ts +++ b/src/api/system-boot/file.ts @@ -1,5 +1,5 @@ import createAxios from '@/utils/request' - +import { ElMessage } from 'element-plus' const SYSTEM_PREFIX = '/system-boot' /** @@ -17,6 +17,11 @@ export const uploadFile = (file: any, path: string) => { 'Content-Type': 'multipart/form-data' }, data: form + }).then(res => { + if (res.code == `A0000`) { + ElMessage.success('上传成功!') + return res + } }) } @@ -50,7 +55,7 @@ export const downloadFile = (filePath: any) => { /** * 获取文件的短期url展示 */ -export const getFileUrl = (params:any) => { +export const getFileUrl = (params: any) => { let form = new FormData() // form.append('filePath', filePath) return createAxios({