From 416d4eeb3a2de247390f0c10acd671d2107d616c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E5=B2=A9?= Date: Fri, 6 Mar 2026 16:36:05 +0800 Subject: [PATCH] =?UTF-8?q?JLBA202505130001=5F=E5=85=B3=E4=BA=8E=E5=90=89?= =?UTF-8?q?=E6=9E=97=E9=93=B6=E8=A1=8C=E6=96=B0=E5=BB=BAAI=E6=99=BA?= =?UTF-8?q?=E8=83=BD=E5=9F=B9=E8=AE=AD=E7=B3=BB=E7=BB=9F=E7=9A=84=E9=9C=80?= =?UTF-8?q?=E6=B1=82=5F=E5=BC=80=E5=8F=91=E5=AE=89=E5=8D=93=E5=BD=95?= =?UTF-8?q?=E9=9F=B3=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/course/study.vue | 76 ++++++++++++++++++- src/pages/index/components/question.vue | 39 ++++++++-- src/pages/index/components/talking-item.vue | 2 +- src/pages/index/dialog.vue | 34 +++++++-- .../ty-recording/utssdk/app-android/index.uts | 40 +++++++++- 5 files changed, 173 insertions(+), 18 deletions(-) diff --git a/src/pages/course/study.vue b/src/pages/course/study.vue index 9667dcc0..abff4c30 100644 --- a/src/pages/course/study.vue +++ b/src/pages/course/study.vue @@ -103,8 +103,25 @@ :canAnswer="testAnswer" :adjustPosition="true" :canAnswerText="canAnswerText" - :answerMethod="answerMethod" + :answerMethod="answerMethod" :isDisabled="(lastTalkingInfo.type || 0) !== 4 || ['SN', 'MU', 'JD'].includes(lastTalkingInfo.qnsTyp)" /> + + + @@ -165,8 +182,8 @@ import common from '@/common/common' import TalkingItem from '@/pages/course/components/talkingItem.vue' import ImagePreview from '@/components/image-preview/image-preview.vue' import PreviewDetail from '@/components/image-preview/preview-detail.vue' -import TouchBtn from '@/pages/course/components/touchBtn.vue' -import TouchBtnOnlyVoice from '@/pages/course/components/touchBtnOnlyVoice.vue' +// import TouchBtn from '@/pages/course/components/touchBtn.vue' +// import TouchBtnOnlyVoice from '@/pages/course/components/touchBtnOnlyVoice.vue' import badge from '@/components/points-and-badge/badge'; import points from '@/components/points-and-badge/points'; import usePointsAndBadge from '@/components/points-and-badge/usePointsAndBadge'; @@ -885,6 +902,59 @@ const testAnswer = computed(() => { let _num = _arr.map(t => [1, 2, 6].indexOf(Number(t.type)) >= 0).filter(t => !!t) return _num.length < 5 }) + + + +const sendLoading = () => { + if (!testAnswer.value) { + common.msg('每个问题最多连续发送五次答案!') + return + } + isUploadingVoice.value = true + let _data = { + stdyId: unref(stdyId), + qnsId: unref(lastTalkingInfo).qnsId, // 问题ID 必输项:true 类型:String + pgrphId: unref(lastTalkingInfo).pgrphId, // 段落ID 必输项:true 类型:String + qstLogId: unref(qstLogId), // 段落ID 必输项:true 类型:String + crsId: crsId.value, // 课程ID 必输项:true 类型:String + stdyBatch: stdyBatch.value, // 学习批次 必输项:true 类型:String + ansterContent: '', // 回答文本内容 必输项:false 类型:String + asrStartTm: unref(lastTalkingInfo).asrStartTm + } + let _id = new Date().getTime() + 'id' + //#ifndef APP-PLUS + // h5 假数据 + talkingList.value.push({ + crsId: crsId.value, + pgrphId: unref(lastTalkingInfo).pgrphId, + qnsId: unref(lastTalkingInfo).qnsId, + talkingContent: '', + talkingVoice: voicePath, + type: 1, + userInfo: { + ...choiceTeacherInfo.value + }, + id: _id + }) + setIsUploadingVoice() + scrollToBottomNow() + // #endif + +} +// 新录音组件语音提交 +const submitVoice = ({ossKey,text}) => { + if(!ossKey) { + + } else if (text === '') { + + } else { + + unref(ajaxApi)({ + processType: 'ANSER-TEXT', + requestBody: JSON.stringify(_data) + }) + } +} const uploadRecordNow = (voicePath, voiceTime) => { if (!testAnswer.value) { common.msg('每个问题最多连续发送五次答案!') diff --git a/src/pages/index/components/question.vue b/src/pages/index/components/question.vue index e95e15bb..3149dc0c 100644 --- a/src/pages/index/components/question.vue +++ b/src/pages/index/components/question.vue @@ -47,6 +47,7 @@