添加上传全局提示
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user