exam.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. import request from '@/common/request.js'
  2. /**
  3. * 获取考试列表
  4. * @param {Object} data
  5. */
  6. export function examPaging(data) {
  7. return request.post('/api/exam/exam/online-paging', data);
  8. }
  9. /**
  10. * 获取考试详情
  11. * @param {Object} id
  12. */
  13. export function examDetail(id) {
  14. return request.post('/api/exam/exam/detail', { id: id});
  15. }
  16. /**
  17. * 创建试卷
  18. * @param {Object} id
  19. */
  20. export function createPaper(data) {
  21. return request.post('/api/paper/paper/create-paper', data);
  22. }
  23. /**
  24. * 获取试卷详情
  25. * @param {Object} id
  26. */
  27. export function paperDetail(id) {
  28. return request.post('/api/paper/paper/paper-detail', { id: id});
  29. }
  30. /**
  31. * 试卷详情
  32. * @param data
  33. */
  34. export function paperResult(id) {
  35. return request.post('/api/paper/paper/paper-result', { id: id});
  36. }
  37. /**
  38. * 获取题目详情
  39. * @param {Object} id
  40. */
  41. export function paperQuDetail(paperId, quId) {
  42. return request.post('/api/paper/paper/qu-detail', { paperId: paperId, quId: quId});
  43. }
  44. /**
  45. * 填充答案
  46. * @param {Object} id
  47. */
  48. export function fillAnswer(data) {
  49. return request.post('/api/paper/paper/fill-answer', data);
  50. }
  51. /**
  52. * 交卷
  53. * @param {Object} id
  54. */
  55. export function handExam(data) {
  56. return request.post('/api/paper/paper/hand-exam', data);
  57. }
  58. /**
  59. * 检查是否有进行中的考试
  60. * @returns {*}
  61. */
  62. export function checkProcess() {
  63. return request.post('/api/paper/paper/check-process', {})
  64. }
  65. /**
  66. * 校验考试信息
  67. * @param id
  68. * @returns {*}
  69. */
  70. export function checkInfo(id) {
  71. return request.post('/api/exam/exam/check-info', { id: id })
  72. }