git 6 rokov pred
rodič
commit
bb651595fa
3 zmenil súbory, kde vykonal 12 pridanie a 10 odobranie
  1. 1 1
      index.html
  2. 4 2
      pages/amap/route/route.js
  3. 7 7
      pages/baojinginfo/baojinginfo.js

+ 1 - 1
index.html

@@ -31,6 +31,6 @@
         <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.12&key=78735d0efd243f8085837edf355526cb"></script>
         
         <!-- ui组件库 -->
-        <script src="//webapi.amap.com/ui/1.0/main.js"></script>
+        <script src="https://webapi.amap.com/ui/1.0/main.js"></script>
     </body>
 </html>

+ 4 - 2
pages/amap/route/route.js

@@ -121,10 +121,12 @@
                     var lastNode = navg0.getCursor().idx;
                     console.log(lastNode);
                     if(lastNode == 0){
-                        navg0.moveToPoint(0, 0.1);
+                        navg0.moveToPoint(0, 0);
+                        console.log('tt');
                         return;
                     }
-                    console.log(lastNode);
+                    
+                    
                     console.log(navg0.getCursor());
                     navg0.moveToPoint(lastNode-1, 0);
                 });

+ 7 - 7
pages/baojinginfo/baojinginfo.js

@@ -32,9 +32,9 @@
 						
 						//var baojing_info = '';
 						userinfo = learun.storage.get('userinfo');
-						learun.http.get(config.webapi + "/?s=api/get_baojing_info&plate="+userinfo.baseinfo.plate, {}, function(res) {
-							if(res.success == true){
-								$.each(res.data, function (_index, _item) {
+						learun.httpget(config.webapi + "/?s=api/get_baojing_info&plate="+userinfo.baseinfo.plate, {}, function(res) {
+							if(res){
+								$.each(res, function (_index, _item) {
 									msg_html += '\
 										<div class="lr-list">\
 												<div class="lr-list-item lr-list-item-multi" style="line-height: 25px;">\
@@ -49,7 +49,7 @@
 							}
 							$page.find('#gaojinginfo').html(msg_html);
 							$('#gaojingdetail').on('tap', function () {	
-								learun.nav.go({ path: 'alarmdetail', title: '告警详情', type: 'right' });
+								learun.nav.go({ path: 'alarmdetail', title: '告警详情', type: 'right', param:'{"addtime":'+addtime+'}'});
 							});
 							});
 						
@@ -69,9 +69,9 @@
 										<div class="f-scroll" id="gonggaoinfo" style="transform: translate3d(0px, 0px, 0px) translateZ(0px);">';
 						//var baojing_info = '{"0":{"data":"1111","msg":"公告","time":"2/28"},"1":{"data":"2222","msg":"公告","time":"2/29"}}';
 						userinfo = learun.storage.get('userinfo');
-						learun.http.get(config.webapi + "/?s=api/get_gonggao_info&plate="+userinfo.baseinfo.plate, {}, function(res) {
-							if(res.success == true){
-								$.each(res.data, function (_index, _item) {
+						learun.httpget(config.webapi + "/?s=api/get_gonggao_info&plate="+userinfo.baseinfo.plate, {}, function(res) {
+							if(res){
+								$.each(res, function (_index, _item) {
 									msg_html += '\
 										<div class="lr-list">\
 												<div class="lr-list-item lr-list-item-multi" style="line-height: 25px;">\