From d76ec030e6a9e886911193c026a6603aa8cb3ae6 Mon Sep 17 00:00:00 2001 From: wangyifeng <812766448@qq.com> Date: Wed, 2 Jul 2025 13:57:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E8=AF=AD=E9=9F=B3=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E9=BA=A6=E5=85=8B=E9=A3=8E=E5=8D=A0=E7=94=A8=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=8C=E7=8E=B0=E5=9C=A8=E5=9C=A8=E9=9D=9E=E5=BD=95?= =?UTF-8?q?=E9=9F=B3=E7=8A=B6=E6=80=81=E4=B8=8B=E4=B8=8D=E4=BC=9A=E4=B8=80?= =?UTF-8?q?=E7=9B=B4=E5=8D=A0=E7=94=A8=E9=BA=A6=E5=85=8B=E9=A3=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../all-speech/components/all-speech/all-speech.vue | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/uni_modules/all-speech/components/all-speech/all-speech.vue b/src/uni_modules/all-speech/components/all-speech/all-speech.vue index a380f31..7874be9 100644 --- a/src/uni_modules/all-speech/components/all-speech/all-speech.vue +++ b/src/uni_modules/all-speech/components/all-speech/all-speech.vue @@ -313,7 +313,7 @@ export default { let that = this // 请求权限 - that.checkPermission(true) + that.checkPermission() // #ifdef APP-PLUS recorderManager.onStop((res) => { @@ -393,7 +393,7 @@ export default { that.permissionInfo = permissionInfo } }, - continueAppMicro(isFirstRequestPer = false) { + continueAppMicro() { let that = this RecordApp.UniWebViewActivate(that) //App环境下必须先切换成当前页面WebView RecordApp.RequestPermission( @@ -401,9 +401,7 @@ export default { console.log('已获得录音权限,可以开始录音了') that.permisionState = true that.isCheckingPermission = false - if (isFirstRequestPer) { - that.stopRecord() - } + that.stopRecord() }, (msg, isUserNotAllow) => { that.isCheckingPermission = false @@ -415,7 +413,7 @@ export default { }, ) }, - async checkPermission(isFirstRequestPer = false) { + async checkPermission() { let that = this // #ifdef APP-PLUS // 先判断os @@ -455,7 +453,7 @@ export default { if (typeof plus !== 'undefined') { handleFindWebview(`handleRequestAndroidPermission('micro')`) } else { - that.continueAppMicro(isFirstRequestPer) + that.continueAppMicro() } // #endif // #endif