zhanghongrui 2 роки тому
батько
коміт
6fd92ead6b

+ 1 - 1
app.json

@@ -38,7 +38,7 @@
     "pages/maillist/serch/maillist_serch",
     "pages/xqzgdetail/xqzgdetail",
     "pages/fcdetail/fcdetail",
-    "pages/xunjianqrcode/xunjianqrcode"
+    "pages/xungengdetails/xungengdetails"
   ],
   "requiredPrivateInfos": [
     "getLocation"

+ 6 - 0
pages/details/details.js

@@ -69,6 +69,12 @@ Page({
       phoneNumber: '17649876533'
     })
   },
+  //巡更点跳转
+  xungengList(){
+wx.showToast({
+  title: '巡更点跳转',
+})
+  },
   //导航
   navRoad(event) {
     console.log(event)

+ 7 - 0
pages/details/details.wxml

@@ -32,6 +32,10 @@
         <i>{{enterpriseDetails.orgCode}}</i>
       </view>
       <view>
+        <span>企业编码:</span>
+        <i>{{enterpriseDetails.orgCode}}</i>
+      </view>
+      <view>
         <span>办公地址:</span>
         <i>{{enterpriseDetails.officeAddress}}</i>
       </view>
@@ -67,6 +71,9 @@
         <span>负责人电话:</span>
         <i>{{enterpriseDetails.headSecurityPhone}}</i>
       </view>
+    
+      <text class="xungengdian" bindtap="xungengList"> 巡更点</text>
+     
     </view>
 
     <!-- 巡检悬浮按钮 -->

+ 10 - 0
pages/details/details.wxss

@@ -53,4 +53,14 @@ word-wrap:break-word
 .logo-text{
   display: none;
 }
+.xungengdian{
+  display: flex;
+ 
+  align-items: center;
+ 
+  justify-content: center;
+  text-align: center;
+  text-decoration:underline;
+  color:blue;
+}
 

+ 49 - 1
pages/index/index.js

@@ -163,12 +163,60 @@ Page({
   },
   //巡检跳转
   bindViewXunJian() {
+    if (app.globalToken == null) {
+      wx.showToast({
+        title: '尚未登录,登录后即可使用',
+        icon: 'none'
+      })
+      return
+    }
      wx.navigateTo({
-     url: '../xunjianqrcode/xunjianqrcode',
+     url: '../search/search',
      })
   },
+  //巡更跳转
+  bindViewXungeng(){
+    if (app.globalToken == null) {
+      wx.showToast({
+        title: '尚未登录,登录后即可使用',
+        icon: 'none'
+      })
+      return
+    }
+    this.scan()
+  },
+
+  scan() {
+
+    wx.scanCode({
+      onlyFromCamera: true,
+      success: (res) => {
+
+        console.log("$$$",res.result);
+        wx.navigateTo({
+          url: '../xungengdetails/xungengdetails?id='+res.result,
+        })
+
+      
+
+      },
+
+      fail: (res) => {
+
+       // console.log(res);
+       wx.showToast({
+        title: '扫描失败',
+        icon:'none'
+      })
+
+      }
+
+    })
+
+ },
   // 使用攻略跳转
   bindViewIntroduction() {
+    
     wx.navigateTo({
       url: '../Introduction/Introduction'
     })

+ 1 - 1
pages/index/index.wxml

@@ -83,7 +83,7 @@
     </view>
     <view class="line2"></view>
     <view class="yjtd_icon">
-      <view class="icon_vi">
+      <view class="icon_vi" bindtap="bindViewXungeng">
       <view class="icon_bg icon_xg">
         <i class="iconfont icon-xunjiandian"></i>
       </view>

+ 1 - 1
pages/qiye/qiye.wxml

@@ -6,7 +6,7 @@
       <input type="text" bindtap="bindViewSearchEnd" placeholder="搜索" />
     </view>
     <button bindtap="bindViewSearchEnd" class="search-right">
-      <text class="iconfont icon-saoyisao1"></text>
+      <text class="iconfont icon-sousuo"></text>
     </button>
   </view>
   <!-- 企业录入数量 -->

+ 33 - 1
pages/qiyemore/qiyemore.js

@@ -27,7 +27,8 @@ Page({
       mainPerson: null,
       mainPersonPhone: null,
       headSecurity: null,
-      headSecurityPhone: null
+      headSecurityPhone: null,
+
     }
   },
   //-------------------------------表单数据绑定方法---------------------------------------
@@ -67,9 +68,40 @@ Page({
   //----------------------------------------------------------------------------
 
 
+  saoyisao(){
+
+    wx.scanCode({
+      onlyFromCamera: true,
+      success: (res) => {
+
+        console.log("$$$",res);
+       //this.data.form.qrCode=res.result
+       this.setData({
+        form: {
+          qrCode: res.result
+        }
+      })
+          
+
+        
+      
+
+      },
+
+      fail: (res) => {
+
+        wx.showToast({
+          title: '扫描失败请手动输入',
+          icon:'none'
+        })
+
+      }
 
+    })
+  },
 
   addEnterprise(e) {
+   console.log("###1",this.data.form.qrCode)
     let obj = new Object()
     obj.latitude = this.data.form.latitude
     obj.longitude = this.data.form.longitude

+ 2 - 2
pages/qiyemore/qiyemore.wxml

@@ -16,8 +16,8 @@
     </view>
     <view class="input_vi">
       <view class="input_title">企业编码</view>
-      <i class="iconfont icon-saoyisao1"></i>
-      <input bindinput="get_qrCode" class="inp_txt inp_txt2" placeholder="请输入或扫描" />
+      <i class="iconfont icon-saoyisao1" bindtap="saoyisao"></i>
+      <input bindinput="get_qrCode" class="inp_txt inp_txt2" placeholder="请输入或扫描"value="{{form.qrCode}}" />
      
    
     </view>

+ 1 - 1
pages/search/search.wxml

@@ -5,7 +5,7 @@
       <input type="text" bindinput="searchEnterprise" placeholder="搜索" />
     </view>
     <button bindtap="bindViewSearchEnd" class="search-right">
-      <text class="iconfont icon-sousuo"></text>
+      <text class="iconfont icon-saoyisao1"></text>
     </button>
   </view>
 

+ 96 - 0
pages/xungengdetails/xungengdetails.js

@@ -0,0 +1,96 @@
+// pages/xungengdetails/xungengdetails.js
+import http from '../../base/httputil'
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    id: null,
+    host: app.globalData.host,
+
+    //店铺经纬度
+    latitude: 43.8691319,
+    longitude: 125.3504459,
+    //标记点
+    markers: [{
+      id: 0,
+      name: "编程小石头",
+      address: "长春首佳科技有限公司",
+      latitude: 43.8691319,
+      longitude: 125.3504459,
+      width: 35,
+      height: 50
+    }]
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+
+    console.log("@@@",options.id)
+    this.setData({
+      id:options.id
+    })
+    this.getDetails(options.id)
+
+  },
+
+  getDetails(id){
+    let obj = new Object();
+    obj.id = this.data.id
+    http.post("/system/AppEnterpriseController/getEnterpriseDetails", obj, this.getDetailsSuccess)
+  },
+  getDetailsSuccess(res){
+    
+  },
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 8 - 0
pages/xungengdetails/xungengdetails.json

@@ -0,0 +1,8 @@
+{
+  "usingComponents": {},
+
+  "navigationBarBackgroundColor": "#f94b0e",
+  "navigationBarTextStyle": "white",
+  "navigationBarTitleText": "巡更点详情"
+
+}

+ 49 - 0
pages/xungengdetails/xungengdetails.wxml

@@ -0,0 +1,49 @@
+<!--pages/xungengdetails/xungengdetails.wxml-->
+<!-- 巡更点详情页面 -->
+<view class="container">
+  <view class="map">
+    <map longitude="{{enterpriseDetails.longitude}}" latitude="{{enterpriseDetails.latitude}}" scale="17" markers="{{markers}}" bindmarkertap="navRoad" data-marker="{{markers[0]}}" show-location />
+
+    <view class="map_btn">
+    <text class="iconfont icon-wenjianguanli" bindtap="bindViewXunChaJiLu"></text>
+    <text class="iconfont icon-icon-test" bindtap="bindViewQiYeXiangQingTable"></text>
+    <text class="iconfont icon-pinleishanchu" bindtap="bindViewQiYeDelete"></text>
+    </view>
+
+
+
+    <view class="map_view">
+
+
+
+      <view>
+        <span>经度:</span>
+        <i>{{enterpriseDetails.longitude}}</i>
+      </view>
+      <view>
+        <span>纬度:</span>
+        <i>{{enterpriseDetails.latitude}}</i>
+      </view>
+      <view>
+        <span>企业名称:</span>
+        <i>{{enterpriseDetails.businessName}}</i>
+      </view>
+      <view>
+        <span>企业编码:</span>
+        <i>{{enterpriseDetails.orgCode}}</i>
+      </view>
+      <view>
+        <span>巡更点地址:</span>
+        <i>{{enterpriseDetails.officeAddress}}</i>
+      </view>
+   
+      <view>
+        <span>监管人员:</span>
+        <i>{{enterpriseDetails.supervisor}}</i>
+      </view>
+  </view>
+  
+    <!-- 巡检悬浮按钮 -->
+    <view class="float_btn" bindtap="bindViewXunJian">更</view>
+  </view>
+</view>

+ 58 - 0
pages/xungengdetails/xungengdetails.wxss

@@ -0,0 +1,58 @@
+/* pages/xungengdetails/xungengdetails.wxss */
+
+map{
+  height: 60vh;
+  width: 100vw;
+}
+.map{
+  height: 60vh;
+  width: 100vw;
+  position: relative;
+}
+.map canvas{
+  width:100%;
+  height: 100%;
+}
+.map_view{
+  margin: 30rpx 30rpx;
+}
+.map_view view{
+  display: flex;
+  flex-direction: row;
+  font-size: 34rpx;
+  line-height: 50rpx;
+  padding-bottom: 10rpx;
+}
+.map_view view span{
+  width: 240rpx;
+  text-align: right;
+  color: #181818;
+}
+.map_view view i{
+ color: rgb(146, 146, 146);
+ white-space:normal;
+word-break:break-all;
+word-wrap:break-word
+}
+.map_btn{
+  background: rgba(0, 0, 0, 0.479);
+  display: flex;
+  flex-direction: row;
+  width: 220rpx;
+  height: 70rpx;
+  position: absolute;
+  right:20rpx;
+  bottom:20rpx;
+  z-index: 99999;
+  border-radius: 50rpx;
+  justify-content: space-evenly;
+  align-items: center;
+}
+.map_btn .iconfont{
+  color: #fff;
+  font-size: 50rpx;
+}
+.logo-text{
+  display: none;
+}
+

+ 1 - 27
pages/xunjianqrcode/xunjianqrcode.js

@@ -14,32 +14,6 @@ Page({
     this.scan()
    },
 
-   scan() {
-
-     wx.scanCode({
-
-       success: (res) => {
-
-         console.log("扫码结果");
-
-         console.log("$$$",res);
-
-         this.setData({
-
-           result: res.result,
-           scanType: res.scanType
-         })
-
-       },
-
-       fail: (res) => {
-
-         console.log(res);
-
-       }
-
-     })
-
-  }
+  
 
 })

+ 1 - 1
project.private.config.json

@@ -1,7 +1,7 @@
 {
   "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",