You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
792 B

isDebug = true;
useSignalR = true;
dataUrl = iotCenter + '/App/GetNodes';
data = function data() {
return {
f7params: f7params,
server: localStorage.getItem('server'),
token: localStorage.getItem('token'),
model: {
Products: [],
Scenes: []
}
};
}
methods = {
GetNodes() {
return Enumerable.from(this.model).orderBy('o=>o.DisplayOrder').toArray();
}
};
function onMessage(method, json, to, from) {
debug(method + ':' + json);
var item = JSON.parse(json);
console.log(method + ':' + json);
var item = JSON.parse(json);
if (method == 'DeviceEntityInserted' ||
//method == 'DeviceEntityUpdated' ||
method == 'DeviceEntityDeleted') {
loadData();
}
}
start();