This commit is contained in:
zoujiandong
2025-07-10 13:35:03 +08:00
parent 8367b54f7f
commit 2ffecbe1d2
10 changed files with 1169 additions and 44 deletions
+8 -1
View File
@@ -113,15 +113,22 @@ export const getRequest = (url, params) => {
export const uploadRequest = (url, data) => {
return request({ data, url, method: 'post', headers: { 'Content-Type': 'multipart/form-data' } });
};
export const delRequest = (url, data) => {
return request({ data, url, method: 'delete'});
};
/**
/**
* 文件下载
*/
export const download = function (fileName, url, params) {
export const download = function (fileName, url, params,header='application/json') {
request({
method: 'get',
url: url,
params: params,
responseType: 'blob',
headers: {
'Content-Type': header,
},
})
.then((data) => {
if (!data) {