refactor: 增加弹框提示

This commit is contained in:
CaptainB 2024-09-19 10:12:17 +08:00 committed by 刘瑞斌
parent cb13c9dd3b
commit 90a7a9d085

View File

@ -842,7 +842,20 @@ const startRecording = async () => {
mediaRecorder.value.start()
},
(err: any) => {
console.error(err)
MsgAlert(
`提示`,
`<p>该功能需要使用麦克风,浏览器禁止不安全页面录音,解决方案如下:<br/>
1可开启 https 解决<br/>
2若无 https 配置则需要修改浏览器安全配置Chrome 设置如下<br/>
(1) 地址栏输入chrome://flags/#unsafely-treat-insecure-origin-as-secure<br/>
(2) http 站点配置在文本框中例如: http://127.0.0.1:8080</p>
<img src="${new URL(`../../assets/tipIMG.jpg`, import.meta.url).href}" width="750"/>`,
{
confirmButtonText: '我知道了',
dangerouslyUseHTMLString: true,
customClass: 'record-tip-confirm'
}
)
}
)
} catch (error) {