zhanghongrui 2 år sedan
förälder
incheckning
265d849986

+ 245 - 191
app.wxss

@@ -1,26 +1,31 @@
 /**app.wxss**/
 @import"iconfont.wxss";
 
-page{
-  font-family:Arial, Helvetica, sans-serif;
+page {
+  font-family: Arial, Helvetica, sans-serif;
 }
-.wid15{
+
+.wid15 {
   margin: 0px 30rpx;
 }
-.line{
+
+.line {
   height: 4rpx;
   background: #dddddd;
 }
-.line2{
+
+.line2 {
   height: 1rpx;
   background: #dddddd;
 }
-.line3{
+
+.line3 {
   height: 1rpx;
   background: #dddddd;
 }
+
 /* 搜索 */
-.search-container{
+.search-container {
   display: flex;
   justify-content: space-between;
   align-items: center;
@@ -31,244 +36,287 @@ page{
   border-radius: 50rpx;
   position: relative;
 }
-.search-left{
+
+.search-left {
   flex: 2;
   border-radius: 40rpx;
   padding-right: 40rpx;
   box-sizing: border-box;
 }
-.search-left input{
+
+.search-left input {
   display: inline-block;
   vertical-align: middle;
   width: calc(100% - 90rpx);
   height: 70rpx;
 }
-.search-right{
+
+.search-right {
   background: none;
-  width: 130rpx!important;
+  width: 130rpx !important;
   height: 80rpx;
-  padding: 0px!important;
+  padding: 0px !important;
   position: absolute;
   right: 0rpx;
   top: 7rpx;
   z-index: 99;
 }
-.search-right .img{
+
+.search-right .img {
   width: 45rpx;
   height: 45rpx;
   padding: 10rpx 0;
   vertical-align: middle;
 }
-.icon-sousuo{
+
+.icon-sousuo {
   font-size: 55rpx;
   color: rgb(206, 205, 205);
 }
-.icon-saoyisao1{
+
+.icon-saoyisao1 {
   font-size: 55rpx;
   color: rgb(206, 205, 205);
 }
 
-  /* 列表 */
-  .list_vi{
-    margin: 40rpx 30rpx 20rpx 30rpx;
-     height:101vh; 
-  }
-  .list_vi2{
-    margin: 40rpx 30rpx 20rpx 30rpx;
-  }
-  .list_vi .list_li{
-    display: flex;
-    flex-direction: row;
-    height: 100rpx;
-    line-height: 100rpx;
-    padding-bottom: 10rpx;
-    border-bottom: 1px solid #f3f3f3;
-  }
-  .list_vi .list_li:active{
-    background: rgb(240, 240, 240);
-  }
-  .list_r{
-    display: flex;
-    flex-direction: column;
-  }
-  .list_li_c{
-    display: flex;
-    flex-direction: row;
-    height: auto;
-    line-height: auto;
-    padding-top: 10rpx;
-  }
-  .list_vi .list_li1{
-    display: flex;
-    flex-direction: row;
-    height: auto;
-    line-height: 50rpx;
-
-  }
-  .list_vi .list_li2{
-    display: flex;
-    flex-direction: row;
-    height: auto;
-    line-height: 50rpx;
-    padding-bottom: 10rpx;
-    padding-left: 58rpx;
-  }
-  .list_vi .list_li2 text{
-    font-size: 29rpx!important;
-    color: #999!important;
-    margin-right: 20rpx;
-  }
-  .list_vi .iconfont{
-   margin-right: 20rpx;
-    font-size: 40rpx;
-  }
-  .list_vi .list_li text{
-    font-size: 34rpx;
-    color: #181818;
-  }
-  .list_vi .icon-queding{
-    color:rgb(13, 145, 13);
-  }
-  .list_vi .icon-yingjipingtai{
-    color:rgb(230, 61, 19);
-  }
-  .list_vi .list_right{
-    color:rgb(207, 207, 207);
-    margin-left: auto;
-    font-size: 40rpx;
-  }
-  .list_li3{
-    display: flex;
-    flex-direction: row;
-    height: auto;
-    line-height: 50rpx;
-    padding-bottom: 20rpx;
-    padding-top: 20rpx;
-    border-bottom: 1px solid #f2f2f2;
-  }
-  .list_li3:active{
- background-color: rgb(255, 247, 243);
-
-  }
-  .list_li3 .li_tit{
-    overflow: hidden;
-white-space: nowrap;
-text-overflow: ellipsis;
-font-size: 34rpx;
-color: #181818;
-text-align: left;
-  }
-  .list_li3 .li_time{
-    font-size: 29rpx;
-color: #666;
-  }
-  .list_li3 .li_time text{
-    margin-right: 40rpx;
-  }
-  .list_li3 .notice_li{
-    width: 80%;
-    display: flex;
-    flex-direction: column;
-  }
-  .list_li3 .icon-tongzhigonggao{
-    font-size: 50rpx;
-    color: rgb(238, 148, 125);
-    width: 10%;
-  }
-  .list_li3 .icon-anfangxungeng{
-    font-size: 50rpx;
-    color: rgb(238, 148, 125);
-    width: 10%;
-    line-height: 86rpx;
-  }
-  .list_li3  .list_right{
-    width: 10%;
-    text-align: right;
-    font-size:70rpx ;
-    line-height: 100rpx;
-    color:rgb(238, 238, 238);
-  }
-  .list_li3 .iconfont{
-    margin-right: 0px!important;
-  }
-  .list_li3 .icon-wuzichubei{
-    font-size: 50rpx;
-    color: rgb(125, 238, 163);
-    width: 10%;
-  }
-  .list_li3 .icon-cangkukucun{
-    font-size: 50rpx;
-    color: rgb(125, 196, 238);
-    width: 10%;
-  }
-  .list_li3 .icon-dangjian_duiwujianshe{
-    font-size: 50rpx;
-    color: rgb(238, 217, 125);
-    width: 10%;
-  }
-  /* 暂无数据 */
-.zwsj{
-  font-size: 260rpx!important;
+/* 列表 */
+.list_vi {
+  margin: 40rpx 30rpx 20rpx 30rpx;
+  height: 101vh;
+}
+
+.list_vi2 {
+  margin: 40rpx 30rpx 20rpx 30rpx;
+}
+
+.list_vi .list_li {
+  display: flex;
+  flex-direction: row;
+  height: 100rpx;
+  line-height: 100rpx;
+  padding-bottom: 10rpx;
+  border-bottom: 1px solid #f3f3f3;
+  
+}
+
+.list_vi .list_li:active {
+  background: rgb(240, 240, 240);
+}
+
+.list_r {
+  display: flex;
+  flex-direction: column;
+}
+
+.list_li_c {
+  display: flex;
+  flex-direction: row;
+  height: auto;
+  line-height: auto;
+  padding-top: 10rpx;
+}
+
+.list_vi .list_li1 {
+  display: flex;
+  flex-direction: row;
+  height: auto;
+  line-height: 50rpx;
+
+}
+
+.list_vi .list_li2 {
+  display: flex;
+  flex-direction: row;
+  height: auto;
+  line-height: 50rpx;
+  padding-bottom: 10rpx;
+  padding-left: 58rpx;
+}
+
+.list_vi .list_li2 text {
+  font-size: 29rpx !important;
+  color: #999 !important;
+  margin-right: 20rpx;
+}
+
+.list_vi .iconfont {
+  margin-right: 20rpx;
+  font-size: 40rpx;
+}
+
+.list_vi .list_li text {
+  font-size: 34rpx;
+  color: #181818;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+}
+
+.list_vi .icon-queding {
+  color: rgb(13, 145, 13);
+}
+
+.list_vi .icon-yingjipingtai {
+  color: rgb(230, 61, 19);
+}
+
+.list_vi .list_right {
+  color: rgb(207, 207, 207);
+  margin-left: auto;
+  font-size: 40rpx;
+}
+
+.list_li3 {
+  display: flex;
+  flex-direction: row;
+  height: auto;
+  line-height: 50rpx;
+  padding-bottom: 20rpx;
+  padding-top: 20rpx;
+  border-bottom: 1px solid #f2f2f2;
+}
+
+.list_li3:active {
+  background-color: rgb(255, 247, 243);
+
+}
+
+.list_li3 .li_tit {
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  font-size: 34rpx;
+  color: #181818;
+  text-align: left;
+}
+
+.list_li3 .li_time {
+  font-size: 29rpx;
+  color: #666;
+}
+
+.list_li3 .li_time text {
+  margin-right: 40rpx;
+}
+
+.list_li3 .notice_li {
+  width: 80%;
+  display: flex;
+  flex-direction: column;
+}
+
+.list_li3 .icon-tongzhigonggao {
+  font-size: 50rpx;
+  color: rgb(238, 148, 125);
+  width: 10%;
+}
+
+.list_li3 .icon-anfangxungeng {
+  font-size: 50rpx;
+  color: rgb(238, 148, 125);
+  width: 10%;
+  line-height: 86rpx;
+}
+
+.list_li3 .list_right {
+  width: 10%;
+  text-align: right;
+  font-size: 70rpx;
+  line-height: 100rpx;
+  color: rgb(238, 238, 238);
+}
+
+.list_li3 .iconfont {
+  margin-right: 0px !important;
+}
+
+.list_li3 .icon-wuzichubei {
+  font-size: 50rpx;
+  color: rgb(125, 238, 163);
+  width: 10%;
+}
+
+.list_li3 .icon-cangkukucun {
+  font-size: 50rpx;
+  color: rgb(125, 196, 238);
+  width: 10%;
+}
+
+.list_li3 .icon-dangjian_duiwujianshe {
+  font-size: 50rpx;
+  color: rgb(238, 217, 125);
+  width: 10%;
+}
+
+/* 暂无数据 */
+.zwsj {
+  font-size: 260rpx !important;
   display: flex;
   text-align: center;
   justify-content: center;
   color: rgb(206, 206, 206);
-  margin: 200rpx auto 40rpx auto!important;
+  margin: 200rpx auto 40rpx auto !important;
 }
-.zwsj_text{
+
+.zwsj_text {
   display: flex;
   text-align: center;
   justify-content: center;
-  font-size:40rpx;
+  font-size: 40rpx;
   color: #666;
 }
+
 /* 悬浮按钮 */
-.float_btn{
+.float_btn {
   bottom: 150rpx;
   right: 30rpx;
   border-radius: 50%;
   text-align: center;
   position: fixed;
   width: 100rpx;
-    height: 100rpx;
-    line-height: 100rpx;
-    background-color: #f94b0e;
-    color: #fff;
-    font-size: 36rpx;
-    box-shadow: 5rpx 5rpx 10rpx rgb(153, 153, 153);
+  height: 100rpx;
+  line-height: 100rpx;
+  background-color: #f94b0e;
+  color: #fff;
+  font-size: 36rpx;
+  box-shadow: 5rpx 5rpx 10rpx rgb(153, 153, 153);
 }
+
 /* 悬浮按钮 */
-.float_btn2{
+.float_btn2 {
   bottom: 290rpx;
   right: 30rpx;
   border-radius: 50%;
   text-align: center;
   position: fixed;
   width: 100rpx;
-    height: 100rpx;
-    line-height: 100rpx;
-    background-color: #fdcd2e;
-    color: #fff;
-    font-size: 36rpx;
-    box-shadow: 5rpx 5rpx 10rpx rgb(153, 153, 153);
-}
-.float_btn:active{
+  height: 100rpx;
+  line-height: 100rpx;
+  background-color: #fdcd2e;
+  color: #fff;
+  font-size: 36rpx;
+  box-shadow: 5rpx 5rpx 10rpx rgb(153, 153, 153);
+}
+
+.float_btn:active {
   background-color: #f14405;
 }
-.float_btn2:active{
+
+.float_btn2:active {
   background-color: #f1c120;
 }
 
 /* 列表详情 */
 
-.notice_tit{
+.notice_tit {
   font-size: 32rpx;
-color: #181818;
-text-align: left;
-display: flex;
-flex-direction: column;
+  color: #181818;
+  text-align: left;
+  display: flex;
+  flex-direction: column;
 }
-.notice_tit .tit{
+
+.notice_tit .tit {
   color: #f94b0e;
   list-style: circle;
   font-size: 34rpx;
@@ -278,36 +326,40 @@ flex-direction: column;
   margin-bottom: 30rpx;
 }
 
-.notice_tit .bor{
+.notice_tit .bor {
   width: 92%;
   padding: 3% 4%;
   box-shadow: 0px 0px 10rpx #e9e9e9;
   border-radius: 14rpx;
   margin-bottom: 30rpx;
 }
-.notice_tit .icon-weibiaoti--{
+
+.notice_tit .icon-weibiaoti-- {
   font-size: 36rpx;
   color: #ffaa8a;
   margin-right: 14rpx;
 }
-.notice_tit .icon-dian{
+
+.notice_tit .icon-dian {
   font-size: 38rpx;
   color: #f94b0e;
 }
 
 /* 通讯录列表 */
-.list_li4{
+.list_li4 {
   display: flex;
-  flex-direction:row ;
+  flex-direction: row;
   height: 130rpx;
   justify-content: center;
   align-items: center;
 }
-.list_li4 .txl_img .iconfont{
+
+.list_li4 .txl_img .iconfont {
   font-size: 100rpx;
   color: #fff1e8;
 }
-.list_li4 .txl_txt{
+
+.list_li4 .txl_txt {
   display: flex;
   flex-direction: column;
   justify-content: center;
@@ -316,13 +368,15 @@ flex-direction: column;
   padding-left: 5rpx;
   height: 100%;
 }
-.list_li4 .txl_txt text{
+
+.list_li4 .txl_txt text {
   font-size: 34rpx;
   font-weight: 500;
   color: #181818;
   padding-bottom: 10rpx;
 }
-.list_li4 .txl_txt i{
+
+.list_li4 .txl_txt i {
   font-size: 32rpx;
   color: #666;
 }

+ 1 - 1
base/httputil.js

@@ -1,6 +1,6 @@
 // let BASE_Server = "http://127.0.0.1:8329"
     // let BASE_Server = "https://192.168.1.109:8080"
-let BASE_Server = "https://sookajs.top:18080"
+let BASE_Server = "https://sookajs.top:28080"
 
 
 

BIN
pages/images/icon_hq.png


+ 15 - 1
pages/new_patrol_point/new_patrol_point.wxml

@@ -2,13 +2,27 @@
 <!-- 巡更点新增页面 -->
 <view class="container">
   <view class="page-section">
-    <view class="input_vi">
+    <!-- <view class="input_vi">
       <view class="input_title">经度</view>
       <input class="inp_txt" bindtap="getLocation" value="{{details.longitude}}" auto-focus placeholder="点击获取当前位置" disabled="true"  maxlength="100"/>
     </view>
     <view class="input_vi">
       <view class="input_title">纬度</view>
       <input class="inp_txt" bindtap="getLocation"  value="{{details.latitude}}" placeholder="点击获取当前位置"disabled="true"  maxlength="100"/>
+    </view> -->
+
+
+    <view class="input_vi input_vic">
+      <view class="input_title">坐标</view>
+    <view  class="flex_c"  wx:if="{{details.latitude==null}}">
+      <input class="inp_txt2" value="{{details.longitude}}" disabled="true" placeholder="点击获取坐标" maxlength="20" bindtap="getLocation" />
+    </view>
+      <view class="flex_c" wx:else>
+       <input class="inp_txt2" value="{{details.longitude}}" disabled="true" maxlength="20"/>
+      <text>,</text><input class="inp_txt2" value="{{details.latitude}}" disabled="true"  maxlength="20"/>
+      <image style="margin-left: 5rpx;" src="../images/icon_hq.png" class="icon" bindtap="getLocation" />
+      </view>
+      
     </view>
     <view class="input_vi">
       <view class="input_title">巡更点名称</view>

+ 30 - 1
pages/new_patrol_point/new_patrol_point.wxss

@@ -66,4 +66,33 @@ padding: 24rpx 0px!important;
   margin-left: 14rpx;
   color: #535353;
   font-size: 48rpx;
- }
+ }
+
+ .inp_txt2{
+  text-align: left!important;
+  font-size: 18rpx;
+  width: 200rpx!important;
+ }
+ .input_vic{
+   display: flex;
+   flex-direction: row;
+ }
+ .input_vic image{
+   align-items: center;
+   display: flex;
+ }
+ .flex_c{
+   display: flex;
+   flex-direction: row;
+   margin-left: auto;
+   align-items: center;
+ }
+ .input_vic text{
+   font-size: 32rpx;
+   line-height: 100rpx;
+   color: #555;
+ }
+ .icon{
+  height: 40rpx;
+  width: 40rpx;
+}

+ 13 - 1
pages/qiyemore/qiyemore.wxml

@@ -2,13 +2,25 @@
 <!-- 企业新增页面 -->
 <view class="container">
   <view class="page-section">
-    <view class="input_vi">
+    <!-- <view class="input_vi">
       <view class="input_title">经度</view>
       <input bindtap="getLocation" value="{{form.longitude}}" disabled="true" class="inp_txt" auto-focus placeholder="点击获取当前位置"  maxlength="100"/>
     </view>
     <view class="input_vi">
       <view class="input_title">纬度</view>
       <input bindtap="getLocation" value="{{form.latitude}}" disabled="true" class="inp_txt" placeholder="点击获取当前位置" maxlength="100" />
+    </view> -->
+    <view class="input_vi input_vic">
+      <view class="input_title">坐标</view>
+    <view  class="flex_c"  wx:if="{{form.latitude==null}}">
+      <input class="inp_txt2" value="{{form.longitude}}" disabled="true" placeholder="点击获取坐标" maxlength="20" bindtap="getLocation" />
+    </view>
+      <view class="flex_c" wx:else>
+       <input class="inp_txt2" value="{{form.longitude}}" disabled="true" maxlength="20"/>
+      <text>,</text><input class="inp_txt2" value="{{form.latitude}}" disabled="true"  maxlength="20"/>
+      <image style="margin-left: 5rpx;" src="../images/icon_hq.png" class="icon" bindtap="getLocation" />
+      </view>
+      
     </view>
     <view class="input_vi">
       <view class="input_title">企业名称</view>

+ 29 - 1
pages/qiyemore/qiyemore.wxss

@@ -55,4 +55,32 @@
   font-size: 32rpx;
   margin: 60rpx auto;
   padding: 24rpx 46rpx!important;
-}
+}
+.icon{
+  height: 40rpx;
+  width: 40rpx;
+}
+.inp_txt2{
+  text-align: left!important;
+  font-size: 18rpx;
+  width: 200rpx!important;
+ }
+ .input_vic{
+   display: flex;
+   flex-direction: row;
+ }
+ .input_vic image{
+   align-items: center;
+   display: flex;
+ }
+ .flex_c{
+   display: flex;
+   flex-direction: row;
+   margin-left: auto;
+   align-items: center;
+ }
+ .input_vic text{
+   font-size: 32rpx;
+   line-height: 100rpx;
+   color: #555;
+ }

+ 19 - 0
pages/qiyexqtable/qiyexqtable.js

@@ -75,6 +75,23 @@ Page({
     this.data.enterpriseDetails.headSecurityPhone = e.detail.value
   },
 
+  getLocation() {
+    let that = this
+    wx.getLocation({
+      type: 'wgs84', //返回可以用于wx.openLocation的经纬度
+      success: function (res) {
+
+        that.setData({
+
+          ['enterpriseDetails.longitude']: res.longitude,
+          ['enterpriseDetails.latitude']: res.latitude
+
+
+        })
+      },
+    })
+  },
+
   //------------------------------------------
 
   updateEnterprise() {
@@ -121,6 +138,8 @@ Page({
     obj.mainPersonPhone = this.data.enterpriseDetails.mainPersonPhone
     obj.headSecurity = this.data.enterpriseDetails.headSecurity
     obj.headSecurityPhone = this.data.enterpriseDetails.headSecurityPhone
+    obj.latitude = this.data.enterpriseDetails.latitude
+    obj.longitude = this.data.enterpriseDetails.longitude
     http.post("/system/AppEnterpriseController/updateEnterprise", obj, this.updateEnterpriseSuccess)
   },
   updateEnterpriseSuccess(res) {

+ 11 - 5
pages/qiyexqtable/qiyexqtable.wxml

@@ -2,14 +2,20 @@
 <!-- 企业编辑页面 -->
 <view class="container">
   <view class="page-section">
-    <view class="input_vi">
-      <view class="input_title">经度</view>
-      <input class="inp_txt" value="{{enterpriseDetails.longitude}}" disabled="true"  maxlength="100"/>
+    <view class="input_vi input_vic">
+      <view class="input_title">坐标</view>
+      <view class="flex_c">
+       <input class="inp_txt2" value="{{enterpriseDetails.longitude}}" disabled="true"  maxlength="20"/>
+      <text>,</text><input class="inp_txt2" value="{{enterpriseDetails.latitude}}" disabled="true"  maxlength="20"/>
+      <image style="margin-left: 5rpx;" src="../images/icon_hq.png" class="icon" bindtap="getLocation" />
+      </view>
+      
     </view>
-    <view class="input_vi">
+    
+    <!-- <view class="input_vi">
       <view class="input_title">纬度</view>
       <input class="inp_txt" value="{{enterpriseDetails.latitude}}" disabled="true"  maxlength="100"/>
-    </view>
+    </view> -->
     <view class="input_vi">
       <view class="input_title">企业名称</view>
       <input class="inp_txt" bindinput="get_businessName" value="{{enterpriseDetails.businessName}}" maxlength="100" />

+ 28 - 0
pages/qiyexqtable/qiyexqtable.wxss

@@ -12,6 +12,30 @@
   height: 100rpx;
   margin-bottom: 20rpx;
 }
+.inp_txt2{
+ text-align: left!important;
+ font-size: 18rpx;
+ width: 180rpx!important;
+}
+.input_vic{
+  display: flex;
+  flex-direction: row;
+}
+.input_vic image{
+  align-items: center;
+  display: flex;
+}
+.flex_c{
+  display: flex;
+  flex-direction: row;
+  margin-left: auto;
+  align-items: center;
+}
+.input_vic text{
+  font-size: 32rpx;
+  line-height: 100rpx;
+  color: #555;
+}
 .input_vi .input_title{
   font-size: 34rpx;
   height: 100rpx;
@@ -47,4 +71,8 @@ padding: 24rpx 0px!important;
   font-size: 32rpx;
   margin: 60rpx auto;
   padding: 24rpx 0px!important;
+}
+.icon{
+  height: 40rpx;
+  width: 40rpx;
 }

+ 44 - 43
pages/update_patrol_point/update_patrol_point.js

@@ -8,14 +8,14 @@ Page({
   data: {
     host: app.globalData.host,
     enterpriseId: null,
-    pageCode:null,
+    pageCode: null,
     // details: {
-      id: null,
-      longitude: Number,
-      latitude: Number,
-      name: null,
-      code: null,
-      remark: null,
+    id: null,
+    longitude: Number,
+    latitude: Number,
+    name: null,
+    code: null,
+    remark: null,
     // },
   },
 
@@ -33,7 +33,7 @@ Page({
     http.post("/system/AppPatrolstationController/getPatrolstationDetail", obj, this.getDetailsSuccess)
   },
   getDetailsSuccess(res) {
-   
+
     wx.hideLoading()
     if (res.data.length == 0) {
 
@@ -44,18 +44,19 @@ Page({
     } else {
       // this.data.details.name= res.data[0].busEnterpriseName,
       // this.data.enterpriseId= res.data[0].busEnterpriseId,
-      this.data.id= res.data[0].busPatrolstationId,
-      this.data.code= res.data[0].busPatrolstationCode,
-      this.data.name= res.data[0].busPatrolstationName,
-      this.data.latitude= res.data[0].latitude,
-      this.data.longitude= res.data[0].longitude,
-      this.data.remark=res.data[0].remarks,
-      this.setData({
-        remark: res.data[0].remarks,
-        code:res.data[0].busPatrolstationCode,
-        name:res.data[0].busPatrolstationName,
-        latitude: res.data[0].latitude,
-        longitude: res.data[0].longitude,})
+      this.data.id = res.data[0].busPatrolstationId,
+        this.data.code = res.data[0].busPatrolstationCode,
+        this.data.name = res.data[0].busPatrolstationName,
+        this.data.latitude = res.data[0].latitude,
+        this.data.longitude = res.data[0].longitude,
+        this.data.remark = res.data[0].remarks,
+        this.setData({
+          remark: res.data[0].remarks,
+          code: res.data[0].busPatrolstationCode,
+          name: res.data[0].busPatrolstationName,
+          latitude: res.data[0].latitude,
+          longitude: res.data[0].longitude,
+        })
     }
   },
   //-----------------------------------------
@@ -68,18 +69,18 @@ Page({
   bindInputCode(e) {
     this.data.code = e.detail.value
   },
-  bindViewScan(){
+  bindViewScan() {
     wx.scanCode({
-      onlyFromCamera: true,
+      onlyFromCamera: true,
       success: (res) => {
-       this.setData({
-        ['details.code']:res.result,
-      })
+        this.setData({
+          ['details.code']: res.result,
+        })
       },
       fail: (res) => {
         wx.showToast({
           title: '扫描失败请重试',
-          icon:'none'
+          icon: 'none'
         })
       }
     })
@@ -87,14 +88,14 @@ Page({
   //------------------------------------------
 
   updateDetails() {
-    if(this.data.name==null){
+    if (this.data.name == null) {
       wx.showToast({
-        title:'请输入巡更点名称',
-        icon:'none'
+        title: '请输入巡更点名称',
+        icon: 'none'
       })
       return
     }
-    
+
     // if(this.data.details.code==null){
     //   wx.showToast({
     //     title:'请扫描巡更点编码',
@@ -102,35 +103,35 @@ Page({
     //   })
     //   return
     // }
-    
-    if(this.data.longitude==0||this.data.latitude==0){
+
+    if (isNaN(this.data.latitude) || isNaN(this.data.longitude)) {
       wx.showToast({
-        title:'请点击定位当前位置',
-        icon:'none'
+        title: '请点击定位当前位置',
+        icon: 'none'
       })
       return
     }
-  
+
     let obj = new Object();
     // obj.busEnterpriseId = this.data.enterpriseId
     obj.busPatrolstationId = this.data.id
     obj.busPatrolstationName = this.data.name
     obj.busPatrolstationCode = this.data.code
-    obj.longitude=this.data.longitude
-    obj.latitude=this.data.latitude
+    obj.longitude = this.data.longitude
+    obj.latitude = this.data.latitude
     obj.remarks = this.data.remark
-    
+
     http.post("/system/AppPatrolstationController/edittPatrolstationList", obj, this.updateDetailsSuccess)
   },
   updateDetailsSuccess(res) {
     wx.showToast({
       title: res.msg,
     })
-    if(res.code == 200){
+    if (res.code == 200) {
       wx.navigateBack()
     }
   },
- 
+
   /**
    * 生命周期函数--监听页面初次渲染完成
    */
@@ -179,15 +180,15 @@ Page({
   onShareAppMessage() {
 
   },
-  
+
   getLocation() {
     let that = this
     wx.getLocation({
       type: 'wgs84', //返回可以用于wx.openLocation的经纬度
       success: function (res) {
         that.setData({
-          ['details.longitude']:  res.longitude,
-          ['details.latitude']:  res.latitude
+          ['longitude']: res.longitude,
+          ['latitude']: res.latitude
         })
       },
     })

+ 12 - 1
pages/update_patrol_point/update_patrol_point.wxml

@@ -2,13 +2,24 @@
 <!-- 巡更点编辑页面 -->
 <view class="container">
   <view class="page-section">
-    <view class="input_vi">
+    <!-- <view class="input_vi">
       <view class="input_title">经度</view>
       <input class="inp_txt" bindtap="getLocation" value="{{longitude}}" auto-focus placeholder="点击获取当前位置" disabled="true"  maxlength="100"/>
     </view>
     <view class="input_vi">
       <view class="input_title">纬度</view>
       <input class="inp_txt" bindtap="getLocation"  value="{{latitude}}" placeholder="点击获取当前位置"disabled="true"  maxlength="100"/>
+    </view> -->
+
+    <view class="input_vi input_vic">
+      <view class="input_title">坐标</view>
+    
+      <view class="flex_c">
+       <input class="inp_txt2" value="{{longitude}}" disabled="true" maxlength="20"/>
+      <text>,</text><input class="inp_txt2" value="{{latitude}}" disabled="true"  maxlength="20"/>
+      <image style="margin-left: 5rpx;" src="../images/icon_hq.png" class="icon" bindtap="getLocation" />
+      </view>
+      
     </view>
     <view class="input_vi">
       <view class="input_title">巡更点名称</view>

+ 29 - 1
pages/update_patrol_point/update_patrol_point.wxss

@@ -66,4 +66,32 @@ padding: 24rpx 0px!important;
   margin-left: 14rpx;
   color: #535353;
   font-size: 48rpx;
- }
+ }
+ .inp_txt2{
+  text-align: left!important;
+  font-size: 18rpx;
+  width: 200rpx!important;
+ }
+ .input_vic{
+   display: flex;
+   flex-direction: row;
+ }
+ .input_vic image{
+   align-items: center;
+   display: flex;
+ }
+ .flex_c{
+   display: flex;
+   flex-direction: row;
+   margin-left: auto;
+   align-items: center;
+ }
+ .input_vic text{
+   font-size: 32rpx;
+   line-height: 100rpx;
+   color: #555;
+ }
+ .icon{
+  height: 40rpx;
+  width: 40rpx;
+}

+ 2 - 2
project.private.config.json

@@ -1,9 +1,9 @@
 {
   "projectname": "sooka_edyj_minapp",
   "setting": {
-    "compileHotReLoad": true,
+    "compileHotReLoad": false,
     "urlCheck": false
   },
   "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
-  "libVersion": "2.30.0"
+  "libVersion": "2.16.0"
 }