Commit 88530b45 by Kornkitt Poolsup

change title from HitaChi to One City Center Building

parent d2c8b53f
...@@ -86,11 +86,11 @@ function getData() { ...@@ -86,11 +86,11 @@ function getData() {
}).done(function( data ) { }).done(function( data ) {
var obj = jQuery.parseJSON(data); var obj = jQuery.parseJSON(data);
if (obj.success == 1){ if (obj.success == 1){
$("#home-temperature").text(JSON.stringify(obj.data.temperature)); $("#home-temperature").text(JSON.stringify(Math.round(obj.data.temperature)));
$("#home-humidity").text(JSON.stringify(obj.data.humidity)); $("#home-humidity").text(JSON.stringify(Math.round(obj.data.humidity)));
$("#home-pm10").text(JSON.stringify(obj.data.pm10dot0)); $("#home-pm10").text(JSON.stringify(Math.round(obj.data.pm10dot0)));
$("#home-pm25").text(JSON.stringify(obj.data.pm2dot5)); $("#home-pm25").text(JSON.stringify(Math.round(obj.data.pm2dot5)));
var pm25state_color = ["#80C355", "#F5EC43", "#F9941B", "#E92026", "#B1498E", "#994544"]; var pm25state_color = ["#80C355", "#F5EC43", "#F9941B", "#E92026", "#B1498E", "#994544"];
var pm25state_name = ["Good", "Moderate", "Unhealthy for Sensitive Groups", "Unhealthy", "Very Unhealthy", "Hazardous"]; var pm25state_name = ["Good", "Moderate", "Unhealthy for Sensitive Groups", "Unhealthy", "Very Unhealthy", "Hazardous"];
...@@ -132,6 +132,7 @@ function getCamera() { ...@@ -132,6 +132,7 @@ function getCamera() {
$("#cam06").attr('src','https://occ-hitachi.nexpie.com/data/z1/cam6.png?time='+new Date().getTime()); $("#cam06").attr('src','https://occ-hitachi.nexpie.com/data/z1/cam6.png?time='+new Date().getTime());
var date_show = new Date().toLocaleString(); var date_show = new Date().toLocaleString();
console.log(date_show);
$("#camera01-time").text(date_show); $("#camera01-time").text(date_show);
$("#camera02-time").text(date_show); $("#camera02-time").text(date_show);
...@@ -211,10 +212,12 @@ function showtime() { ...@@ -211,10 +212,12 @@ function showtime() {
} }
function init() { function init() {
getData();
getCamera(); getCamera();
getData();
getForecast(); getForecast();
showtime(); showtime();
console.log("init")
} }
init(); init();
......
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