New file |
| | |
| | | import request from "@/plugin/axios/index.ts"; |
| | | const fileApi = { |
| | | // 获取pdf总页数 |
| | | getPdfTotalPage(data) { |
| | | return request({ |
| | | url: "/file/GetPdfTotalPage", |
| | | method: "post", |
| | | data |
| | | }); |
| | | }, |
| | | |
| | | // 获取pdf、word、ppt等转图片预览 |
| | | getPdfInfo(data) { |
| | | return request({ |
| | | url: "/file/GetPdfInfo", |
| | | method: "post", |
| | | data |
| | | }); |
| | | }, |
| | | //获取pdf目录 |
| | | GetPdfToc(data) { |
| | | return request({ |
| | | url: "/file/GetPdfToc", |
| | | method: "post", |
| | | data |
| | | }); |
| | | }, |
| | | //获取文件 |
| | | getPdfPageImage(params) { |
| | | return request({ |
| | | url: '/file/GetPdfPageImage', |
| | | method: 'get', |
| | | responseType: 'blob', |
| | | params |
| | | }); |
| | | }, |
| | | //上传文件 |
| | | upload(data) { |
| | | return request({ |
| | | url: "/file/api/ApiUpload", |
| | | method: "post", |
| | | data |
| | | }); |
| | | }, |
| | | |
| | | // 获取阿里云加速地址 |
| | | getAliVod(data) { |
| | | return request({ |
| | | url: "/file/GetAliVod", |
| | | method: "post", |
| | | data, |
| | | }); |
| | | }, |
| | | |
| | | downloadForAuthorize(params) { |
| | | return request({ |
| | | url: '/file/api/ApiDownloadForAuthorize', |
| | | method: 'GET', |
| | | responseType: 'blob', |
| | | params |
| | | }); |
| | | }, |
| | | // 批量下载 |
| | | downloadFiles(data) { |
| | | return request({ |
| | | url: '/file/api/ApiDownloadFiles', |
| | | method: 'post', |
| | | responseType: 'blob', |
| | | data |
| | | }); |
| | | }, |
| | | |
| | | // 批量下载get |
| | | getDownloadFiles (params) { |
| | | return request({ |
| | | url: '/file/api/ApiGetDownloadFiles', |
| | | method: 'GET', |
| | | responseType: 'blob', |
| | | headers:{ |
| | | 'md5s':params |
| | | } |
| | | }); |
| | | }, |
| | | // 发送下载邮件 |
| | | sendFileEmail (data) { |
| | | return request({ |
| | | url:'/file/api/ApiSendFileWithEmail', |
| | | method:'post', |
| | | data |
| | | }) |
| | | } |
| | | } |
| | | |
| | | export default fileApi; |