|
|
@ -72,10 +72,11 @@
|
|
|
|
for (var i = 0; i <= 10; i++) {
|
|
|
|
for (var i = 0; i <= 10; i++) {
|
|
|
|
getColorByTemperature[20+i] = getGradientColor(i)
|
|
|
|
getColorByTemperature[20+i] = getGradientColor(i)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const getData = () =>{
|
|
|
|
$.post(prefix+'/newDataStreak',(e)=>{
|
|
|
|
$.post(prefix+'/newDataStreak',(e)=>{
|
|
|
|
console.log(e)
|
|
|
|
console.log(e)
|
|
|
|
$('#temInfo').html(`<span style="color:#ff0000">最高温度:${e.rows[0].maxTemperature}℃</span> <span style="color:#0b05f7">最低温度:${e.rows[0].minTemperature}℃</span> <span style="color:#0066e4">平均温度:${e.rows[0].avgTemperature}℃</span>`)
|
|
|
|
$('#temInfo').html(`<span style="color:#ff0000">最高温度:${e.rows[0].maxTemperature}℃</span> <span style="color:#0b05f7">最低温度:${e.rows[0].minTemperature}℃</span> <span style="color:#0066e4">平均温度:${e.rows[0].avgTemperature}℃</span>`)
|
|
|
|
$('#timeInfo').html(`<span style="color:#0b05f7">采集时间:${e.rows[0].collectTime}℃</span> `)
|
|
|
|
$('#timeInfo').html(`<span style="color:#0b05f7">采集时间:${e.rows[0].collectTime}</span> `)
|
|
|
|
let colors = []
|
|
|
|
let colors = []
|
|
|
|
for(i in e.rows[0]){
|
|
|
|
for(i in e.rows[0]){
|
|
|
|
if(i.includes('site')){
|
|
|
|
if(i.includes('site')){
|
|
|
@ -106,6 +107,9 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
getData()
|
|
|
|
|
|
|
|
setInterval(getData,1000*60)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|