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.

115 lines
2.1 KiB

4 months ago
2 weeks ago
4 months 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 questionWrongColle = (data) => http.post('questionWrong/dealCollection', data,)
  24. // 通知
  25. export const indexNoticeApi = (subject) => http.get('idex/notice-'+subject, )
  26. // 轮播图
  27. export const indexAdApi = (subject) => http.get('idex/ad-'+subject, )
  28. // 获取顺序、精选练习已学题目,总题目数
  29. export const indexAdCount = (data) => http.get(`idex/count-${data.subject}-${data.carType}`, )
  30. // 考试流程
  31. export const examProcessInfo = (subject) => http.get(`idex/examProcessInfo-${subject}`, )
  32. // 分类学习了级
  33. export const columnPid = (pid) => http.get(`idex/column-${pid}`, )
  34. // 分类学习父级id
  35. export const columnFid = (data) => http.get(`idex/${data.type}-column-${data.stepType}-${data.carType}`, )