Sfoglia il codice sorgente

凌云集团更改公司

peiguo 5 anni fa
parent
commit
14a33bcc3e

+ 2 - 0
whepi-ui/templates/home/getLocation.js

@@ -59,6 +59,8 @@ function getLocation() {
         }
       })
       var coord = new qq.maps.LatLng(res.latitude, res.longitude)
+      longitude = res.longitude;
+      latitude = res.latitude;
       geocoder.getAddress(coord)
 
     },

+ 2 - 0
whepi-ui/templates/home/home.ftl

@@ -49,6 +49,8 @@
     var cantijiao = true;
     var autoLocal='';
     var autoAddr='';
+    var longitude = '';
+    var latitude = '';
     <#include "/home/ribao.js" />
     <#include "/home/qiuzhu.js" />
     <#include "/home/getLocation.js" />

+ 7 - 0
whepi-ui/templates/home/ribao.js

@@ -1070,6 +1070,11 @@ function ribaoCommit() {
   }
   cantijiao = false
   // //判断是否获取到定位
+  if (longitude == '' && latitude =='') {
+    cantijiao = true;
+    $.alert("请先设置微信获取当前位置");
+    return;
+  }
   // if (autoLocal == '') {
   //   cantijiao = true;
   //   $.alert("请先设置微信获取当前位置");
@@ -1308,6 +1313,8 @@ function ribaoCommit() {
     "autoAddr": autoAddr,
     "isTrip": isTrip,
     "tripDet": listcx,
+    "longitude": longitude,
+    "latitude": latitude,
   };
 
   $.ajax({