This commit is contained in:
parent
48235b2366
commit
7f6517670b
|
@ -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)
|
||||
// }
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex w-full h-full my-layout">
|
||||
<indexBG v-if="!isMobile">
|
||||
<transition mode="out-in" name="fade">
|
||||
<recording v-if="nowStatus=='record'" key="record"></recording>
|
||||
<inputing v-if="nowStatus=='input'" key="input"></inputing>
|
||||
<recording v-else-if="nowStatus=='record'" key="record"></recording>
|
||||
<loding v-else-if="nowStatus=='loding'" key="loding"></loding>
|
||||
<inputing v-else key="input"></inputing>
|
||||
</transition>
|
||||
</indexBG>
|
||||
<div class="flex flex-col w-full h-full" :style="{'max-width': maxWeight + 'px'}">
|
||||
|
@ -775,7 +756,8 @@ const click = () => {
|
|||
.fade-enter-active,
|
||||
.fade-leave-active {
|
||||
transition: opacity 0.5s;
|
||||
transition-timing-function: ease-in-out; /* 调整缓动函数 */
|
||||
/* 调整缓动函数 */
|
||||
/* transition-timing-function: ease-in-out; */
|
||||
}
|
||||
|
||||
.fade-enter,
|
||||
|
|
Loading…
Reference in New Issue