From 8409783c26564d4af172de078b5ae2d71e57daf3 Mon Sep 17 00:00:00 2001 From: yanghang Date: Fri, 18 Jul 2025 11:03:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=AC=AC=E4=BA=94=E7=BB=B4?= =?UTF-8?q?=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/course/components/chartFive.vue | 318 ++++++++++++++++++++ src/pages/course/components/talkingItem.vue | 6 +- src/pages/index/dialog.vue | 51 ++-- 3 files changed, 353 insertions(+), 22 deletions(-) create mode 100644 src/pages/course/components/chartFive.vue diff --git a/src/pages/course/components/chartFive.vue b/src/pages/course/components/chartFive.vue new file mode 100644 index 00000000..5928e501 --- /dev/null +++ b/src/pages/course/components/chartFive.vue @@ -0,0 +1,318 @@ + + + \ No newline at end of file diff --git a/src/pages/course/components/talkingItem.vue b/src/pages/course/components/talkingItem.vue index edc1b881..76700155 100644 --- a/src/pages/course/components/talkingItem.vue +++ b/src/pages/course/components/talkingItem.vue @@ -30,6 +30,7 @@ + @@ -189,6 +190,7 @@ import { downloadVoiceFile, uploadVoiceFile, getAudioByText } from "@/api/common import { studyParagraphOverApi, getAskAboutRawApi } from "@/api/study.js" import ChartFour from "./chartFour.vue" import ChartThree from "./chartThree.vue" +import ChartFive from './chartFive.vue' import common from '@/common/common'; import { getUserInfo } from '@/common/common'; import { useStorageStore } from "@/store/storage.js" @@ -522,7 +524,7 @@ const audioCacheObj = computed(() => storageStore.audioObj) width: 76rpx; height: 76rpx; border: 3rpx solid #fff; - background-color: #ccc; + background-color: #f1f1f1; overflow: hidden; border-radius: 10rpx; margin-right: 16rpx; @@ -698,7 +700,7 @@ const audioCacheObj = computed(() => storageStore.audioObj) width: 76rpx; height: 76rpx; border: 3rpx solid #fff; - background-color: #ccc; + background-color: #f1f1f1; overflow: hidden; border-radius: 10rpx; margin-left: 16rpx; diff --git a/src/pages/index/dialog.vue b/src/pages/index/dialog.vue index a1f5b782..bbd12434 100644 --- a/src/pages/index/dialog.vue +++ b/src/pages/index/dialog.vue @@ -152,18 +152,18 @@ import { const initsocketTask = () => { socketStore.creatSocket('/traask/asksocket/open?summary=') - unref(SocketObj).on('open', (res)=>{ - if(!answerIsOver.value){ - sendMessage({ - "commond" : 'ASK-RE-START', - "body" : { - reqBatch: reqBatch.value, - seqNo: seqNo.value, - answerContent: answerText.value - } - }) - } - }) + // unref(SocketObj).on('open', (res)=>{ + // if(!answerIsOver.value){ + // sendMessage({ + // "commond" : 'ASK-RE-START', + // "body" : { + // reqBatch: reqBatch.value, + // seqNo: seqNo.value, + // answerContent: answerText.value + // } + // }) + // } + // }) unref(SocketObj).on('message', (res)=>{ const { rtnCode, body, commond } = JSON.parse(res.data) let _id = new Date().getTime() + 'id' @@ -414,14 +414,25 @@ import { }) onShow(()=>{ if(watchFlag.value === 1) return - socketStore?.createSocket?.() - sendMessage({ - "commond" : 'ASK-START', - "body" : { - mascotId: mascotId.value, - deviceImei: '' - } - }) + socketStore?.createSocket() + if(!answerIsOver.value){ + sendMessage({ + "commond" : 'ASK-RE-START', + "body" : { + reqBatch: reqBatch.value, + seqNo: seqNo.value, + answerContent: answerText.value + } + }) + }else{ + sendMessage({ + "commond" : 'ASK-START', + "body" : { + mascotId: mascotId.value, + deviceImei: '' + } + }) + } }) onUnload(()=>{ watchFlag.value = 1