index.ts 650 B

1234567891011121314151617181920212223242526
  1. // API List
  2. // /batchDownload/list - GET
  3. import http from '@/service/serverReq'
  4. import type { BatchDownloadFilter, BatchDownloadItemPage } from './interface'
  5. const API_List = {
  6. batchDownloadList: '/batchDownload/list',
  7. }
  8. // GET 后台任务信息
  9. export const getBatchDownloadList = async (
  10. pageSize: number,
  11. pageNum: number,
  12. filter?: BatchDownloadFilter,
  13. ): Promise<BatchDownloadItemPage> => {
  14. const res = await http.get<BatchDownloadItemPage>(API_List.batchDownloadList, {
  15. params: {
  16. pageSize,
  17. pageNum,
  18. sn: filter ? (filter.sn ?? '') : '',
  19. type: filter ? (filter.type ?? '') : '',
  20. },
  21. })
  22. return res
  23. }