bug修复
This commit is contained in:
parent
e7a1274dbf
commit
7bf27993b3
|
|
@ -139,6 +139,7 @@ import config from '@/config'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isLoading: false,
|
||||||
// 考试id
|
// 考试id
|
||||||
examId: '',
|
examId: '',
|
||||||
// 考试记录id
|
// 考试记录id
|
||||||
|
|
@ -369,6 +370,15 @@ export default {
|
||||||
},
|
},
|
||||||
// 确认提交
|
// 确认提交
|
||||||
handleConfirmSubmit() {
|
handleConfirmSubmit() {
|
||||||
|
console.log('🚀 ~ 提交-->', this.isLoading)
|
||||||
|
if (this.isLoading) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '正在提交中, 请稍后',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.isLoading = true
|
||||||
// 停止计时
|
// 停止计时
|
||||||
this.$refs.countDown.pause()
|
this.$refs.countDown.pause()
|
||||||
const params = {
|
const params = {
|
||||||
|
|
@ -390,7 +400,6 @@ export default {
|
||||||
success: res => {
|
success: res => {
|
||||||
console.log('🚀 ~ handleConfirmSubmit ~ res:', res)
|
console.log('🚀 ~ handleConfirmSubmit ~ res:', res)
|
||||||
res = res.data
|
res = res.data
|
||||||
this.showConfirmModal = false
|
|
||||||
const params2 = {
|
const params2 = {
|
||||||
examId: this.examId,
|
examId: this.examId,
|
||||||
examGrade: res.examGrade,
|
examGrade: res.examGrade,
|
||||||
|
|
@ -411,6 +420,10 @@ export default {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/YNEduApp/exam/examinationDetails?params=${JSON.stringify(params2)}`
|
url: `/pages/YNEduApp/exam/examinationDetails?params=${JSON.stringify(params2)}`
|
||||||
})
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
this.showConfirmModal = false
|
||||||
|
this.isLoading = false
|
||||||
|
}, 1000)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (this.studyId) {
|
if (this.studyId) {
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ export default {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isLoading: false,
|
||||||
studyId: '', // 学习id
|
studyId: '', // 学习id
|
||||||
stageId: '', // 阶段id
|
stageId: '', // 阶段id
|
||||||
stageContentId: '', // 阶段内容id
|
stageContentId: '', // 阶段内容id
|
||||||
|
|
@ -103,6 +104,14 @@ export default {
|
||||||
},
|
},
|
||||||
// 结束学习
|
// 结束学习
|
||||||
handleEnd() {
|
handleEnd() {
|
||||||
|
if (this.isLoading) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '正在提交中, 请稍后',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.isLoading = true
|
||||||
if (this.isEnd) {
|
if (this.isEnd) {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/YNEduApp/learnProj/learnProjDetail?id=' + this.studyId
|
url: '/pages/YNEduApp/learnProj/learnProjDetail?id=' + this.studyId
|
||||||
|
|
@ -149,10 +158,13 @@ export default {
|
||||||
},
|
},
|
||||||
success: res => {
|
success: res => {
|
||||||
console.log('🚀 ~ handleEnd ~ res:', res)
|
console.log('🚀 ~ handleEnd ~ res:', res)
|
||||||
this.showModal = false
|
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/YNEduApp/learnProj/learnProjDetail?id=' + this.studyId
|
url: '/pages/YNEduApp/learnProj/learnProjDetail?id=' + this.studyId
|
||||||
})
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
this.isLoading = false
|
||||||
|
this.showModal = false
|
||||||
|
}, 1000)
|
||||||
},
|
},
|
||||||
fail: err => {
|
fail: err => {
|
||||||
console.log('🚀 ~ handleEnd ~ err:', err)
|
console.log('🚀 ~ handleEnd ~ err:', err)
|
||||||
|
|
|
||||||
|
|
@ -317,6 +317,18 @@ export default {
|
||||||
// 跳转考试
|
// 跳转考试
|
||||||
toggleTheoryExam(item) {
|
toggleTheoryExam(item) {
|
||||||
console.log('🚀 ~ toggleTheoryExam ~ item:', item, item.examMsg.examEquipment)
|
console.log('🚀 ~ toggleTheoryExam ~ item:', item, item.examMsg.examEquipment)
|
||||||
|
const date = new Date()
|
||||||
|
const year = date.getFullYear()
|
||||||
|
const month = date.getMonth() + 1
|
||||||
|
const day = date.getDate()
|
||||||
|
const today = `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day}`
|
||||||
|
if (today < item.examMsg.validityDate.split('~')[0] || today > item.examMsg.validityDate.split('~')[1]) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '当前时间不在考试时间范围内',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
if (item.examMsg.examEquipment == 2) {
|
if (item.examMsg.examEquipment == 2) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请在电脑端进行考试',
|
title: '请在电脑端进行考试',
|
||||||
|
|
@ -324,6 +336,20 @@ export default {
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// examCount 1: 不限次 2: 及格终止 3: 自定义
|
||||||
|
if (item.examMsg.examCount == 2 && item.examMsg.results == 1) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '此考试及格终止, 考试以及格, 无需再次考试',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
} else if (item.examMsg.examCount == 3 && item.examMsg.examNum >= item.examMsg.examCustom) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '此考试有次数限制, 考试次数已达上限, 无法再考试了',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
const params = {
|
const params = {
|
||||||
id: item.examMsg.id, // 考试id
|
id: item.examMsg.id, // 考试id
|
||||||
cutNum: item.examMsg.isCut, // 切屏次数
|
cutNum: item.examMsg.isCut, // 切屏次数
|
||||||
|
|
|
||||||
|
|
@ -218,6 +218,7 @@ import config from '@/config'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
isLoading: false,
|
||||||
practiceId: '', // 练习id
|
practiceId: '', // 练习id
|
||||||
recordId: '', // 记录id
|
recordId: '', // 记录id
|
||||||
isNew: 1, // 是否新练习
|
isNew: 1, // 是否新练习
|
||||||
|
|
@ -606,7 +607,8 @@ export default {
|
||||||
recordId: this.recordId,
|
recordId: this.recordId,
|
||||||
questionId: this.questionList[0].questionId,
|
questionId: this.questionList[0].questionId,
|
||||||
selectAnswer: select.join(''),
|
selectAnswer: select.join(''),
|
||||||
isTrue: isCorrect ? 1 : 0
|
isTrue: isCorrect ? 1 : 0,
|
||||||
|
isMiss: this.isError ? '1' : ''
|
||||||
}
|
}
|
||||||
console.log('🚀 ~ handleOk ~ params-多选:', params)
|
console.log('🚀 ~ handleOk ~ params-多选:', params)
|
||||||
// insertPracticeAnswerById(params)
|
// insertPracticeAnswerById(params)
|
||||||
|
|
@ -662,6 +664,14 @@ export default {
|
||||||
},
|
},
|
||||||
// 结束答题
|
// 结束答题
|
||||||
handleClose() {
|
handleClose() {
|
||||||
|
if (this.isLoading) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '正在提交中, 请稍后',
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.isLoading = true
|
||||||
this.isEnd = true
|
this.isEnd = true
|
||||||
// 停止计时
|
// 停止计时
|
||||||
clearInterval(this.intervalId)
|
clearInterval(this.intervalId)
|
||||||
|
|
@ -734,7 +744,10 @@ export default {
|
||||||
url: '/pages/YNEduApp/prac/prac'
|
url: '/pages/YNEduApp/prac/prac'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.showModal = false
|
setTimeout(() => {
|
||||||
|
this.isLoading = false
|
||||||
|
this.showModal = false
|
||||||
|
}, 500)
|
||||||
},
|
},
|
||||||
// 打开题目选择弹框
|
// 打开题目选择弹框
|
||||||
async openSelect() {
|
async openSelect() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue