From 384b739a14e84b268515c39c737b71cfbebdc707 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E8=88=AA?= Date: Thu, 21 Aug 2025 17:52:21 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/course/components/talkingItem.vue | 18 +++++++++++- src/pages/course/study.vue | 32 +++++++++++---------- 2 files changed, 34 insertions(+), 16 deletions(-) diff --git a/src/pages/course/components/talkingItem.vue b/src/pages/course/components/talkingItem.vue index 4b23e9f1..2b111399 100644 --- a/src/pages/course/components/talkingItem.vue +++ b/src/pages/course/components/talkingItem.vue @@ -520,7 +520,10 @@ const audioCacheObj = computed(() => storageStore.audioObj) const showGoonBtn = computed(()=>{ return showNextBtn.value && [3, 6].indexOf(props.type) >= 0 && isLast.value // && !isPlaying.value }) + const isClick = ref(false) const goOnGetQues = () => { + if(isClick.value) return + clickNow() if([5,8].indexOf(props.type) >= 0){ // 完成问题 emit('nextQuestion', unref(dataInfo)) @@ -528,20 +531,33 @@ const audioCacheObj = computed(() => storageStore.audioObj) // 完成段落 emit('nextQuestion', unref(dataInfo), 'overGraph') } - + } + const clickNow = () => { + isClick.value = true + setTimeout(()=>{ + isClick.value = false + },800) } const goOnRestart = () => { + if(isClick.value) return + clickNow() emit('nextQuestion', unref(dataInfo), 'reStart') } const goOnRestartPrgh = () => { + if(isClick.value) return + clickNow() emit('nextQuestion', unref(dataInfo), 'reStartPrgh') } // 撤回 const withdraw = () => { + if(isClick.value) return + clickNow() emit('withdraw', unref(dataInfo)) } // 完成 const finishQuestion = (data) => { + if(isClick.value) return + clickNow() emit('finishQuestion',data) } // 答题 选择 diff --git a/src/pages/course/study.vue b/src/pages/course/study.vue index 93611c61..7d3fa14c 100644 --- a/src/pages/course/study.vue +++ b/src/pages/course/study.vue @@ -81,7 +81,8 @@ - {{item}} + {{item}} + @@ -396,7 +397,7 @@ // 去评论 common.redirectTo( `/pages/courseDetail/submit?crsId=${crsId.value}&crsNum=${crsNum.value}&from=study&imgId=${imageId.value}` - ) + ) } else { // 取消 common.redirectTo( @@ -451,7 +452,7 @@ // 去评论 common.redirectTo( `/pages/courseDetail/submit?crsId=${crsId.value}&crsNum=${crsNum.value}&from=study&imgId=${imageId.value}` - ) + ) } else { // 取消 common.redirectTo( @@ -484,7 +485,7 @@ } talkingList.value.push(JSON.parse(JSON.stringify(lastTalkingInfo.value))) qstLogId.value = _body.chatBody?.qstLogId - scrollToBottomNow() + scrollToBottomNow(800) } else { getGraphInfoUnStudy() } @@ -503,7 +504,7 @@ type: 0, id: _id }) - scrollToBottomNow(0) + scrollToBottomNow() getQuestionInfoUnStudy(info.pgrphId) } else if (type === 'overGraph') { textChartApi({ @@ -520,7 +521,7 @@ type: 0, id: _id }) - scrollToBottomNow(0) + scrollToBottomNow() getQuestionInfoUnStudy(info.pgrphId) }) } else if (type === 'reStart') { @@ -531,7 +532,6 @@ type: 0, id: _id }) - console.log(info, 112131212) // 重新回答 textChartApi({ processType: 'NEW-ANSER', //NEW-KNOW @@ -541,7 +541,7 @@ if (!_body.chatBody) { return } - console.log(info, 222222) + console.log(info, 222222) lastTalkingInfo.value = { crsId: info.crsId, qstLogId: _body.chatBody, @@ -845,7 +845,8 @@ talkingList.value.push({ ..._data, chatContent: _body.chatContent, - recordId: _body.chatBody || '', + recordId: _body.chatBody.recordId, + stdyPgrphId: _body.chatBody.stdyPgrphId, talkingContent: val, talkingVoice: '', type: 2, @@ -866,13 +867,13 @@ textChartApi({ processType: 'ANSER-WITHDRAW', requestBody: JSON.stringify({ - recordId : data.recordId + recordId: data.recordId }) }) .then(res => { // 删除撤回的数据item common.msg('撤回成功!') - talkingList.value = talkingList.value.filter(t => t.recordId !== data.recordId ) + talkingList.value = talkingList.value.filter(t => t.recordId !== data.recordId) }) } const loadingQstLogId = ref('') @@ -920,8 +921,8 @@ my_answer: [], backend_answer: [] } - talkingList.value.push(JSON.parse(JSON.stringify(lastTalkingInfo.value))) - scrollToBottomNow(0) + talkingList.value.push(JSON.parse(JSON.stringify(lastTalkingInfo.value))) + scrollToBottomNow() }) } // 完成 @@ -929,7 +930,8 @@ textChartApi({ processType: 'ANSER-OVER', requestBody: JSON.stringify({ - qstLogId: data.qstLogId + qnsId: data.qnsId, + stdyPgrphId: data.stdyPgrphId }) }) .then(res => { @@ -1045,7 +1047,7 @@ .seek-setting { position: absolute; z-index: 3; - right: 20rpx; + right: 35rpx; top: calc(v-bind(pageTopPadding) - 12rpx); font-size: 26rpx; width: 140rpx;