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