alarmdetail.js 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. (function () {
  2. var page = {
  3. isScroll: true,
  4. init: function ($page,$param) {
  5. var array = JSON.parse( $param );
  6. var html = '';
  7. userinfo = renlian.storage.get('userinfo');
  8. renlian.httpget(config.webapi + "/?s=api/get_baojing_detail&plate="+userinfo.baseinfo.plate+"&id="+array.ID, {}, 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">'+res.data.Title+'</span></div>\
  15. <div class="lr-card-content">\
  16. <div class="lr-card-content-inner">\
  17. '+res.data.Comment+'\
  18. </div>\
  19. </div>\
  20. ';
  21. $page.find('.detail').html(html);
  22. }else{
  23. renlian.layer.warning("详情信息出错", function () { }, '提示', '关闭');
  24. }
  25. })
  26. }
  27. };
  28. return page;
  29. })();