git 6 년 전
부모
커밋
6304b0bf69
3개의 변경된 파일8개의 추가작업 그리고 6개의 파일을 삭제
  1. 3 2
      pages/alarmdetail/alarmdetail.js
  2. 1 1
      pages/amap/amap.js
  3. 4 3
      pages/baojinginfo/baojinginfo.js

+ 3 - 2
pages/alarmdetail/alarmdetail.js

@@ -2,10 +2,11 @@
     var page = {
         isScroll: true,
         init: function ($page,$param) {
-			console.log($param);
+			var array = JSON.parse( $param );
+			console.log(array.addtime);
 			var html = '';
 			userinfo = learun.storage.get('userinfo');
-			learun.http.get(config.webapi + "/?s=api/get_gonggao_info&plate="+userinfo.baseinfo.plate, {}, function(res) {
+			learun.http.get(config.webapi + "/?s=api/get_gonggao_info&plate="+userinfo.baseinfo.plate+"&addtime="+$param.addtime, {}, function(res) {
 				if(res.success == true){
 				$.each(res.data, function (_index, _item) {
 					html += '<div class="lr-list-item">'+_item.AddTime+'</div>\

+ 1 - 1
pages/amap/amap.js

@@ -70,7 +70,7 @@
 				if(window.lrmui.jgRegistrationId){
 					var post_data = {
 						"regid":window.lrmui.jgRegistrationId,
-						"uid":userinfo['userId']
+						"uid":userinfo.baseinfo.userId
 					};
 					learun.httppost(config.webapi+'?s=api/update_jg_registrationid',post_data,function(res){
 						

+ 4 - 3
pages/baojinginfo/baojinginfo.js

@@ -75,7 +75,7 @@
 									msg_html += '\
 										<div class="lr-list">\
 												<div class="lr-list-item lr-list-item-multi" style="line-height: 25px;">\
-													<h4>'+ _item.AddTime +'</h4>\
+													<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>\
 												</div>\
@@ -89,8 +89,9 @@
 								msg_html += '<h4>暂无消息</h4>';	
 							}
 							$page.find('#gonggaoinfo').html(msg_html);
-							$('#gonggaodetail').on('tap', function () {	
-								learun.nav.go({ path: 'alarmdetail', title: '告警详情', type: 'right',param:'{"addtime":_item.AddTime}' });
+							$('#gonggaodetail').on('tap', function () {
+								var addtime = $('#time').text();
+								learun.nav.go({ path: 'alarmdetail', title: '告警详情', type: 'right',param:'{"addtime":'+addtime+'}' });
 							});
 						});
 						msg_html += '\