Commit 071a7a7c authored by Facius's avatar Facius

feat: 跳着答题

parent 783c28aa
...@@ -3,7 +3,7 @@ let learnApiFun = function(vm) { ...@@ -3,7 +3,7 @@ let learnApiFun = function(vm) {
let ucenterApiUrl = globalUrl.uUrl let ucenterApiUrl = globalUrl.uUrl
let getQuestion = async (params = {}) => let getQuestion = async (params = {}) =>
await vm.$u.post('/rest/question/query/getQuestion', params) await vm.$u.post('/rest/V2/question/query/getQuestion', params)
let getQuestionTotal = async (params = {}) => let getQuestionTotal = async (params = {}) =>
await vm.$u.post('/rest/V2/question/query/getQuestionTotal', params) await vm.$u.post('/rest/V2/question/query/getQuestionTotal', params)
...@@ -62,7 +62,7 @@ let learnApiFun = function(vm) { ...@@ -62,7 +62,7 @@ let learnApiFun = function(vm) {
let applyExam = async (params = {}) => let applyExam = async (params = {}) =>
await vm.$u.get( await vm.$u.get(
`/rest/question/applyExam/${params.questionWarehouseId}/${params.paperId}`, `/rest/V2/question/applyExam/${params.questionWarehouseId}/${params.paperId}`,
params params
) )
......
...@@ -116,6 +116,7 @@ export default { ...@@ -116,6 +116,7 @@ export default {
methods: { methods: {
init (defaulaIndex) { init (defaulaIndex) {
let list = JSON.parse(JSON.stringify(this.list)) let list = JSON.parse(JSON.stringify(this.list))
console.log('bbb:', list)
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
return return
} }
......
...@@ -133,6 +133,7 @@ export default { ...@@ -133,6 +133,7 @@ export default {
this.$emit('click', this.type) this.$emit('click', this.type)
}, },
handleClose() { handleClose() {
console.log('aaaa:', this.visible)
this.changeVisibleValue(false) this.changeVisibleValue(false)
} }
}, },
......
...@@ -163,15 +163,16 @@ export default { ...@@ -163,15 +163,16 @@ export default {
falsePercent() { falsePercent() {
if (this.info.score == 0) return 6 if (this.info.score == 0) return 6
var random = [94, 99] var random = [94, 99]
if (this.info.score < this.info.pageTotalPoint * 0.1 if (this.info.score < this.info.pageTotalPoint * 0.1) {
) {
random = [6, 14] random = [6, 14]
} else if (this.info.score < this.info.pageTotalPoint * 0.3 && } else if (
this.info.score >= this.info.pageTotalPoint * 0.1 this.info.score < this.info.pageTotalPoint * 0.3 &&
this.info.score >= this.info.pageTotalPoint * 0.1
) { ) {
random = [14, 55] random = [14, 55]
} else if (this.info.score < this.info.pageTotalPoint * 0.6 && } else if (
this.info.score >= this.info.pageTotalPoint * 0.3 this.info.score < this.info.pageTotalPoint * 0.6 &&
this.info.score >= this.info.pageTotalPoint * 0.3
) { ) {
random = [55, 65] random = [55, 65]
} else if ( } else if (
......
...@@ -62,7 +62,10 @@ function request({ currentPage, size, onSuccess, onFailed }, vm) { ...@@ -62,7 +62,10 @@ function request({ currentPage, size, onSuccess, onFailed }, vm) {
rightKey: info.answer.split(','), rightKey: info.answer.split(','),
explain: info.analysis, explain: info.analysis,
type: type, type: type,
collectionFlag: info.collectionFlag collectionFlag: info.collectionFlag,
userAnswer: info.userAnswer,
submitStatus: info.userAnswer ? true : null,
result: info.userAnswer ? (info.userAnswer == info.answer ? 'pass' : 'fail') : null
} }
// 回显已答题目 // 回显已答题目
if (vm.source === 1) { // 练习模式回显 if (vm.source === 1) { // 练习模式回显
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment