From c3d81e837e6350b431583c5cdcc1e0e09b4376c0 Mon Sep 17 00:00:00 2001 From: QYF-GitLab1 <1940665526@qq.com> Date: 星期三, 18 十二月 2024 16:45:47 +0800 Subject: [PATCH] 111 --- 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