| | |
| | | document.addEventListener("plusready", function() { |
| | | |
| | | |
| | | var main = plus.android.runtimeMainActivity(); |
| | | console.log(main,JSON.stringify(main)) |
| | | var Context = plus.android.importClass("android.content.Context"); |
| | | console.log(Context) |
| | | var PowerManager = plus.android.importClass("android.os.PowerManager"); |
| | | console.log(PowerManager) |
| | | var pm = main.getSystemService(Context.POWER_SERVICE); |
| | | console.log(JSON.stringify(pm)) |
| | | g_wakelock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "ANY_NAME"); |
| | | console.log(JSON.stringify(g_wakelock)) |
| | | g_wakelock.acquire(); |
| | | // var main = plus.android.runtimeMainActivity(); |
| | | // // console.log(main,JSON.stringify(main)) |
| | | // var Context = plus.android.importClass("android.content.Context"); |
| | | // // console.log(Context) |
| | | // var PowerManager = plus.android.importClass("android.os.PowerManager"); |
| | | // // console.log(PowerManager) |
| | | // var pm = main.getSystemService(Context.POWER_SERVICE); |
| | | // // console.log(JSON.stringify(pm)) |
| | | // g_wakelock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "ANY_NAME"); |
| | | // // console.log(JSON.stringify(g_wakelock)) |
| | | // g_wakelock.acquire(); |
| | | |
| | | |
| | | message = document.getElementById("message"); |
| | |
| | | }; |
| | | |
| | | $.connection.hub.url = 'http://121.196.36.24:8001/signalr' |
| | | |
| | | //hub连接开启 |
| | | $.connection.hub.start().done(function() { |
| | | |
| | | var connection = $.connection.hub.start().done(function() { |
| | | // $.connection.serverTimeoutInMilliseconds = 1000 * 60 * 30 |
| | | var username = localStorage.getItem('username'); |
| | | |
| | | //发送上线信息 |
| | | work.server.sendLogin(username); |
| | | |
| | | // console.log('222') |
| | | // const aaa = [{ |
| | | // "code": "Q", |
| | | // "name": "呼叫质量", |
| | | // "children": [{ |
| | | // "usercode": "999", |
| | | // "username": "楼先生" |
| | | // }] |
| | | // }] |
| | | }) |
| | | |
| | | |
| | | // work.server.sendByGroupList('楼先生', 'CJ002', 'SB001', aaa) |
| | | |
| | | }); |
| | | |
| | | }); |
| | | |