|
@@ -28,22 +28,29 @@
|
|
|
var msg_html = '';
|
|
|
msg_html += '\
|
|
|
<div class="f-page-body f-scroll-wrapper">\
|
|
|
- <div class="f-scroll" id="gaojinginfo" style="transform: translate3d(0px, 0px, 0px) translateZ(0px);">';
|
|
|
-
|
|
|
+ <div class="f-scroll" style="overflow:auto;height: 100%;">\
|
|
|
+ <div class="lr-list gaojinginfo">\
|
|
|
+ </div>\
|
|
|
+ </div>\
|
|
|
+ <div class="f-scrollbar f-scrollbar-vertical">\
|
|
|
+ <div class="f-scrollbar-indicator" style="transition-duration: 0ms; display: none; height: 830px; transform: translate3d(0px, 0px, 0px) translateZ(0px);">\
|
|
|
+ </div>\
|
|
|
+ </div>\
|
|
|
+ </div>';
|
|
|
+ $this.html(msg_html);
|
|
|
//var baojing_info = '';
|
|
|
userinfo = learun.storage.get('userinfo');
|
|
|
learun.httpget(config.webapi + "/?s=api/get_baojing_info&plate="+userinfo.baseinfo.plate, {}, function(res) {
|
|
|
if(res.success == true){
|
|
|
+ var msg_html_list = '';
|
|
|
$.each(res.data, function (_index, _item) {
|
|
|
- msg_html += '\
|
|
|
- <div class="lr-list">\
|
|
|
+ msg_html_list += '\
|
|
|
<div class="lr-list-item lr-list-item-multi" style="line-height: 25px;">\
|
|
|
<h4 id="time">'+ _item.AddTime +'</h4>\
|
|
|
<p class="lr-ellipsis">'+ _item.LicensePlate +'<span class="" style="right: 15px;position: absolute;top: 50%;transform: translateY(-50%);">'+ _item.DeviceNumber +'</span></p>\
|
|
|
<a class="lr-nav-right gaojingdetail">'+ _item.Type +'<span class="lr-badge lr-badge-primary lr-badge-inverted">详情</span></a>\
|
|
|
- </div>\
|
|
|
- </div>';
|
|
|
- $page.find('#gaojinginfo').html(msg_html);
|
|
|
+ </div>';
|
|
|
+ $page.find('.gaojinginfo').html(msg_html_list);
|
|
|
var addtime = $('#time').text();
|
|
|
$('.gaojingdetail').on('tap', function () {
|
|
|
learun.nav.go({ path: 'alarmdetail', title: '告警详情', type: 'right', param:'{"addtime":"'+addtime+'"}'});
|
|
@@ -51,11 +58,21 @@
|
|
|
});
|
|
|
}else{
|
|
|
msg_html += '<h4>暂无消息</h4>';
|
|
|
- $page.find('#gaojinginfo').html(msg_html);
|
|
|
+ $page.find('.gaojinginfo').html(msg_html);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ //msg_html += '';
|
|
|
+
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ var msg_html = '';
|
|
|
+ var msg_html = '';
|
|
|
msg_html += '\
|
|
|
+ <div class="f-page-body f-scroll-wrapper">\
|
|
|
+ <div class="f-scroll" style="overflow:auto;height: 100%;">\
|
|
|
+ <div class="lr-list gonggaoinfo">\
|
|
|
+ </div>\
|
|
|
</div>\
|
|
|
<div class="f-scrollbar f-scrollbar-vertical">\
|
|
|
<div class="f-scrollbar-indicator" style="transition-duration: 0ms; display: none; height: 830px; transform: translate3d(0px, 0px, 0px) translateZ(0px);">\
|
|
@@ -63,47 +80,30 @@
|
|
|
</div>\
|
|
|
</div>';
|
|
|
$this.html(msg_html);
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- var msg_html = '';
|
|
|
- msg_html += '\
|
|
|
- <div class="f-page-body f-scroll-wrapper">\
|
|
|
- <div class="f-scroll" id="gonggaoinfo" style="transform: translate3d(0px, 0px, 0px) translateZ(0px);">';
|
|
|
//var baojing_info = '{"0":{"data":"1111","msg":"公告","time":"2/28"},"1":{"data":"2222","msg":"公告","time":"2/29"}}';
|
|
|
userinfo = learun.storage.get('userinfo');
|
|
|
learun.httpget(config.webapi + "/?s=api/get_gonggao_info&plate="+userinfo.baseinfo.plate, {}, function(res) {
|
|
|
+ var msg_html_list = '';
|
|
|
if(res.success == true){
|
|
|
$.each(res.data, function (_index, _item) {
|
|
|
- msg_html += '\
|
|
|
- <div class="lr-list">\
|
|
|
+ msg_html_list += '\
|
|
|
<div class="lr-list-item lr-list-item-multi" style="line-height: 25px;">\
|
|
|
<h4 id="time">'+ _item.AddTime +'</h4>\
|
|
|
<p class="lr-ellipsis">'+ _item.LicensePlate +'<span class="" style="right: 15px;position: absolute;top: 50%;transform: translateY(-50%);">'+ _item.DeviceNumber +'</span></p>\
|
|
|
<a class="lr-nav-right gonggaodetail">'+ _item.Type +'<span class="lr-badge lr-badge-primary lr-badge-inverted">详情</span></a>\
|
|
|
- </div>\
|
|
|
- </div>';
|
|
|
- $page.find('.gonggaodetail').on('tap', function () {
|
|
|
- learun.nav.go({ path: 'baojing', title: '自助报警', type: 'right' });
|
|
|
+ </div>';
|
|
|
+ $page.find('.gonggaoinfo').html(msg_html_list);
|
|
|
+ $('.gonggaodetail').on('tap', function () {
|
|
|
+ var addtime = $('#time').text();
|
|
|
+ learun.nav.go({ path: 'noticedetail', title: '告警详情', type: 'right', param:'{"addtime":"'+addtime+'"}'});
|
|
|
});
|
|
|
});
|
|
|
|
|
|
}else{
|
|
|
- msg_html += '<h4>暂无消息</h4>';
|
|
|
+ msg_html += '<h4>暂无消息</h4>';
|
|
|
+ $page.find('.gonggaoinfo').html(msg_html);
|
|
|
}
|
|
|
- $page.find('#gonggaoinfo').html(msg_html);
|
|
|
- $('.gonggaodetail').on('tap', function () {
|
|
|
- var addtime = $('#time').text();
|
|
|
- learun.nav.go({ path: 'noticedetail', title: '告警详情', type: 'right', param:'{"addtime":"'+addtime+'"}'});
|
|
|
- });
|
|
|
});
|
|
|
- msg_html += '\
|
|
|
- </div>\
|
|
|
- <div class="f-scrollbar f-scrollbar-vertical">\
|
|
|
- <div class="f-scrollbar-indicator" style="transition-duration: 0ms; display: none; height: 830px; transform: translate3d(0px, 0px, 0px) translateZ(0px);">\
|
|
|
- </div>\
|
|
|
- </div>\
|
|
|
- </div>';
|
|
|
- $this.html(msg_html);
|
|
|
break;
|
|
|
}
|
|
|
$this = null;
|