Browse Source

change interval of nagigation

git 5 years ago
parent
commit
aca848d6db

+ 3 - 1
pages/amap/amap.js

@@ -235,6 +235,7 @@
                 overlayData = {map:mainMap, vehicle:vehicleMarker, circle:circle};
             }
             var latlngSign = null;
+            var defaultCenter = null;
 
             getVehicleData = function(t, first=false){
                 var deviceNumber = renlian.storage.get('userinfo').baseinfo['deviceNumber'];
@@ -257,6 +258,7 @@
                         t.vehicle.setMap(null);
                     }else{
                         var vehiclePt = new AMap.LngLat(+mapData.vehicleLocation.longitude, +mapData.vehicleLocation.latitude);
+                        defaultCenter = vehiclePt;
                         startEnd.end = vehiclePt;
                         fenceCenterVehicle = vehiclePt;
                         t.vehicle.setPosition(vehiclePt);
@@ -469,7 +471,7 @@
 
             //轨迹页跳转
             $('#route-play').on('tap', function () {
-                renlian.nav.go({ path: 'amap/route', title: '轨迹回放', isBack: true, isHead: true, param: routePageData });
+                renlian.nav.go({ path: 'amap/route', title: '轨迹回放', isBack: true, isHead: true, param: {textData:routePageData, defaultCenter: defaultCenter || startEnd.start} });
                 if(infoWindow){infoWindow.close( );}
             });
 

+ 2 - 2
pages/amap/navigation/navigation.js

@@ -10,7 +10,7 @@
                 zoom: 12 //地图显示的缩放级别
             });
 
-
+            console.log('aa');
             
 
 
@@ -93,7 +93,7 @@
                         }else{console.log(JSON.stringify(result))}
                     });
                 }
-            }, 10000);
+            }, 2000);
 
 
 

+ 3 - 3
pages/amap/route/route.js

@@ -6,8 +6,8 @@
            renlian.layer.loading(true, "加载数据中");
            var userinfo = renlian.storage.get('userinfo');
             $('#route-gpsNumber').text(userinfo.baseinfo.gpsNumber);
-            $('#date-time').text('时间:'+param.lastTime || '0000-00-00 00:00:00');
-            $('#vehicle-speed').text('速度:'+param.speed+' km/h')
+            $('#date-time').text('时间:'+param.textData.lastTime || '0000-00-00 00:00:00');
+            $('#vehicle-speed').text('速度:'+param.textData.speed+' km/h')
 			
             //播放控制相关事件清除
             function removeEvents(){
@@ -20,7 +20,7 @@
 
             //地图初始化
             var routeMap = new AMap.Map('route-map', {
-                center: [117.000923, 36.675807],
+                center: param.defaultCenter,
                 zoom: 15
             });
 

+ 6 - 6
pages/baojing/baojing.html

@@ -7,27 +7,27 @@
         <div id="plateselect"></div>
     </div>-->
 	<div class="lr-form-row">
-        <label>车牌号</label>
+        <label>车牌号<font style="color:red;position:initial;"> *</font></label>
         <input id='plate' type="text" readonly>
     </div>
     <div class="lr-form-row">
-        <label>手机号码</label>
+        <label>手机号码<font style="color:red;position:initial;"> *</font></label>
         <input id='mobile' type="text">
     </div>
 	<div class="lr-form-row">
-        <label>被盗日期</label>
+        <label>被盗日期<font style="color:red;position:initial;"> *</font></label>
         <div id="date2"></div>
     </div>
      <div class="lr-form-row">
-        <label>事发城市</label>
+        <label>事发城市<font style="color:red;position:initial;"> *</font></label>
         <div id="select3"></div>
     </div>
     <div class="lr-form-row">
-        <label>事发地址</label>
+        <label>事发地址<font style="color:red;position:initial;"> *</font></label>
         <input type="text" id="address">
     </div>
     <div class="lr-form-row lr-form-row-multi">
-        <label>报警原因</label>
+        <label>报警原因<font style="color:red;position:initial;"> *</font></label>
         <!--<div class="lrtextarea"  contenteditable="true" ></div>-->
         <textarea id="textarea"></textarea>
     </div>

+ 22 - 5
pages/baojing/baojing.js

@@ -21,11 +21,11 @@
             	    console.log(res);
 					$page.find('#select3').lrpickerSet(res.data);
 					
-					// $page.find('#select3').lrpickerSet('20,331,2012');
+					 //$page.find('#select3').lrpickerSet('20,331,2012');
 			});
 			$page.find('#plate').val(userinfo.baseinfo.plate);
 			$page.find('#mobile').val(userinfo.baseinfo.mobile);
-			console.log(userinfo);
+			//console.log(userinfo);
 			// renlian.httpget(config.webapi + "/?s=api/getCityInfo&cityid="+userinfo.baseinfo.cityid, {}, function(res) {
 			// 	console.log(res);
 			// });
@@ -46,14 +46,31 @@
 				var mobile = $('#mobile').val();
 				var date = $('#date2').children("div").text();
 				var stolencityid = $page.find('#select3').lrpickerGet('vaule');
-				console.log($page.find('#select3').lrpickerGet('vaule'));
+				//console.log($page.find('#select3').lrpickerGet('vaule'));
+				if(!mobile){
+					renlian.layer.toast('手机号不能为空');
+					return;
+				}
+				var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;
+				if (!myreg.test(mobile)) {
+				    renlian.layer.toast('手机号格式不正确!');
+					return;
+				}
+				if(date == '请选择'){
+					renlian.layer.toast('请选择被盗日期');
+					return;
+				}
 				var stolenaddress = $('#address').val();
 				if(!stolenaddress){
-					renlian.layer.toast('案发地址不能为空');
+					renlian.layer.toast('发地址不能为空');
 					return;
 				}
 				var reason = $('#textarea').val();
-
+				     var reasons = reason.replace(/(^\s*)|(\s*$)/g, "");
+					if(!reasons){
+						renlian.layer.toast('请填写报警原因');
+					    return;
+					}
 				var policedata = {
 						userid: userinfo.baseinfo.userId,
                         LicensePlate: userinfo.baseinfo.plate,

+ 3 - 2
pages/baojinginfo/baojinginfo.js

@@ -22,6 +22,7 @@
 						//var baojing_info = '';
 						userinfo = renlian.storage.get('userinfo');
 						renlian.httpget(config.webapi + "/?s=api/get_baojing_info&plate="+userinfo.baseinfo.plate, {}, function(res) {
+							console.log(res)
 							if(res.success == true){
 								var msg_html_list = '';
 								$.each(res.data, function (_index, _item) {
@@ -94,7 +95,7 @@
 						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 style="position:unset;padding:10px" class="lr-list gonggaoinfo">\
 											</div>\
 										</div>\
 										<div class="f-scrollbar f-scrollbar-vertical">\
@@ -123,7 +124,7 @@
 								});
 								
 							}else{
-								msg_html += '<h4>暂无消息</h4>';
+								msg_html += '<h4 style="text-align: center;">暂无消息</h4>';
 								$page.find('.gonggaoinfo').html(msg_html);
 							}
 						});

+ 1 - 1
pages/tongji/tongji.js

@@ -12,7 +12,7 @@
 					console.log(respData);
 
 					respData.forEach(v => {
-						sData.push(v.totalDist);
+						sData.push(v.totalDist.toFixed(2));
 						days5Dist += v.totalDist;
 						day5Time += v.totalTime;
 					});