Commit 998c22ec by zeven

TCP继电器控制语音提示

parent c46c0e70
......@@ -119,8 +119,9 @@ class App extends React.Component {
});
}
if (!window.socket.hasListeners('tcpRelay')) {
window.socket.on('tcpRelay', ({ip, port, route, status}) => {
TcpRelay.toggle(ip, port, route, status);
window.socket.on('tcpRelay', async ({ip, port, route, status}) => {
const ret = await TcpRelay.toggle(ip, port, route, status);
Speech.speak(`远程继电器触发${ret ? '成功' : '失败'}`);
});
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment