From 616d4a1b45ac9e1442a5541e21c8c755cde2c78f Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期六, 05 七月 2025 14:40:56 +0800
Subject: [PATCH] 11
---
public/integration.html | 36 ++++++++++++++++++++----------------
1 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/public/integration.html b/public/integration.html
index b822185..cc390e6 100644
--- a/public/integration.html
+++ b/public/integration.html
@@ -443,8 +443,10 @@
appState.runningIndicator++;
$('#runningIndicator').css('backgroundColor', appState.runningIndicator % 2 === 0 ? '#67c23a' : '#e6a23c');
getList();
+ console.log(appState.curSpeakPat,'555');
if (appState.curSpeakPat == null) {
+ console.log(appState.curSpeakPat,'666');
initiateSpeak();
}
}, 5000);
@@ -474,25 +476,28 @@
// 鍙彿鍔熻兘
function initiateSpeak() {
// 杩欓噷鏇挎崲涓哄疄闄呯殑API璋冪敤
- $.ajax({
- url: appState.apiBaseUrl + '/ecg/call/next',
- type: 'GET',
- dataType: 'json',
- success: function(response) {
- appState.curSpeakPat = response.data || response;
- if (appState.curSpeakPat != null && appState.curSpeakPat.called === 0) {
- speak("璇枫��" + appState.curSpeakPat.patName + "鍒�" + appState.curSpeakPat.roomName + "灏辫瘖");
- }
- },
- error: function(xhr, status, error) {
- console.error('鑾峰彇涓嬩竴涓彨鍙峰け璐�:', error);
- }
- });
+ speak("璇枫��" + '鍚撮緳' + "鍒�" + '搴峰绉�' + "灏辫瘖");
+
+ // $.ajax({
+ // url: appState.apiBaseUrl + '/ecg/call/next',
+ // type: 'GET',
+ // dataType: 'json',
+ // success: function(response) {
+ // appState.curSpeakPat = response.data || response;
+ // if (appState.curSpeakPat != null && appState.curSpeakPat.called === 0) {
+ // console.log(111);
+
+ // speak("璇枫��" + appState.curSpeakPat.patName + "鍒�" + appState.curSpeakPat.roomName + "灏辫瘖");
+ // }
+ // },
+ // error: function(xhr, status, error) {
+ // console.error('鑾峰彇涓嬩竴涓彨鍙峰け璐�:', error);
+ // }
+ // });
}
// 璇煶鎾姤
function speak(msg) {
- console.info("speak " + msg);
if (!appState.speechSynthesis) {
console.warn("褰撳墠娴忚鍣ㄤ笉鏀寔璇煶鍚堟垚");
@@ -509,7 +514,6 @@
speech.volume = 100;
speech.lang = 'zh-CN';
speech.onend = onSpeachEndEvent;
-
appState.speechSynthesis.speak(speech);
}
--
Gitblit v1.9.3