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.

154 lines
4.5 KiB

4 months ago
1 month ago
4 months ago
1 month ago
2 weeks ago
1 month ago
2 weeks ago
2 weeks ago
2 weeks ago
1 month ago
1 week ago
1 month ago
1 month ago
3 weeks ago
2 weeks ago
1 week ago
2 weeks ago
2 weeks ago
1 month 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', 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}`, {params: {city: data.city}})
  28. // 考试流程
  29. export const examProcessInfo = (subject) => http.get(`idex/examProcessInfo-${subject}`, )
  30. // 分类学习了级
  31. export const columnPid = (pid, city) => http.get(`idex/column-${pid}-${city}`, {params: {city}})
  32. // 分类学习父级id
  33. export const columnFid = (data) => http.get(`idex/${data.type}-column-${data.stepType}-${data.carType}`, {params: {city: data.city}} )
  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. // 模拟考试或者仿真考试统计
  47. export const examStatistics = (data) => http.get(`mystudy/${data.examType}-examStatistics-${data.stepType}-${data.carType}`, )
  48. // 模拟考试科目1或者4考试首页
  49. export const questionExam = (data) => http.get(`questionExam/exam-${data.stepType}-${data.carType}`, )
  50. // 模拟考试科目1或者4考试成绩单
  51. export const examTranscript = (data) => http.get(`questionExam/examTranscript-${data.stepType}-${data.carType}`, )
  52. // 开始考试
  53. export const startExam = (data) => http.post('questionExam/startExam', data,)
  54. // 交卷,模拟考试保存接口
  55. export const startExamDo = (data) => http.post('questionExam/saveExam.do', data,)
  56. // 考试结果页
  57. export const examId = (data) => http.post(`questionExam/result-${examId}`, data,)
  58. // 模拟考试次数、通过率
  59. export const idexExam = (data) => http.get(`idex/exam-${data.stepType}-${data.carType}`, )
  60. // 获取行政区划下拉树列表
  61. export const treeSelect = (carType) => http.get(`idex/treeSelect`, )
  62. // 会员等级
  63. export const memberGradelist = (carType) => http.get(`vip/memberGradelist-${carType}`, )
  64. // 会员VIP之声
  65. export const memberVoicePage = (data) => http.post(`vip/memberVoicePage`, data,)
  66. // 购买会员创建预支付订单
  67. export const createPrepaidApi = (data) => http.post(`vip/createPrepaid`, data,)
  68. // 查询购买信息状态
  69. export const outTradeNApi = (outTradeNo) => http.get(`getPrepaid-${outTradeNo}`, )
  70. // 支付渠道的统一【支付】回调
  71. export const channelIdApi = (channelId) => http.get(`vip/notify/${channelId}`, )
  72. // 购买记录列表
  73. export const memberGradePayPage = (data) => http.post(`vip/memberGradePayPage`,data )