diff --git a/src/api/mycourse/index.js b/src/api/mycourse/index.js index a7b1bd2..1a013ba 100644 --- a/src/api/mycourse/index.js +++ b/src/api/mycourse/index.js @@ -9,9 +9,12 @@ const mycourseApi = { recommendDetail: 'sys/recommend/detail', // 系统课程推荐详情 getCourseDetail: 'myCourse/getCourseDetail', // 我的课程详情 getCourseCatalogue: 'myCourse/getCourseCatalogue', // 获取课程目录 + reqCourseExam: 'testInClass/add', // 课中检测 simulateTestList: 'simulateTest/list', // 模拟测试列表 simulateTestDetail: 'simulateTest/getQuestions', // 获取模拟测试详情 - operationList: 'classwork/getDetail', // 作业列表 + operationList: 'classwork/list', // 作业列表 + reqOperationDetail: 'classwork/get', // 作业详情 + reqOperationSubmit: 'classwork/submit', // 作业提交 getMyCourseList: 'studyStatistics/getMyCourseList' // 课程学习统计 } @@ -23,10 +26,26 @@ export function reqMycourseCount (params) { }) } +export function reqOperationDetail (params) { + return request({ + url: mycourseApi.reqOperationDetail, + method: 'get', + params: params + }) +} + +export function reqOperationSubmit (params) { + return request({ + url: mycourseApi.reqOperationSubmit, + method: 'post', + data: params + }) +} + export function reqOperationList (params) { return request({ url: mycourseApi.operationList, - method: 'post', + method: 'get', params: params }) } @@ -111,3 +130,12 @@ export function reqCourseCatalogue (params) { params: params }) } + +export function reqCourseExam (params, data) { + return request({ + url: mycourseApi.reqCourseExam, + method: 'post', + params: params, + data: data + }) +} diff --git a/src/api/myexam/exam.js b/src/api/myexam/exam.js index 9ef15ec..0e23d0f 100644 --- a/src/api/myexam/exam.js +++ b/src/api/myexam/exam.js @@ -6,7 +6,8 @@ const examApi = { exam: 'exam/exam', // 我的考试进入考试 viewReport: 'exam/viewReport', // 查看报告 viewResolution: 'exam/viewResolution', // 查看解析 - submit: 'exam/submit' // 交卷 + submit: 'exam/submit', // 交卷 + subscribe: '/exam/subscribe' } export function reqExamViewResolution (data) { @@ -17,6 +18,14 @@ export function reqExamViewResolution (data) { }) } +export function reqExamSubscribe (data) { + return request({ + url: examApi.subscribe, + method: 'get', + params: data + }) +} + export function reqExamSubmit (data) { return request({ url: examApi.submit, diff --git a/src/components/DbExam/index.vue b/src/components/DbExam/index.vue index fb128fe..493bfb5 100644 --- a/src/components/DbExam/index.vue +++ b/src/components/DbExam/index.vue @@ -8,7 +8,7 @@ - @@ -35,6 +37,28 @@ export default { }, data () { return {} + }, + filters: { + trainWayText: function (value) { + let result = '' + switch (value) { + case '1': + result = '培训' + break + case '2': + result = '考试' + break + case '3': + result = '培训练习' + break + case '4': + result = '培训练习考试' + break + default: + break + } + return result + } } } diff --git a/src/components/DbQuestionItem/index.vue b/src/components/DbQuestionItem/index.vue index 3d85e67..9ba88a1 100644 --- a/src/components/DbQuestionItem/index.vue +++ b/src/components/DbQuestionItem/index.vue @@ -2,12 +2,12 @@
{{ index || 1 }}、 - ({{ $getQuestionTypeText(type) }}) + ({{ $getQuestionTypeText(data.questionType) }})
-