diff --git a/src/pages/sparring/components/talk-microphone.vue b/src/pages/sparring/components/talk-microphone.vue
index ab861c1c..bfd5d29b 100644
--- a/src/pages/sparring/components/talk-microphone.vue
+++ b/src/pages/sparring/components/talk-microphone.vue
@@ -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);
diff --git a/src/pages/sparring/talk.vue b/src/pages/sparring/talk.vue
index e4c28d63..e4c4d236 100644
--- a/src/pages/sparring/talk.vue
+++ b/src/pages/sparring/talk.vue
@@ -20,7 +20,7 @@
-
+
@@ -137,7 +137,15 @@
const onCurrentDecibels = (res) => {
console.log('当前分贝', res);
};
-
+
+ // 麦克风录音结束
+ const microphoneNoPermission= () =>{
+ common.show('', '该功能需要授予麦克风权限', false).then((res) => {
+ if (res) {
+ destroy(); // 走关闭销毁流程
+ }
+ });
+ }
// 定时器实例
let timer = null;