task.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright (c) 2018-2025, hnqz All rights reserved.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions are met:
  6. *
  7. * Redistributions of source code must retain the above copyright notice,
  8. * this list of conditions and the following disclaimer.
  9. * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * Neither the name of the pig4cloud.com developer nor the names of its
  13. * contributors may be used to endorse or promote products derived from
  14. * this software without specific prior written permission.
  15. * Author: hnqz
  16. */
  17. import request from '@/router/axios'
  18. export function fetchList(query) {
  19. return request({
  20. url: '/act/task/todo',
  21. method: 'get',
  22. params: query
  23. })
  24. }
  25. export function fetchDetail(id) {
  26. return request({
  27. url: '/act/task/' + id,
  28. method: 'get'
  29. })
  30. }
  31. export function fetchComment(id) {
  32. return request({
  33. url: '/act/task/comment/' + id,
  34. method: 'get'
  35. })
  36. }
  37. export function doTask(obj) {
  38. return request({
  39. url: '/act/task',
  40. method: 'post',
  41. data: obj
  42. })
  43. }