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 | 39 ++++++++++++++++++++++----------------- 1 files changed, 22 insertions(+), 17 deletions(-) diff --git a/public/integration.html b/public/integration.html index f84d262..cc390e6 100644 --- a/public/integration.html +++ b/public/integration.html @@ -295,7 +295,8 @@ curSpeakPat: null, timer: null, speechSynthesis: window.speechSynthesis || null, - apiBaseUrl: 'http://localhost:48080/admin-api' + // apiBaseUrl: 'http://localhost:48080/admin-api' + apiBaseUrl: 'http://10.0.2.193/admin-api' }; // 椤甸潰鍔犺浇瀹屾垚鍚庡垵濮嬪寲 @@ -442,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); @@ -473,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("褰撳墠娴忚鍣ㄤ笉鏀寔璇煶鍚堟垚"); @@ -508,7 +514,6 @@ speech.volume = 100; speech.lang = 'zh-CN'; speech.onend = onSpeachEndEvent; - appState.speechSynthesis.speak(speech); } -- Gitblit v1.9.3