homework.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. import request from '@/utils/request'
  2. //
  3. // GET
  4. // /prod-api/front/homework/getHomeworks
  5. // 01 查询作业模板
  6. export function getHomeworks(params) {
  7. return request({
  8. url: '/front/homework/getHomeworks',
  9. method: 'get',
  10. params
  11. })
  12. }
  13. //
  14. // GET
  15. // /prod-api/front/homework/getStudentHomeworks
  16. // 01 查询学生作业列表
  17. export function getStudentHomeworks(params) {
  18. return request({
  19. url: '/front/homework/getStudentHomeworks',
  20. method: 'get',
  21. params
  22. })
  23. }
  24. //
  25. // GET
  26. // /prod-api/front/homework/getTeacherHomeworks
  27. // 01 查询老师发布作业列表
  28. export function getTeacherHomeworks(params) {
  29. return request({
  30. url: '/front/homework/getTeacherHomeworks',
  31. method: 'get',
  32. params
  33. })
  34. }
  35. //
  36. // GET
  37. // /prod-api/front/homework/getHomeworkStudents
  38. // 01 查询作业的学生列表
  39. export function getHomeworkStudents(params) {
  40. return request({
  41. url: '/front/homework/getHomeworkStudents',
  42. method: 'get',
  43. params
  44. })
  45. }
  46. //
  47. // POST
  48. // /prod-api/front/homework/publicStudentHomework
  49. // 01 发布学生作业
  50. export function publicStudentHomework(data) {
  51. return request({
  52. url: '/front/homework/publicStudentHomework',
  53. method: 'post',
  54. data
  55. })
  56. }
  57. //
  58. // POST
  59. // /prod-api/front/homework/saveHomeworks
  60. // 01 保存作业模板
  61. export function saveHomeworks(data) {
  62. return request({
  63. url: '/front/homework/saveHomeworks',
  64. method: 'post',
  65. data
  66. })
  67. }