question.ts 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. import request from "../request"
  2. import { questionApi } from "./type"
  3. export default {
  4. //获取分类专题分类
  5. questionInfoSelectFlQuestionInfo(params: {
  6. excellIssueName?: string
  7. excellSort?: number
  8. liceBus?: string
  9. liceCar?: string
  10. liceMoto?: string
  11. liceTruck?: string
  12. subject: number
  13. }): Promise<questionApi.selectSxQuestionInfo> {
  14. return request({
  15. params,
  16. url: "/pc/question/info/selectFlQuestionInfo",
  17. method: 'get'
  18. })
  19. },
  20. //取题查询题库列表
  21. questionInfoQlist(params: {
  22. classIssue?: string
  23. classIssueName?: string
  24. subject: number
  25. isRand: string
  26. }): Promise<questionApi.selectTestK14QuestionInfoList> {
  27. return request({
  28. params,
  29. url: "/pc/question/info/qlist",
  30. method: 'get'
  31. })
  32. },
  33. //清空错题
  34. questionWrongCancelAll(data: {
  35. km: number
  36. }) {
  37. return request({
  38. data,
  39. url: "/question/wrong/cancelAll",
  40. method: 'DELETE',
  41. })
  42. },
  43. //合并本机和云端的错题
  44. questionWrongWrongs(data: {
  45. km: number
  46. wrongs: { id: number, timestamp: number }[]
  47. }) {
  48. return request({
  49. data,
  50. url: "/question/wrong/wrongs",
  51. method: 'delete',
  52. })
  53. },
  54. //合并本机和云端错题(三力测试)
  55. questionthreeWrongWrongs(data: {
  56. wrongs: { id: number, timestamp: number }[]
  57. }) {
  58. return request({
  59. data,
  60. url: "/question/threeWrong/wrongs",
  61. method: 'delete',
  62. })
  63. },
  64. //获取用户的错题
  65. questionWrongWrongByUser(params: {
  66. km: number
  67. }): Promise<{data:{ id: number, timestamp: number }[]}> {
  68. return request({
  69. params,
  70. url: "/question/wrong/wrongByUser",
  71. method: 'get',
  72. })
  73. },
  74. //(三力测试)恢复云端错题到本机(根据用户获取错题)
  75. questionThreeWrongWrongByUser(): Promise<{data:{ id: number, timestamp: number }[]}> {
  76. return request({
  77. url: "/question/threeWrong/wrongByUser",
  78. method: 'get',
  79. })
  80. },
  81. //获取题库详细信息批量取题
  82. questionInfoGetQuestionInfoByIds(params: {
  83. ids: string
  84. }): Promise<questionApi.selectTestK14QuestionInfoList> {
  85. return request({
  86. url: "/pc/question/info/getQuestionInfoByIds",
  87. method: 'get',
  88. params
  89. })
  90. },
  91. //(三力测试)获取题库详细信息批量取题
  92. threeForceGetThreeForceListIds(params: {
  93. ids: string
  94. }): Promise<questionApi.selectTestK14QuestionInfoList>{
  95. return request({
  96. url: "/three/force/getThreeForceListIds",
  97. method: 'get',
  98. params
  99. })
  100. }
  101. }