alarmdetail.js 1.2 KB

123456789101112131415161718192021222324
  1. (function () {
  2. var page = {
  3. isScroll: true,
  4. init: function ($page,$param) {
  5. var array = JSON.parse( $param );
  6. var html = '';
  7. userinfo = learun.storage.get('userinfo');
  8. learun.httpget(config.webapi + "/?s=api/get_baojing_detail&plate="+userinfo.baseinfo.plate+"&addtime="+array.addtime, {}, function(res) {
  9. console.log(res);
  10. if(res.success == true){
  11. html += '<div class="lr-list-item">车牌号<span class="lr-badge" style="background-color:white">'+res.data.LicensePlate+'</span></div>\
  12. <div class="lr-list-item">电子标签<span class="lr-badge" style="background-color:white">'+res.data.DeviceNumber+'</span></div>\
  13. <div class="lr-list-item">报警时间<span class="lr-badge" style="background-color:white">'+res.data.AddTime+'</span></div>\
  14. <div class="lr-list-item">报警类型<span class="lr-badge" style="background-color:white">告警</span></div>\
  15. <div class="lr-list-item">报警信息<span class="lr-badge" style="background-color:white">'+res.data.Comment+'</span></div>';
  16. $page.find('.detail').html(html);
  17. }else{
  18. learun.layer.warning("详情信息出错", function () { }, '提示', '关闭');
  19. }
  20. })
  21. }
  22. };
  23. return page;
  24. })();