diff --git a/internal/http/handlers/tts.go b/internal/http/handlers/tts.go index b370bfc..36f7217 100644 --- a/internal/http/handlers/tts.go +++ b/internal/http/handlers/tts.go @@ -509,7 +509,6 @@ func (h *TTSHandler) HandleReader(context *gin.Context) { func (h *TTSHandler) HandleIFreeTime(context *gin.Context) { // 从URL参数获取 req := models.TTSRequest{ - Text: context.Query("t"), Voice: context.Query("v"), Rate: context.Query("r"), Pitch: context.Query("p"), diff --git a/web/static/js/app.js b/web/static/js/app.js index fbd5964..4a8efd8 100644 --- a/web/static/js/app.js +++ b/web/static/js/app.js @@ -217,7 +217,7 @@ document.addEventListener('DOMContentLoaded', function () { }); // 添加风格选择变化事件 - styleSelect.addEventListener('change', function() { + styleSelect.addEventListener('change', function () { // 保存风格选择 localStorage.setItem('ttsStyle', this.value); }); @@ -387,11 +387,10 @@ document.addEventListener('DOMContentLoaded', function () { // 复制爱阅记链接按钮点击事件 copyIfreetimeLinkButton.addEventListener('click', function () { - const text = "{{java.encodeURI(speakText)}}"; const voice = voiceSelect.value; const displayName = voiceSelect.options[voiceSelect.selectedIndex].text; const style = styleSelect.value; - const rate = "{{speakSpeed*4}}" + const rate = rateInput.value const pitch = pitchInput.value; const apiKey = apiKeyInput.value.trim(); @@ -679,6 +678,7 @@ document.addEventListener('DOMContentLoaded', function () { }, 300); }, duration); } + // 添加自定义alert函数到全局范围 window.showCustomAlert = showCustomAlert; });