diff --git a/pages/learningCenter/brushQuestion.vue b/pages/learningCenter/brushQuestion.vue index 0937c21..97d3f4d 100644 --- a/pages/learningCenter/brushQuestion.vue +++ b/pages/learningCenter/brushQuestion.vue @@ -53,7 +53,7 @@ import { specialTestPaper } from '@/api/learning'; methods: { toContent(item) { uni.navigateTo({ - url: `/pages/special/question_index?id=${item.id}&is_analysis=${1}`, + url: `/pages/special/question_index?id=${item.id}&is_analysis=${1}&special_id=${this.id}`, }); }, async specialTestPaper() { diff --git a/pages/special/question_index.vue b/pages/special/question_index.vue index 42aeaf3..da71141 100644 --- a/pages/special/question_index.vue +++ b/pages/special/question_index.vue @@ -102,14 +102,16 @@ isOpenWeixing: false, status: -1, is_analysis: 0, + special_id: 0, }; }, - onLoad({ id, isMember, is_analysis }) { + onLoad({ id, isMember, is_analysis, special_id }) { this.id = Number(id); this.isMember = isMember; + this.special_id = special_id || ''; this.getDetail(); this.getAuthInfo(); - if (parseInt(is_analysis)) { + if (is_analysis && parseInt(is_analysis)) { this.is_analysis = parseInt(is_analysis); } else { this.is_analysis = 0; @@ -133,7 +135,7 @@ if (this.status == 1) this.$util.setStorage(`exam_time${id}`, 0); console.log(this.$util.getStorage(`exam_time${id}`)); uni.navigateTo({ - url: `/pages/topic/question_detail?test_id=${id}&is_analysis=${this.is_analysis}` + url: `/pages/topic/question_detail?test_id=${id}&is_analysis=${this.is_analysis}&special_id=${this.special_id}` }); }, async getAuthInfo() { diff --git a/pages/topic/question_detail.vue b/pages/topic/question_detail.vue index 74b2ca7..72fcd47 100644 --- a/pages/topic/question_detail.vue +++ b/pages/topic/question_detail.vue @@ -8,7 +8,7 @@ 答题卡 {{ duration | formatTime }} @@ -200,8 +200,9 @@ export default { } }, }, - onLoad({ test_id, type, index = 0, e_id, is_analysis }) { + onLoad({ test_id, type, index = 0, e_id, is_analysis, special_id }) { this.test_id = test_id; + this.special_id = special_id; this.activeIndex = Number(index); const task = this.getData(); @@ -302,6 +303,7 @@ export default { "/pages/topic/question_sheet?" + this.$util.objToParam({ test_id: this.test_id, + special_id: this.special_id, record_id: this.e_id, index: this.activeIndex, is_analysis: this.is_analysis, @@ -321,6 +323,7 @@ export default { "/pages/topic/question_sheet?" + this.$util.objToParam({ test_id: this.test_id, + special_id: this.special_id, record_id: this.e_id, index: this.activeIndex, is_analysis: this.is_analysis, diff --git a/pages/topic/question_result.vue b/pages/topic/question_result.vue index cd2499e..48aea70 100644 --- a/pages/topic/question_result.vue +++ b/pages/topic/question_result.vue @@ -60,9 +60,9 @@ :class="{ no: item.is_correct === 1, ok: item.is_correct === 2 }">{{ index + 1 }} - 查看解析 + 查看解析 - 再考一次 + 再考一次 @@ -96,12 +96,14 @@ export default { fill: { gradient: ["rgba(44, 142, 255, 1)", "rgba(44, 142, 255, 0.05)"] }, footerHidden: false, imgSrc: "", - userInfo: {} + userInfo: {}, + special_id: 0, }; }, - onLoad({ test_id, from, is_analysis }) { + onLoad({ test_id, from, is_analysis, special_id }) { this.test_id = test_id; this.is_analysis = parseInt(is_analysis); + this.special_id = special_id; this.footerHidden = from === "question_user"; this.$util.removeStorage("exam_time"); diff --git a/pages/topic/question_sheet.vue b/pages/topic/question_sheet.vue index 5729a4b..eca3a52 100644 --- a/pages/topic/question_sheet.vue +++ b/pages/topic/question_sheet.vue @@ -26,12 +26,12 @@ open-type="redirect" v-for="(item, index) in questions" :class="{ blue: item.is_correct }" - :url="`/pages/topic/question_detail?test_id=${test_id}&e_id=${record_id}&is_analysis=${is_analysis}&index=${index}&txamination_time=${txamination_time}&exam_time=${duration}`" + :url="`/pages/topic/question_detail?test_id=${test_id}&special_id=${special_id}&e_id=${record_id}&is_analysis=${is_analysis}&index=${index}&txamination_time=${txamination_time}&exam_time=${duration}`" >{{ index + 1 }} - + 提交考试 @@ -72,15 +72,19 @@ export default { loading: false, is_analysis: 0, txamination_time: 0, + special_id: 0, + check_analysis: 0, }; }, - onLoad({ test_id, record_id, is_analysis, index, txamination_time }) { + onLoad({ test_id, record_id, is_analysis, index, txamination_time, special_id, check_analysis }) { const exam_time = this.$util.getStorage(`exam_time${test_id}`); if (exam_time) { this.exam_time = parseInt(exam_time); } this.test_id = test_id; this.record_id = record_id; + this.special_id = special_id; + this.check_analysis = check_analysis; this.is_analysis = parseInt(is_analysis); if (index) { this.index = parseInt(index); @@ -139,6 +143,7 @@ export default { try { const { data, code, msg } = await submitTestPaper({ examination_id: this.record_id, + special_id: this.special_id, type: 2, duration: this.duration, }); @@ -149,7 +154,7 @@ export default { this.$util.removeStorage("exam_time"); // this.is_analysis = 1; uni.redirectTo({ - url: `/pages/topic/question_result?test_id=${this.test_id}&is_analysis=${this.is_analysis}`, + url: `/pages/topic/question_result?test_id=${this.test_id}&special_id=${this.special_id}&is_analysis=${this.is_analysis}`, }); } else { this.$util.showMsg(msg);