소스 검색

Merge branch 'master' of http://121.37.83.100:3000/sooka_edyj/sooka_edyj_minapp

# Conflicts:
#	app.json
menc 2 년 전
부모
커밋
2b8dbd8914

+ 2 - 1
app.json

@@ -39,7 +39,8 @@
     "pages/xqzgdetail/xqzgdetail",
     "pages/fcdetail/fcdetail",
     "pages/patrol_list/patrol_list",
-    "pages/new_patrol_point/new_patrol_point"
+    "pages/new_patrol_point/new_patrol_point",
+    "pages/xungengdetails/xungengdetails"
   ],
   "requiredPrivateInfos": [
     "getLocation"

+ 4 - 0
app.wxss

@@ -63,6 +63,10 @@ page{
   font-size: 55rpx;
   color: rgb(206, 205, 205);
 }
+.icon-saoyisao1{
+  font-size: 55rpx;
+  color: rgb(206, 205, 205);
+}
 
   /* 列表 */
   .list_vi{

+ 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.100:18080"
+  //let BASE_Server = "https://192.168.1.100:18080"
 let BASE_Server = "https://sookajs.top:18080"
 
 

+ 11 - 3
iconfont.wxss

@@ -1,8 +1,8 @@
 @font-face {
   font-family: "iconfont"; /* Project id 3264694 */
-  src: url('//at.alicdn.com/t/c/font_3264694_c16807h1x3f.woff2?t=1673399002024') format('woff2'),
-       url('//at.alicdn.com/t/c/font_3264694_c16807h1x3f.woff?t=1673399002024') format('woff'),
-       url('//at.alicdn.com/t/c/font_3264694_c16807h1x3f.ttf?t=1673399002024') format('truetype');
+  src: url('//at.alicdn.com/t/c/font_3264694_x9zg6v6niy.woff2?t=1674957069538') format('woff2'),
+       url('//at.alicdn.com/t/c/font_3264694_x9zg6v6niy.woff?t=1674957069538') format('woff'),
+       url('//at.alicdn.com/t/c/font_3264694_x9zg6v6niy.ttf?t=1674957069538') format('truetype');
 }
 
 .iconfont {
@@ -13,6 +13,14 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-saoyisao1:before {
+  content: "\e86d";
+}
+
+.icon-saoyisao:before {
+  content: "\e685";
+}
+
 .icon-yonghutouxiang:before {
   content: "\e606";
 }

+ 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;
+}
 

+ 51 - 3
pages/index/index.js

@@ -163,12 +163,60 @@ Page({
   },
   //巡检跳转
   bindViewXunJian() {
-    // wx.navigateTo({
-    // url: '../xunjian/xunjian',
-    // })
+    if (app.globalToken == null) {
+      wx.showToast({
+        title: '尚未登录,登录后即可使用',
+        icon: 'none'
+      })
+      return
+    }
+     wx.navigateTo({
+     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>

+ 37 - 1
pages/qiyemore/qiyemore.js

@@ -18,6 +18,7 @@ Page({
       latitude: Number,
       businessName: null,
       orgCode: null,
+      qrCode:null,
       officeAddress: null,
       businessAddress: null,
       supervisor: null,
@@ -26,7 +27,8 @@ Page({
       mainPerson: null,
       mainPersonPhone: null,
       headSecurity: null,
-      headSecurityPhone: null
+      headSecurityPhone: null,
+
     }
   },
   //-------------------------------表单数据绑定方法---------------------------------------
@@ -36,6 +38,9 @@ Page({
   get_orgCode(e) {
     this.data.form.orgCode = e.detail.value
   },
+  get_qrCode(e) {
+    this.data.form.qrCode = e.detail.value
+  },
   get_officeAddress(e) {
     this.data.form.officeAddress = e.detail.value
   },
@@ -63,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

+ 8 - 1
pages/qiyemore/qiyemore.wxml

@@ -4,7 +4,7 @@
   <view class="page-section">
     <view class="input_vi">
       <view class="input_title">经度</view>
-      <input bindtap="getLocation" value="{{form.longitude}}" disabled="true" class="inp_txt" auto-focus placeholder="点击获取当前" />
+      <input bindtap="getLocation" value="{{form.longitude}}" disabled="true" class="inp_txt" auto-focus placeholder="点击获取当前位置" />
     </view>
     <view class="input_vi">
       <view class="input_title">纬度</view>
@@ -15,6 +15,13 @@
       <input bindinput="get_businessName" class="inp_txt" placeholder="请输入企业名称" />
     </view>
     <view class="input_vi">
+      <view class="input_title">企业编码</view>
+      <i class="iconfont icon-saoyisao1" bindtap="saoyisao"></i>
+      <input bindinput="get_qrCode" class="inp_txt inp_txt2" placeholder="请输入或扫描"value="{{form.qrCode}}" />
+     
+   
+    </view>
+    <view class="input_vi">
       <view class="input_title">机构代码</view>
       <input bindinput="get_orgCode" class="inp_txt" placeholder="请输入机构代码证号" />
     </view>

+ 19 - 0
pages/qiyemore/qiyemore.wxss

@@ -28,6 +28,25 @@
  color: #555;
  text-align: right;
 }
+.input_vi input.inp_txt2{
+  border:0px;
+  height: 100rpx;
+  line-height: 100rpx;
+ padding-left: 20rpx;
+ border-radius: 10rpx;
+ font-size: 34rpx;
+ color: #555;
+ text-align: right;
+ float: right;
+}
+.input_vi i{
+ display: block;
+ float: right;
+ line-height: 100rpx;
+ margin-left: 14rpx;
+ color: #535353;
+ font-size: 48rpx;
+}
 .input-placeholder, .input-placeholder-dark{
  color: #c5c5c5!important;
 }

+ 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;
+}
+

+ 19 - 0
pages/xunjianqrcode/xunjianqrcode.js

@@ -0,0 +1,19 @@
+// pages/xunjianqrcode.js
+let app = getApp();
+
+Page({
+
+   data: {
+
+    // img: "/images/1.jpg"
+    result:"等待扫描",
+    scanType: ""
+   },
+
+   onLoad() {
+    this.scan()
+   },
+
+  
+
+})

+ 3 - 0
pages/xunjianqrcode/xunjianqrcode.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 4 - 0
pages/xunjianqrcode/xunjianqrcode.wxml

@@ -0,0 +1,4 @@
+<!--pages/xunjianqrcode.wxml-->
+<view><text>你扫到的是{{scanType}}码</text></view>
+<view><text>内容为:{{result}}</text></view>
+<button type="primary" bindtap="scan">扫码</button>

+ 1 - 0
pages/xunjianqrcode/xunjianqrcode.wxss

@@ -0,0 +1 @@
+/* pages/xunjianqrcode.wxss */