Commit 071a7a7c authored by Facius's avatar Facius

feat: 跳着答题

parent 783c28aa
......@@ -3,7 +3,7 @@ let learnApiFun = function(vm) {
let ucenterApiUrl = globalUrl.uUrl
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 = {}) =>
await vm.$u.post('/rest/V2/question/query/getQuestionTotal', params)
......@@ -62,7 +62,7 @@ let learnApiFun = function(vm) {
let applyExam = async (params = {}) =>
await vm.$u.get(
`/rest/question/applyExam/${params.questionWarehouseId}/${params.paperId}`,
`/rest/V2/question/applyExam/${params.questionWarehouseId}/${params.paperId}`,
params
)
......
......@@ -116,6 +116,7 @@ export default {
methods: {
init (defaulaIndex) {
let list = JSON.parse(JSON.stringify(this.list))
console.log('bbb:', list)
if (list == null || list.length == 0) {
return
}
......
......@@ -133,6 +133,7 @@ export default {
this.$emit('click', this.type)
},
handleClose() {
console.log('aaaa:', this.visible)
this.changeVisibleValue(false)
}
},
......
......@@ -163,15 +163,16 @@ export default {
falsePercent() {
if (this.info.score == 0) return 6
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]
} else if (this.info.score < this.info.pageTotalPoint * 0.3 &&
this.info.score >= this.info.pageTotalPoint * 0.1
} else if (
this.info.score < this.info.pageTotalPoint * 0.3 &&
this.info.score >= this.info.pageTotalPoint * 0.1
) {
random = [14, 55]
} else if (this.info.score < this.info.pageTotalPoint * 0.6 &&
this.info.score >= this.info.pageTotalPoint * 0.3
} else if (
this.info.score < this.info.pageTotalPoint * 0.6 &&
this.info.score >= this.info.pageTotalPoint * 0.3
) {
random = [55, 65]
} else if (
......
......@@ -62,7 +62,10 @@ function request({ currentPage, size, onSuccess, onFailed }, vm) {
rightKey: info.answer.split(','),
explain: info.analysis,
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) { // 练习模式回显
......
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