| | |
| | | <div class="cell-list control">
|
| | | <img src="image/webStatus/control_normal.gif" alt="线程监控程序" title="线程监控程序运行:正常">
|
| | | </div>
|
| | | <div class="cell-list voice">
|
| | | <i class="fa fa-bell"></i>
|
| | | <i class="fa fa-bell-slash"></i>
|
| | | </div>
|
| | | <div class="cell-list server-time" style="white-space: nowrap">
|
| | | 2018-11-26 00:00:00
|
| | | </div>
|
| | |
| | | async: true,
|
| | | success: function(rs) {
|
| | | linkNum = 0; // 初始化测试连接
|
| | | setTimeout(checkServer, 200);
|
| | | setTimeout(checkServer, 500);
|
| | | },
|
| | | error:function() {
|
| | | // 网络连接不正常
|
| | | if(!navigator.onLine) {
|
| | | linkNum = 0;
|
| | | setTimeout(checkServer, 200);
|
| | | setTimeout(checkServer, 500);
|
| | | }else{
|
| | | linkNum++;
|
| | | // 服务器连接不正常
|
| | | if(linkNum == 1) {
|
| | | if(linkNum == 2) {
|
| | | console.info('出现第'+linkNum+"次测试服务器连接失败!跳转到登陆");
|
| | | // 网络正常但服务器连续多次检测不正常跳转到登陆页面
|
| | | alert('网络连接异常,请检查网络连接是否正常!');
|