diff --git a/src/api/myexam/exam.js b/src/api/myexam/exam.js index 620e605..9ef15ec 100644 --- a/src/api/myexam/exam.js +++ b/src/api/myexam/exam.js @@ -4,7 +4,25 @@ const examApi = { examList: 'exam/list', // 我的考试-预约考试列表 attendList: 'exam/attend', // 我的考试-已参加考试 exam: 'exam/exam', // 我的考试进入考试 - viewReport: 'exam/viewReport' // 查看报告 + viewReport: 'exam/viewReport', // 查看报告 + viewResolution: 'exam/viewResolution', // 查看解析 + submit: 'exam/submit' // 交卷 +} + +export function reqExamViewResolution (data) { + return request({ + url: examApi.viewResolution, + method: 'get', + params: data + }) +} + +export function reqExamSubmit (data) { + return request({ + url: examApi.submit, + method: 'post', + data: data + }) } export function reqExamList (params) { diff --git a/src/components/DbExam/index.vue b/src/components/DbExam/index.vue index 0cadc27..fb128fe 100644 --- a/src/components/DbExam/index.vue +++ b/src/components/DbExam/index.vue @@ -19,7 +19,7 @@
{{ data.courseName }}
-
{{ $getCapitalizeNumber(index) }}、{{ $getQuestionTypeText(item.questionType) }}(共30题,每题1.5分,共45分)
+
{{ $getCapitalizeNumber(index) }}、{{ $getQuestionTypeText(item.questionType) }}(共{{ item.questionCount }}题,每题{{ item.questionScore }}分,共{{ item.totalScore }}分)
({}) diff --git a/src/components/DbQuestionItem/index.vue b/src/components/DbQuestionItem/index.vue index 9fdcccd..3d85e67 100644 --- a/src/components/DbQuestionItem/index.vue +++ b/src/components/DbQuestionItem/index.vue @@ -33,8 +33,8 @@ @@ -83,7 +83,8 @@ export default { props: { index: { - type: Number + type: Number, + default: 0 }, // 题目序号 type: { type: [String, Number], // 1: 单选, 2: 多选, 3: 判断题, 4: 填空题, 5: 简答题 diff --git a/src/components/DbReport/index.vue b/src/components/DbReport/index.vue index a197cf7..a4f494c 100644 --- a/src/components/DbReport/index.vue +++ b/src/components/DbReport/index.vue @@ -5,12 +5,12 @@ - + -
共30道题,答对15道。总用时30分钟
-
已击败考生10%的考生
-
全站平均得分70分
+
共{{ data.totalQuestions }}道题,答对{{ data.rightQuestions }}道。总用时{{ data.answerTime }}分钟
+
已击败考生{{ data.beat }}%的考生
+
全站平均得分{{ data.avgScore }}分
@@ -28,7 +28,7 @@
    -
  • {{item+1}}
  • +
  • {{ index+1 }}
@@ -39,6 +39,12 @@