This commit is contained in:
weipengfei 2023-10-13 15:01:53 +08:00
parent 48235b2366
commit 7f6517670b
1 changed files with 8 additions and 26 deletions

View File

@ -76,6 +76,7 @@ const changeRecord = ()=>{
else { else {
RecordXunfei() RecordXunfei()
recordFalg.value = 0 recordFalg.value = 0
nowStatus.value = 'input'
} }
} }
@ -232,9 +233,11 @@ async function onConversation() {
) )
// //
if(msg.header.code!=0||(event.data&&msg.header.status==2)){ if(msg.header.code!=0||(event.data&&msg.header.status==2)){
nowStatus.value = 'input'
socket.close() socket.close()
} }
} catch (error) { } catch (error) {
nowStatus.value = 'input'
socket.close() socket.close()
} }
} }
@ -592,13 +595,7 @@ onUnmounted(() => {
if (loading.value) if (loading.value)
controller.abort() controller.abort()
}) })
const iatRecorder = reactive(new IatRecorder())
const a = true
// watch(() => iatRecorder.resultText, (n, o) => {
// console.log('', n)
// prompt.value = n
// })
window.winText = '' window.winText = ''
@ -607,31 +604,15 @@ window.addEventListener('test', (e) => {
prompt.value = window.winText 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> </script>
<template> <template>
<div class="flex w-full h-full my-layout"> <div class="flex w-full h-full my-layout">
<indexBG v-if="!isMobile"> <indexBG v-if="!isMobile">
<transition mode="out-in" name="fade"> <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> <loding v-else-if="nowStatus=='loding'" key="loding"></loding>
<inputing v-else key="input"></inputing>
</transition> </transition>
</indexBG> </indexBG>
<div class="flex flex-col w-full h-full" :style="{'max-width': maxWeight + 'px'}"> <div class="flex flex-col w-full h-full" :style="{'max-width': maxWeight + 'px'}">
@ -775,7 +756,8 @@ const click = () => {
.fade-enter-active, .fade-enter-active,
.fade-leave-active { .fade-leave-active {
transition: opacity 0.5s; transition: opacity 0.5s;
transition-timing-function: ease-in-out; /* 调整缓动函数 */ /* 调整缓动函数 */
/* transition-timing-function: ease-in-out; */
} }
.fade-enter, .fade-enter,