JLBA202505130001_关于吉林银行新建AI智能培训系统的需求_fix: bug

This commit is contained in:
杨航
2025-12-19 16:46:25 +08:00
parent 3f511dbc26
commit 6e27f421d2
2 changed files with 16 additions and 7 deletions
@@ -25,6 +25,7 @@
stop() {
this.status = 'stop';
this.options = null;
},
frameRecorded({ isLastFrame, frameBuffer }) {
// console.log('1111',typeof this.onFrameRecorded);
@@ -54,11 +55,11 @@
return bytes;
},
toShowToast() {
uni.showToast({
title: '发生错误,请检查是否有麦克风权限',
icon: 'none'
});
this.stop();
// uni.showToast({
// title: '发生错误,请检查是否有麦克风权限11',
// icon: 'none'
// });
this.$emit('noPermission')
},
recordedChunks(base64) {
this.$emit('onStop', base64);
+10 -2
View File
@@ -20,7 +20,7 @@
</view>
<view class="close-btn" @click="closeTalking"></view>
</view>
<talk-microphone ref="talkMicrophoneRef"></talk-microphone>
<talk-microphone ref="talkMicrophoneRef" @noPermission="microphoneNoPermission"></talk-microphone>
<talk-speaker ref="talkSpeakerRef" @playOver="playOver"></talk-speaker>
<talk-camera ref="talkCameraRef" v-if="isVideo"></talk-camera>
</view>
@@ -137,7 +137,15 @@
const onCurrentDecibels = (res) => {
console.log('当前分贝', res);
};
// 麦克风录音结束
const microphoneNoPermission= () =>{
common.show('', '该功能需要授予麦克风权限', false).then((res) => {
if (res) {
destroy(); // 走关闭销毁流程
}
});
}
// 定时器实例
let timer = null;