You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

135 lines
3.4 KiB

4 months ago
2 weeks ago
4 months ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
2 weeks ago
4 months ago
  1. import { http } from '@/uni_modules/uview-plus'
  2. //登录
  3. export const loginApi = (data) => http.post('token/login', data)
  4. // 验证码登录
  5. export const loginSMS = (data) => http.post('member/auth/sms-login', data, { custom: { noToken: true }})
  6. // 登录发验证码
  7. export const getLoginCode = (data) => http.post('member/auth/send-sms-code', data, { custom: { noToken: true, catch: true,}})
  8. // 获取个人信息
  9. export const getUserInfo = (data) => http.post('member/user/get', {header: {'content-type': 'application/x-www-form-urlencoded; charset=UTF-8'}})
  10. // 退出登录
  11. export const logOut = (data={}) => http.post('member/auth/logout', data, {custom: {catch: true, toast: false }})
  12. // 题库类型
  13. export const questbanktypeApi = (params={}) => http.get('idex/questbanktype/list', {params})
  14. // 进入答题页
  15. export const startQuestionApi = (data) => http.post('questionBank/startQuestion', data,)
  16. // 提交答案
  17. export const submitAnswerResultApi = (data) => http.post('questionBank/submitAnswerResult.do', data,)
  18. // 上一题-下一题-直接跳到几题
  19. export const getQuestionApi = (data) => http.post('questionBank/getQuestion', data,)
  20. // 添加反馈
  21. export const questionCommentAdd = (data) => http.post('questionComment/add', data,)
  22. // 通知
  23. export const indexNoticeApi = (subject) => http.get('idex/notice-'+subject, )
  24. // 轮播图
  25. export const indexAdApi = (subject) => http.get('idex/ad-'+subject, )
  26. // 获取顺序、精选练习已学题目,总题目数
  27. export const indexAdCount = (data) => http.get(`idex/count-${data.subject}-${data.carType}`, )
  28. // 考试流程
  29. export const examProcessInfo = (subject) => http.get(`idex/examProcessInfo-${subject}`, )
  30. // 分类学习了级
  31. export const columnPid = (pid) => http.get(`idex/column-${pid}`, )
  32. // 分类学习父级id
  33. export const columnFid = (data) => http.get(`idex/${data.type}-column-${data.stepType}-${data.carType}`, )
  34. // 添加|取消 收藏 错题
  35. export const questionWrongColle = (data) => http.post('questionWrong/dealCollection', data,)
  36. // 删除
  37. export const deleteWrongOrCol = (data) => http.post('questionWrong/deleteWrongOrCol', data,)
  38. // 我的错题
  39. export const myWrongQuestion = (data) => http.post('questionWrong/myWrongQuestion', data,)
  40. // 点击错题与收藏时,显示错题|收藏下 子菜单
  41. export const questionSubmenu = (data) => http.post('questionWrong/submenu', data,)
  42. // 点击错题|收藏 下的某个知识点的题目列表
  43. export const findQuestionList = (data) => http.post('questionWrong/findQuestionList', data,)
  44. // 我的学习--天数、错题、收藏、考试记录、合格率
  45. export const mystudy = (carType) => http.get(`mystudy/mystudy-${carType}`, )
  46. // 模拟考试科目1或者4考试首页
  47. export const questionExam = (data) => http.get(`questionExam/exam-${data.stepType}-${data.carType}`, )
  48. // 模拟考试科目1或者4考试成绩单
  49. export const examTranscript = (data) => http.get(`questionExam/examTranscript-${stepType}-${carType}`, )
  50. // 开始考试
  51. export const startExam = (data) => http.post('questionExam/startExam', data,)
  52. // 交卷,模拟考试保存接口
  53. export const startExamDo = (data) => http.post('questionExam/saveExam.do', data,)
  54. // 考试结果页
  55. export const examId = (data) => http.post(`questionExam/result-${examId}`, data,)