diff --git a/src/components/examination/touchBtn.vue b/src/components/examination/touchBtn.vue index ef315900..653c670b 100644 --- a/src/components/examination/touchBtn.vue +++ b/src/components/examination/touchBtn.vue @@ -12,8 +12,6 @@ > 按住说话 - - { + const endTime = Date.now(); + const recordDuration = (endTime - startTime) / 1000; + console.log('当前录音时间1', recordDuration); + }) + }, 1000); }; // 结束录音 const stopRecord = () => { if(props.isDisabled) return; - - console.log('结束录音'); - + console.log('结束录音嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻'); if (startTimer.value) { clearTimeout(startTimer.value); startTimer.value = null; @@ -193,7 +196,9 @@ if (recordingStatus.value !== 'preparing') { stopRecord(); } + startTime = Date.now(); + recordingStatus.value = 'in_recording'; }); // #endif diff --git a/src/components/nav-bar/nav-bar.vue b/src/components/nav-bar/nav-bar.vue index dd29ac32..1896bdb9 100644 --- a/src/components/nav-bar/nav-bar.vue +++ b/src/components/nav-bar/nav-bar.vue @@ -33,7 +33,7 @@ width: 100%; height: var(--status-bar-height); } - + .nav-bar-div { z-index: 1900; width: 100%; diff --git a/src/pages/courseDetail/index.vue b/src/pages/courseDetail/index.vue index 32d22a59..9f9e61fe 100644 --- a/src/pages/courseDetail/index.vue +++ b/src/pages/courseDetail/index.vue @@ -143,7 +143,7 @@ const isPreview = ref(''); // 记录是否是预览 const tabAct = ref(0); const scrollTop = ref(0); - const practiceButtonDisabled = computed(() => isPreview.value === 'preview' || form.value.examStat === '02'); + const practiceButtonDisabled = computed(() => isPreview.value === 'preview' || form.value.examStat === '01'); const examinationButtonDisabled = computed(() => isPreview.value === 'preview' || form.value.examStat !== '00'); const tabSwitch = (item) => { @@ -215,7 +215,7 @@ // 去练习 const goto_practice = async () => { if (isPreview.value === 'preview') return common.msg('预览课程不允许练习'); - if (form.value.examStat !== '00') return common.msg('该课程下暂无试题'); + if (form.value.examStat === '01') return common.msg('该课程下暂无试题'); common.loading(); startPracticeByCrs({ crsId: crsId.value diff --git a/src/pages/examination/index.vue b/src/pages/examination/index.vue index 64b94445..e658916b 100644 --- a/src/pages/examination/index.vue +++ b/src/pages/examination/index.vue @@ -219,8 +219,7 @@ // 倒计时结束 const finish = (item) => { - - console.log('倒计时结束自动交卷'); + hand_in_paper('倒计时结束自动交卷') }; // 按上一题下一题 @@ -319,7 +318,7 @@ const result_click = ({ key }) => { if (key === 'hand_in_paper') { // 现在交卷 - hand_in_paper(); + hand_in_paper('弹窗确认交卷'); } else if (key === 'continue') { // 继续考试 dialogRef.value.close(); @@ -386,7 +385,8 @@ dialogRef.value.open(); }; // 执行交卷 - const hand_in_paper = () => { + const hand_in_paper = (strs='') => { + console.log('交卷的原因', strs); const answerDtoList = topicList.map((res) => { let answerItem = { examId: paperData.examId,