|
@@ -33,25 +33,26 @@
|
|
|
//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){
|
|
|
- $.each(res, function (_index, _item) {
|
|
|
+ if(res.success == true){
|
|
|
+ $.each(res.data, function (_index, _item) {
|
|
|
msg_html += '\
|
|
|
<div class="lr-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" id="gaojingdetail">'+ _item.Type +'<span class="lr-badge lr-badge-primary lr-badge-inverted">详情</span></a>\
|
|
|
+ <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);
|
|
|
+ var addtime = $('#time').text();
|
|
|
+ $('.gaojingdetail').on('tap', function () {
|
|
|
+ learun.nav.go({ path: 'alarmdetail', title: '告警详情', type: 'right', param:'{"addtime":"'+addtime+'"}'});
|
|
|
+ });
|
|
|
});
|
|
|
}else{
|
|
|
msg_html += '<h4>暂无消息</h4>';
|
|
|
+ $page.find('#gaojinginfo').html(msg_html);
|
|
|
}
|
|
|
- $page.find('#gaojinginfo').html(msg_html);
|
|
|
- var addtime = $('#time').text();
|
|
|
- $('#gaojingdetail').on('tap', function () {
|
|
|
- learun.nav.go({ path: 'alarmdetail', title: '告警详情', type: 'right', param:'{"addtime":'+addtime+'}'});
|
|
|
- });
|
|
|
});
|
|
|
|
|
|
msg_html += '\
|
|
@@ -71,14 +72,14 @@
|
|
|
//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) {
|
|
|
- if(res){
|
|
|
- $.each(res, function (_index, _item) {
|
|
|
+ if(res.success == true){
|
|
|
+ $.each(res.data, function (_index, _item) {
|
|
|
msg_html += '\
|
|
|
<div class="lr-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" id="gonggaodetail">'+ _item.Type +'<span class="lr-badge lr-badge-primary lr-badge-inverted">详情</span></a>\
|
|
|
+ <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 () {
|
|
@@ -90,9 +91,9 @@
|
|
|
msg_html += '<h4>暂无消息</h4>';
|
|
|
}
|
|
|
$page.find('#gonggaoinfo').html(msg_html);
|
|
|
- $('#gonggaodetail').on('tap', function () {
|
|
|
+ $('.gonggaodetail').on('tap', function () {
|
|
|
var addtime = $('#time').text();
|
|
|
- learun.nav.go({ path: 'alarmdetail', title: '告警详情', type: 'right',param:'{"addtime":'+addtime+'}' });
|
|
|
+ learun.nav.go({ path: 'noticedetail', title: '告警详情', type: 'right', param:'{"addtime":"'+addtime+'"}'});
|
|
|
});
|
|
|
});
|
|
|
msg_html += '\
|