Bläddra i källkod

强制获取定位

peiguo 3 år sedan
förälder
incheckning
6d37afdc1e
2 ändrade filer med 9 tillägg och 8 borttagningar
  1. 1 1
      whepi-ui/templates/home/ribao.ftl
  2. 8 7
      whepi-ui/templates/home/ribao.js

+ 1 - 1
whepi-ui/templates/home/ribao.ftl

@@ -367,7 +367,7 @@
                                 </div>
                             <div id="ribao_trip" class="weui-btn-area" style="margin: 0"><#--style="display: none"-->
                                 <div style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 0;">
-                                    <div style="color: gray;height: 30px; line-height: 30px; flex: 8;-webkit-flex: 8;">离开工作驻地</div>
+                                    <div style="color: gray;height: 30px; line-height: 30px; flex: 8;-webkit-flex: 8;">是否离开本市</div>
                                     <div class="weui-cells_checkbox" style="flex: 5;-webkit-flex: 5;">
                                         <label class="weui-radio weui-cell_active weui-check__label" for="s50" style="padding: 10px 0 10px 10px;">
                                             <input type="radio" name="radio4" value="0" class="weui-check" id="s50"

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

@@ -1301,14 +1301,15 @@ function ribaoCommit() {
       return;
     }
   }
-  if (listcx.length > 0 && autoLocal == "") {
-    autoLocal = listcx[0].endlocalStr
-  }
-  // if (autoLocal == '') {
-  //   cantijiao = true;
-  //   $.alert("请先设置微信获取当前位置");
-  //   return;
+  // if (listcx.length > 0 && autoLocal == "") {
+  //   autoLocal = listcx[0].endlocalStr
   // }
+  // 强制定位
+  if (autoLocal == '') {
+    cantijiao = true;
+    $.alert("请先设置微信获取当前位置");
+    return;
+  }
   //var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
   var sf = $("input[name=radio4]:checked").val()
   if (listcx.length == 0 && sf == 1) {