1234567891011121314151617181920212223242526272829 |
- var init = function () {
- var token = localStorage.getItem("token");
- if(token){
- token = token.substr(1,token.length-2);
- }
- http.get('/api/tx-manager/admin/onlines?access_token='+token, '加载数据...', function (res) {
- var list = $("#list");
- list.empty();
- for (var p in res) {
- var obj = res[p];
- var tr =
- '<tr>' +
- '<td>' + obj.model + '</td>' +
- '<td>' + obj.uniqueKey + '</td>' +
- '<td>' + obj.ipAddress + '</td>' +
- '<td>' + obj.channelName + '</td>' +
- '</tr>';
- list.append(tr);
- }
- });
- };
- init();
|