task.js 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. import {
  2. yghttp
  3. } from '@/request/index.js';
  4. // 前端分页查询任务列表
  5. export const getTaskList_Api = (param) => {
  6. return yghttp.get(`/task/page`, param)
  7. }
  8. // 获取任务详细信息
  9. export const getTaskInfo_Api = (taskId) => {
  10. return yghttp.get(`/task/info/${taskId}`)
  11. }
  12. // 获取任务详细信息
  13. export const getrReceiveTask_Api = (taskId) => {
  14. return yghttp.post(`/task/receive/${taskId}`)
  15. }
  16. // 获取我的任务列表
  17. export const getMyTask_Api = (param) => {
  18. return yghttp.get(`/myTask/page`, param)
  19. }
  20. // 获取我领取的任务详细信息
  21. export const getMyTaskInfo_Api = (receiveTaskId) => {
  22. return yghttp.get(`/myTask/info/${receiveTaskId}`)
  23. }
  24. // 获取我领取的子任务详细信息
  25. export const getMyMoreTaskInfo_Api = (receiveChildTaskId) => {
  26. return yghttp.get(`/myTask/info-child/${receiveChildTaskId}`)
  27. }
  28. // 根据任务获取我领取的任务详细信息
  29. export const TaskGetMyTaskInfo_Api = (taskId) => {
  30. return yghttp.get(`/myTask/myTaskInfo/${taskId}`)
  31. }
  32. // 提交任务前的检查
  33. export const onSubmitCheck_Api = (receiveChildTaskId) => {
  34. return yghttp.post(`/myTask/submitCheck/${receiveChildTaskId}`)
  35. }
  36. // 前端提交任务
  37. export const submitTask_Api = (data) => {
  38. return yghttp.post(`/myTask/submit`, data)
  39. }
  40. // 获取我的排行榜
  41. export const myRanking_Api = (param) => {
  42. return yghttp.get(`/myTask/myRanking`, param)
  43. }
  44. // 获取排行榜
  45. export const getRankingList_Api = (param) => {
  46. return yghttp.get(`/myTask/rankingList`, param)
  47. }
  48. // 查询用户勋章列表
  49. export const getUserMedal_Api = () => {
  50. return yghttp.get(`/user/userMedal/list`)
  51. }
  52. // MD5检查大文件
  53. export const getcheckBigFile_Api = (param) => {
  54. return yghttp.post(`/common/check-big`, param)
  55. }
  56. // 上传OSS大文件分片
  57. export const setUpload_tag_Api = (param) => {
  58. return yghttp.post(`/common/upload-tag`, param, {
  59. header: {
  60. "Content-Type": "application/x-www-form-urlencoded",
  61. },
  62. timeout: 2 * 60 * 60 * 60 * 1000
  63. })
  64. }
  65. // OSS大文件合并
  66. export const getMargeTag_Api = (param) => {
  67. return yghttp.post(`/common/marge-tag`, param)
  68. }
  69. // 获取我的任务数量
  70. export const myTackCount_Api = () => {
  71. return yghttp.get(`/myTask/myTackCount`)
  72. }