task.js 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. import {
  2. yghttp
  3. } from '@/common/request/index-yg.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 onSubmitCheck_Api = (receiveChildTaskId) => {
  30. return yghttp.post(`/myTask/submitCheck/${receiveChildTaskId}`)
  31. }
  32. // 前端提交任务
  33. export const submitTask_Api = (data) => {
  34. return yghttp.post(`/myTask/submit`, data)
  35. }
  36. // 获取我的排行榜
  37. export const myRanking_Api = (param) => {
  38. return yghttp.get(`/myTask/myRanking`, param)
  39. }
  40. // 获取排行榜
  41. export const getRankingList_Api = (param) => {
  42. return yghttp.get(`/myTask/rankingList`, param)
  43. }
  44. // 查询用户勋章列表
  45. export const getUserMedal_Api = () => {
  46. return yghttp.get(`/user/userMedal/list`)
  47. }
  48. // MD5检查大文件
  49. export const getcheckBigFile_Api = (param) => {
  50. return yghttp.post(`/common/check-big`, param)
  51. }
  52. // 上传OSS大文件分片
  53. export const setUpload_tag_Api = (param) => {
  54. return yghttp.post(`/common/upload-tag`, param, {
  55. header: {
  56. "Content-Type": "application/x-www-form-urlencoded",
  57. },
  58. timeout: 2 * 60 * 60 * 60 * 1000
  59. })
  60. }
  61. // OSS大文件合并
  62. export const getMargeTag_Api = (param) => {
  63. return yghttp.post(`/common/marge-tag`, param)
  64. }
  65. // 获取我的任务数量
  66. export const myTackCount_Api = () => {
  67. return yghttp.get(`/myTask/myTackCount`)
  68. }