From 90a7a9d085c6ffddeba05e48fe97bbacea04fd2d Mon Sep 17 00:00:00 2001 From: CaptainB Date: Thu, 19 Sep 2024 10:12:17 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=A2=9E=E5=8A=A0=E5=BC=B9?= =?UTF-8?q?=E6=A1=86=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/components/ai-chat/index.vue | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ui/src/components/ai-chat/index.vue b/ui/src/components/ai-chat/index.vue index e10d9b365..5f39687a4 100644 --- a/ui/src/components/ai-chat/index.vue +++ b/ui/src/components/ai-chat/index.vue @@ -842,7 +842,20 @@ const startRecording = async () => { mediaRecorder.value.start() }, (err: any) => { - console.error(err) + MsgAlert( + `提示`, + `

该功能需要使用麦克风,浏览器禁止不安全页面录音,解决方案如下:
+1、可开启 https 解决;
+2、若无 https 配置则需要修改浏览器安全配置,Chrome 设置如下:
+(1) 地址栏输入chrome://flags/#unsafely-treat-insecure-origin-as-secure;
+(2) 将 http 站点配置在文本框中,例如: http://127.0.0.1:8080。

+ `, + { + confirmButtonText: '我知道了', + dangerouslyUseHTMLString: true, + customClass: 'record-tip-confirm' + } + ) } ) } catch (error) {