menc 2 سال پیش
والد
کامیت
c84ac915e6
2فایلهای تغییر یافته به همراه21 افزوده شده و 4 حذف شده
  1. 1 1
      pages/search/search.json
  2. 20 3
      pages/xuncha/xuncha.js

+ 1 - 1
pages/search/search.json

@@ -2,5 +2,5 @@
   "usingComponents": {},
   "navigationBarBackgroundColor": "#f94b0e",
     "navigationBarTextStyle": "white",
-    "navigationBarTitleText": "搜索结果"
+    "navigationBarTitleText": "搜索"
 }

+ 20 - 3
pages/xuncha/xuncha.js

@@ -96,12 +96,29 @@ Page({
   menuItemClick: function (res) {
     //获取点击事件的信息
     let clickInfo = res.detail.iteminfo
-    if(clickInfo.id ==2){
-      //巡检
+    //巡更
+    if(clickInfo.id ==1){
+     
+    wx.scanCode({
+      onlyFromCamera: true,
+      success: (res) => {
+        wx.navigateTo({
+          url: '../xungengdetails/xungengdetails?id='+res.result,
+        })
+      },
+      fail: (res) => {
+       // console.log(res);
+      //  wx.showToast({
+      //   title: '扫描失败',
+      //   icon:'none'
+      // })
+      }
+    })
+    }else if(clickInfo.id==2){
+      //企业 巡检
       wx.navigateTo({
         url: '../search/search',
       })
-
     }
     // 根据不同类型进行判别处理
     //事件的处理 代码