Browse Source

fix tips without mapdata

git 5 years ago
parent
commit
c176d4fb24

+ 15 - 0
data/bjtype.js

@@ -0,0 +1,15 @@
+var bjTypeData = [{
+    value: "1",
+    text: "刑事案件",
+    children: [ {
+        value: "001",
+        text: "盗窃",
+        children: [ {
+            value: "100105",
+            text: "盗窃电动自行车"
+        }, {
+            value: "100199",
+            text: "其他盗窃"
+        }]
+    }]
+}] 

+ 4 - 0
pages/amap/amap.js

@@ -283,6 +283,10 @@
                 var gpsNumber = renlian.storage.get('userinfo').baseinfo.gpsNumber;
                 var mapData = null;
                 renlian.httpget(config.webapi+"/?s=api/get_map_index_data", {deviceNumber:deviceNumber, licensePlate:licensePlate, gpsNumber:gpsNumber}, function (_res) {
+                    if(!_res.success){
+                        renlian.layer.toast(_res.message);
+                        return;
+                    }
                     
                     mapData = _res.data;
                     console.log(mapData);

+ 5 - 0
pages/baojing/baojing.html

@@ -14,6 +14,10 @@
         <label>手机号码<font style="color:red;position:initial;"> *</font></label>
         <input id='mobile' type="text">
     </div>
+      <div class="lr-form-row">
+        <label>被盗种类<font style="color:red;position:initial;"> *</font></label>
+        <div id="select4"></div>
+    </div>
 	<div class="lr-form-row">
         <label>被盗日期<font style="color:red;position:initial;"> *</font></label>
         <div id="date2"></div>
@@ -22,6 +26,7 @@
         <label>事发城市<font style="color:red;position:initial;"> *</font></label>
         <div id="select3"></div>
     </div>
+
     <div class="lr-form-row">
         <label>事发地址<font style="color:red;position:initial;"> *</font></label>
         <input type="text" id="address">

+ 5 - 1
pages/baojing/baojing.js

@@ -35,7 +35,11 @@
                 data: cityData,
                 level: 3
              });
-			
+			 $page.find('#select4').lrpicker({
+                placeholder: '请选择',
+                data: cityData,
+                level: 3
+             });
             $page.find('#date2').lrdate({
                 type: 'date'
             });

+ 5 - 1
pages/demo/form/form.js

@@ -17,7 +17,11 @@
                 data: cityData,
                 level: 3
             });
-
+			$page.find('#select4').lrpicker({
+                placeholder: '请选择(必填)',
+                data: bjTypeData,
+                level: 3
+            });
             $page.find('#switch1').lrswitch();
 
             $page.find('#date1').lrdate();

+ 5 - 1
pages/demo/formvalidator/formvalidator.js

@@ -17,7 +17,11 @@
                 data: cityData,
                 level: 3
             });
-
+			$('#select4').lrpicker({
+                placeholder: '请选择(必填)',
+                data: bjTypeData,
+                level: 3
+            });
             $('#switch1').lrswitch();
 
             $('#date1').lrdate();

+ 4 - 0
pages/demo/pulltorefresh2/pulltorefresh2.js

@@ -48,6 +48,10 @@
                 placeholder: '请选择',
                 data: cityData
             });
+			 $('#select4').lrpicker({
+                placeholder: '请选择',
+                data: bjTypeData
+            });
 
             $('#switch1').lrswitch();