From 98e3ba4c8b32bcf93dc0e32e9ca77297fb8a122e Mon Sep 17 00:00:00 2001 From: IrisVega Date: Sat, 20 Jul 2024 20:00:03 +0800 Subject: [PATCH] modified: static/js/sensor-2.js modified: static/js/sensor-3.js modified: static/js/sensor-4.js --- static/js/sensor-2.js | 2 +- static/js/sensor-3.js | 2 +- static/js/sensor-4.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/static/js/sensor-2.js b/static/js/sensor-2.js index f3f0f59..538c106 100644 --- a/static/js/sensor-2.js +++ b/static/js/sensor-2.js @@ -121,7 +121,7 @@ document.addEventListener('DOMContentLoaded', function () { series: [{ name: '湿度', type: 'line', data: humidities }] }; myChart.setOption(option); - document.getElementById('humidity').textContent = `当前湿度: ${humidities[humidities.length - 1]}℃`; + document.getElementById('humidity').textContent = `当前湿度: ${humidities[humidities.length - 1]}%`; } // 初始化时获取所有数据 diff --git a/static/js/sensor-3.js b/static/js/sensor-3.js index b668755..b22c5fe 100644 --- a/static/js/sensor-3.js +++ b/static/js/sensor-3.js @@ -122,7 +122,7 @@ document.addEventListener('DOMContentLoaded', function () { series: [{ name: 'CO2', type: 'line', data: co2 }] }; myChart.setOption(option); - document.getElementById('co2').textContent = `当前CO2: ${co2[co2.length - 1]}℃`; + document.getElementById('co2').textContent = `当前CO2: ${co2[co2.length - 1]}%`; } // 初始化时获取所有数据 diff --git a/static/js/sensor-4.js b/static/js/sensor-4.js index b90a98b..8905426 100644 --- a/static/js/sensor-4.js +++ b/static/js/sensor-4.js @@ -123,7 +123,7 @@ document.addEventListener('DOMContentLoaded', function () { series: [{ name: '压力', type: 'line', data: pressure }] }; myChart.setOption(option); - document.getElementById('pressure').textContent = `当前压力: ${pressure[pressure.length - 1]}℃`; + document.getElementById('pressure').textContent = `当前压力: ${pressure[pressure.length - 1]}Pa`; } // 初始化时获取所有数据