修改课程详情的两个按钮判断

This commit is contained in:
田岩
2025-09-01 14:11:15 +08:00
parent 4eebd75345
commit 4789c1d563
4 changed files with 19 additions and 14 deletions
+12 -7
View File
@@ -12,8 +12,6 @@
>
按住说话
</uv-button>
<uv-input
v-if="keyboardIsShow"
class="input-box"
@@ -146,15 +144,20 @@
console.log('延迟开始');
recordingStatus.value = 'preparing';
popupRef.value.open();
recorderManager.start();
}, 80);
recorderManager.start({duration:6000});
startTime = Date.now();
setInterval(() => {
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
+1 -1
View File
@@ -33,7 +33,7 @@
width: 100%;
height: var(--status-bar-height);
}
.nav-bar-div {
z-index: 1900;
width: 100%;
+2 -2
View File
@@ -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
+4 -4
View File
@@ -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,