Parcourir la source

凌云集团更改公司

peiguo il y a 5 ans
Parent
commit
4c1bac840e

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

@@ -61,6 +61,9 @@ function getLocation() {
       var coord = new qq.maps.LatLng(res.latitude, res.longitude)
       longitude = res.longitude;
       latitude = res.latitude;
+      $("#commit").removeAttr("disabled",true).css("pointer-events","");
+      $("#commit").css("background-color","#1AAD19").css("color","#FFFFFF");
+      $("#dingwei").hide();
       geocoder.getAddress(coord)
 
     },

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

@@ -87,6 +87,8 @@
             }
 
         }
+        $("#commit").attr("disabled",true).css("pointer-events","none");
+        $("#commit").css("background-color","#EBEBE4").css("color","#757575");
         ribao_init();
         family_init();
         ribao_add();

+ 5 - 0
whepi-ui/templates/home/ribao.ftl

@@ -395,6 +395,11 @@
                                class="weui-btn weui-btn_primary"
                                style="margin-top: 0;width: 30%;">提交</a>
                         </div>
+                        <div id="dingwei" style="display: flex; justify-content: center;">
+                            <div style="color: blue">
+                                正在获取定位信息,请保证开启手机定位和微信定位
+                            </div>
+                        </div>
                     </div>
                 </div>
                 </br>

+ 4 - 5
whepi-ui/templates/home/ribao.js

@@ -30,6 +30,8 @@ function ribao_init() {
               alert('你的微信版本太低,不支持微信JS接口,请升级到最新的微信版本!');
               return;
             }
+            // 获取定位
+            getLocation();
           }
         });
         wx.error(function (res) {
@@ -822,9 +824,6 @@ function ribao_cell(v) {
 
 function ribao_add() {
   $('#btnAdd').on('click', function () {
-
-// 获取定位
-    getLocation();
     if ($('#ribao')[0].style.display == 'none') {
       $('#notOpenRibao').toggle();
       $('#ribao')[0].style.display = '';
@@ -1244,12 +1243,12 @@ function ribaoCommit() {
     var todyLocalOther = "";
     if (jrszd == 0) {
       cantijiao = true;
-      $.alert("请先设置微信获取当前位置");
+      $.alert("请检查是否开启手机定位和微信定位");
       //$.alert("请选择今晚住地");
       return;
     } else if (jrszd == 4 && jrszq == "") {
       cantijiao = true;
-      $.alert("请先设置微信获取当前位置");
+      $.alert("请检查是否开启手机定位和微信定位");
       //$.alert("请填写今晚住地");
       return;
     } else if (jrszd != 0 && jrszd != 4) {