From 7f6517670bbf75cd58635770d190290c56d849ee Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Fri, 13 Oct 2023 15:01:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/chat/index.vue | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/src/views/chat/index.vue b/src/views/chat/index.vue index ef8762d..7c1aca4 100644 --- a/src/views/chat/index.vue +++ b/src/views/chat/index.vue @@ -76,6 +76,7 @@ const changeRecord = ()=>{ else { RecordXunfei() recordFalg.value = 0 + nowStatus.value = 'input' } } @@ -232,9 +233,11 @@ async function onConversation() { ) // 关闭连接 if(msg.header.code!=0||(event.data&&msg.header.status==2)){ + nowStatus.value = 'input' socket.close() } } catch (error) { + nowStatus.value = 'input' socket.close() } } @@ -592,13 +595,7 @@ onUnmounted(() => { if (loading.value) controller.abort() }) -const iatRecorder = reactive(new IatRecorder()) -const a = true -// watch(() => iatRecorder.resultText, (n, o) => { -// console.log('监听', n) -// prompt.value = n -// }) window.winText = '' @@ -607,31 +604,15 @@ window.addEventListener('test', (e) => { prompt.value = window.winText }) -const click = () => { - // prompt.value = window.winText - RecordXunfei() - - // if (a) { - // iatRecorder.start(prompt.value) - // a = !a - // console.log('录音开始') - // } - // else { - // iatRecorder.stop() - // a = !a - // console.log('录音结束') - // console.log('最终结果', iatRecorder) - // } -}