method.js
@@ -4,6 +4,7 @@ var moment = require('moment'); var config = require('./config'); var queue = require('./queue'); module.exports.toDec = function(hex) { if(typeof hex === 'number') { @@ -168,6 +169,23 @@ var current = moment(); queue.pushToScreen({ mac: mac, location: { lat: 31.430616, lng: 120.988327 }, data: { x1: x1, //PM2.5 x2: x9, //甲醛 x3: x11, //温度 x4: x10, //湿度 x5: x14, //光线强度 x6: x12 //风速 }, time: current.valueOf() }); var rank = 0; if(s > 0) { rank = this.random(1000, 99999);//this.random(1000, 99999999);