luck vor 2 Jahren
Ursprung
Commit
db8f329104
4 geänderte Dateien mit 30 neuen und 5 gelöschten Zeilen
  1. 11 1
      pages/take/index.js
  2. 1 1
      pages/take/index.wxml
  3. 15 0
      pages/take/lattice.js
  4. 3 3
      pages/take/lattice.wxml

+ 11 - 1
pages/take/index.js

@@ -37,6 +37,16 @@ Page({
         })
         query.exec()
     },
-
+    saoma:function(){
+        wx.scanCode({
+          onlyFromCamera: true,
+          success (res) {
+           wx.navigateTo({
+             url: '/pages/take/lattice',
+           })
+          }
+        
+        })
+    }
 
 })

+ 1 - 1
pages/take/index.wxml

@@ -7,7 +7,7 @@
       <view class="layer1">
         <view class="outer6">
           <view class="section1">
-            <view class="bd1">
+            <view class="bd1" bindtap="saoma">
               <view class="wrap1"></view>
               <text lines="1" class="word4">扫柜子二维码</text>
             </view>

+ 15 - 0
pages/take/lattice.js

@@ -55,6 +55,7 @@ Page({
         ],
         state:"",
         detashow:true,
+        show:true,
     },
 
     /**
@@ -109,6 +110,20 @@ Page({
         }
        
        
+    },
+    show:function(){
+        
+        if(this.data.detashow){
+            this.setData({
+                show: false,
+              });
+        }else{
+            this.setData({
+                show: true,
+              });
+        }
+       
+       
     }
 
 

+ 3 - 3
pages/take/lattice.wxml

@@ -106,7 +106,7 @@
         </view>
         <view class="outer11"></view>
         <view class="outer12">
-          <view class="group3">
+          <view class="group3" bindtap="show">
             <text lines="1" class="txt6">开柜取出</text>
           </view>
           <view class="group4">
@@ -121,7 +121,7 @@
     <view class="mod9">
       <view class="bd2">
         <view class="outer8">
-          <text lines="1" class="word12">开柜取出</text>
+          <text lines="1" class="word12" bindtap="show">开柜取出</text>
         </view>
         <view class="outer9" wx:if="{{detashow}}" bindtap="deta">
           <text lines="1" class="word13">详情</text>
@@ -133,7 +133,7 @@
 
       </view>
     </view>
-    <view class="layer12">
+    <view class="layer12" wx:if="{{show==false}}">
       <view class="outer5">
         <view class="mod6">
           <view class="section10">