This commit is contained in:
2025-09-02 08:48:33 +08:00
parent 1512346ef0
commit 044312e500
8 changed files with 382 additions and 12 deletions

View File

@@ -289,7 +289,6 @@
<div id="audio-result" style="display: none;">
<audio id="audio-player" class="audio-player" controls></audio>
<div class="form-group" style="margin-top: 20px;">
<button id="download-btn" class="btn btn-primary">下载音频</button>
</div>
</div>
@@ -511,8 +510,10 @@
try {
const a = document.createElement('a');
a.href = data.audio_url;
a.download = fileName;
// 移除本地代理直接使用OBS的HTTPS链接
// 同时添加URL清理逻辑移除可能存在的引号和空格
a.href = data.audio_url.trim().replace(/[`'"\s]/g, '');
a.download = data.filename;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);