diff --git a/1.html b/1.html index 8708f7c..521fb16 100644 --- a/1.html +++ b/1.html @@ -1,46 +1,69 @@ - - Speech Synthesis Example - - -

Speech Synthesis Example

- -
- - - - + function speakText() { + window.speechSynthesis.cancel(); // 清除之前的语音合成 + + setTimeout(() => { + const textInput = document.getElementById('text').value; + const rate = parseFloat(document.getElementById('rate').value); + + + const utterance = new SpeechSynthesisUtterance([textInput, textInput, textInput].join('')); + + const selectedVoiceIndex = voiceSelect.selectedOptions[0].value; + const voices = synth.getVoices(); + utterance.voice = voices[selectedVoiceIndex]; + utterance.rate = rate; + + utterance.onend = function (event) { + console.log('Speech has finished.'); + alert('Speech has finished.'); + }; + + window.speechSynthesis.speak(utterance); + }, 100); // 延迟 100 毫秒 + } + + diff --git a/src/views/scheduleList/index.vue b/src/views/scheduleList/index.vue index 802f94c..ab06ddb 100644 --- a/src/views/scheduleList/index.vue +++ b/src/views/scheduleList/index.vue @@ -116,7 +116,7 @@ export default { this.patientList[groupIndex] = [element]; } } - if (!this.carouselTimer) { + if (!this.carouselTimer && res['Data']['length'] > this.showItemNum) { this.onCarouselTimer(); } } else { diff --git a/src/views/waitList/index.vue b/src/views/waitList/index.vue index 3b213c7..c516ca3 100644 --- a/src/views/waitList/index.vue +++ b/src/views/waitList/index.vue @@ -47,6 +47,13 @@ +
@@ -68,7 +75,7 @@