This commit is contained in:
杨航
2025-08-08 15:34:24 +08:00
parent 49488085c5
commit ef3e4aab33
+9 -1
View File
@@ -148,17 +148,25 @@ const initRecord = () => {
let _recordPerm = uni.getAppAuthorizeSetting()
let _state = _recordPerm.microphoneAuthorized
if(_state === 'authorized'){
showTalkingModel.value = true
if(isStopNum.value === isStartNum.value){
stopRecord()
}else{
showTalkingModel.value = true
}
}
})
}
const startFlag = ref(1)
// const canStart = ref(true)
const isStartNum = ref(0)
const isStopNum = ref(0)
const startRecord = () => {
isStartNum.value += 1
unref(recordObjCom).start({format:'mp3'})
}
const stopRecord = () => {
isStopNum.value = isStartNum.value
try{
if(unref(recordObjCom).stop){
unref(recordObjCom).stop()