From 1a5e46e6955225675d21fe04962e82b37e7890ed Mon Sep 17 00:00:00 2001 From: litian <C21AF165> Date: 星期二, 15 十月 2024 16:02:26 +0800 Subject: [PATCH] ziyuan --- assets/js/middleGround/api/file.js | 20 ++++++++++++++++---- 1 files changed, 16 insertions(+), 4 deletions(-) diff --git a/assets/js/middleGround/api/file.js b/assets/js/middleGround/api/file.js index 5edfbd4..4339689 100644 --- a/assets/js/middleGround/api/file.js +++ b/assets/js/middleGround/api/file.js @@ -36,10 +36,14 @@ }, //涓婁紶鏂囦欢 upload(data) { + console.log(data) return request({ url: "/file/api/ApiUpload", method: "post", - data + header: { + 'content-type': data.contentType, + }, + data: data.buffer, }); }, @@ -71,15 +75,23 @@ }, // 鎵归噺涓嬭浇get - getDownloadFiles (params) { + getDownloadFiles(params) { return request({ url: '/file/api/ApiGetDownloadFiles', method: 'GET', responseType: 'blob', - headers:{ - 'md5s':params + headers: { + 'md5s': params } }); + }, + // 鍙戦�佷笅杞介偖浠� + sendFileWithEmail(data) { + return request({ + url: '/file/api/ApiSendFileWithEmail', + method: 'post', + data + }) } } -- Gitblit v1.9.1